builder

package
v1.3.3 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API struct {
	URL                     string
	Method                  string
	Tags                    []string
	Summary                 string
	Description             string
	OperationId             string
	RequestBody             RequestBody
	Parameters              []Parameter
	Responses               []Response
	XCodegenRequestBodyName string
}

type Array

type Array []Object

type ExternalDocs

type ExternalDocs struct {
	Description string
	Url         string
}

type FormProperties added in v1.3.0

type FormProperties struct {
	Name        string
	Type        string
	Description string
}

func NewFormProperties added in v1.3.0

func NewFormProperties(name string, typ reflect.Type) FormProperties

type Info

type Info struct {
	Title          string
	Description    string
	TermsOfService string
	Email          string
	LicenseName    string
	LicenseUrl     string
	Version        string
}

type ModelSchema

type ModelSchema struct {
	Model           string
	Type            string
	FieldProperties []Properties
}

func NewObjectModelSchema added in v1.2.9

func NewObjectModelSchema(typ reflect.Type) ModelSchema

type Object

type Object map[string]interface{}

func BuildOpenAPI

func BuildOpenAPI(info Info, docs ExternalDocs, servers []string, tags []Tag, api []API, models []ModelSchema) Object

type Parameter

type Parameter struct {
	Name        string
	In          string
	Description string
	Required    bool
	Schema      Schema
}

func NewParameter added in v1.2.9

func NewParameter(name string, in string, description string, required bool, typ reflect.Type) Parameter

type Properties added in v1.3.0

type Properties struct {
	Name   string
	Schema Schema
}

type RequestBody

type RequestBody struct {
	Description string
	Contents    []Schema
	Required    bool
}

type Response added in v1.2.9

type Response struct {
	HttpStatusCode string
	Description    string
	Contents       []Schema
}

type Schema

type Schema struct {
	Ref            string
	ContentType    string
	Type           string
	Format         string
	FormProperties []FormProperties
}

func NewArraySchema added in v1.2.9

func NewArraySchema(typ reflect.Type) Schema

func NewFormSchema added in v1.3.0

func NewFormSchema(properties []FormProperties) Schema

func NewJsonSchema added in v1.2.9

func NewJsonSchema(typ reflect.Type) Schema

func NewMultipartSchema added in v1.3.0

func NewMultipartSchema(name string) Schema

func NewObjectSchema added in v1.2.9

func NewObjectSchema(typ reflect.Type) Schema

func NewStreamSchema added in v1.3.0

func NewStreamSchema() Schema

type Tag

type Tag struct {
	Name         string
	Description  string
	ExternalDocs ExternalDocs
}

Jump to

Keyboard shortcuts

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