typescript

package
v2.4.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 10, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Generator

type Generator struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(schema smd.Schema, settings Settings) *Generator

func (*Generator) Generate

func (g *Generator) Generate() ([]byte, error)

Generate returns generate TypeScript client

type Settings added in v2.2.2

type Settings struct {
	TypeMapper        TypeMapper
	ExcludedNamespace []string
	WithClasses       bool
}

type Type

type Type struct {
	Name       string
	Comment    string
	Type       string
	Optional   bool
	HasDefault bool
	Default    *string
}

func (Type) DefaultTmpl added in v2.1.4

func (t Type) DefaultTmpl() string

type TypeMapper

type TypeMapper func(in smd.JSONSchema, tsType Type) Type

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL