jsclient

package
v3.7.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2019 License: Apache-2.0 Imports: 14 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var PrimitiveTypes = map[string]bool{
	"string":  true,
	"number":  true,
	"integer": true,
	"boolean": true,
	"array":   true,
	"object":  true,
}

PrimitiveTypes is a set of Swagger primitive types

Functions

func Generate

func Generate(modulePath string, s spec.Swagger) error

Generate generates a client

Types

type DataType

type DataType struct {
	Name string
	Ref  *string
}

DataType represents a primitive or defined type

type JSType

type JSType string

JSType is a wrapper type for things that represent a TypeScript type

func ReturnType

func ReturnType(s spec.Swagger, op *spec.Operation) (JSType, error)

ReturnType returns the methods return type

type JSTypeMap

type JSTypeMap map[string]JSType

JSTypeMap is a representation of a TypeScript object

type Param

type Param struct {
	Name string
	Type DataType
}

Param represents a function's formal parameter

Jump to

Keyboard shortcuts

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