Documentation ¶
Index ¶
- type Callback
- type Components
- type Contact
- type Discriminator
- type Encoding
- type Example
- type ExternalDocs
- type Header
- type License
- type Link
- type MediaType
- type OAuthFlow
- type OAuthFlows
- type OpenAPIServerVariable
- type Operation
- type Parameter
- type Path
- type RequestBody
- type Response
- type Schema
- type SchemaInfo
- type SchemaObject
- type SecurityRequirement
- type SecurityScheme
- type Server
- type Tag
- type XML
- type XModifier
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Components ¶
type Components struct { Schemas map[string]SchemaObject `json:"schemas,omitempty"` Responses map[string]Response `json:"responses,omitempty"` Parameters map[string]Parameter `json:"parameters,omitempty"` Examples map[string]Example `json:"examples,omitempty"` RequestBodies map[string]RequestBody `json:"requestBodies,omitempty"` Headers map[string]Header `json:"headers,omitempty"` SecuritySchemes map[string]SecurityScheme `json:"securitySchemes,omitempty"` Links map[string]Link `json:"links,omitempty"` Callbacks map[string]Callback `json:"callbacks,omitempty"` PathItems map[string]Path `json:"pathItems,omitempty"` }
type Discriminator ¶
type ExternalDocs ¶
type Link ¶
type Link struct { Ref string `json:"$ref,omitempty"` OperationRef string `json:"operationRef,omitempty"` OperationId string `json:"operationId,omitempty"` Parameters map[string]interface{} `json:"parameters,omitempty"` RequestBody map[string]interface{} `json:"requestBody,omitempty"` Description string `json:"description,omitempty"` Server *Server `json:"server,omitempty"` }
type OAuthFlows ¶
type OpenAPIServerVariable ¶
type Operation ¶
type Operation struct { Tags []string `json:"tags,omitempty"` Summary string `json:"summary,omitempty"` Description string `json:"description,omitempty"` ExternalDocs *ExternalDocs `json:"externalDocs,omitempty"` OperationId string `json:"operationId,omitempty"` Parameters []Parameter `json:"parameters,omitempty"` RequestBody *RequestBody `json:"requestBody,omitempty"` Responses map[string]Response `json:"responses,omitempty"` Callbacks map[string]Callback `json:"callbacks,omitempty"` Deprecated bool `json:"deprecated,omitempty"` Security []SecurityRequirement `json:"security,omitempty"` Servers []Server `json:"servers,omitempty"` }
type Parameter ¶
type Parameter struct { Ref string `json:"$ref,omitempty"` Name string `json:"name,omitempty"` In string `json:"in,omitempty"` Description string `json:"description,omitempty"` Required bool `json:"required,omitempty"` Deprecated bool `json:"deprecated,omitempty"` AllowEmptyValue bool `json:"allowEmptyValue,omitempty"` Style string `json:"style,omitempty"` Explode bool `json:"explode,omitempty"` AllowReserved bool `json:"allowReserved,omitempty"` Schema *SchemaObject `json:"schema,omitempty"` Example *Example `json:"example,omitempty"` Examples map[string]Example `json:"examples,omitempty"` Content map[string]MediaType `json:"content,omitempty"` }
type Path ¶
type Path struct { Ref string `json:"$ref,omitempty"` Summary string `json:"summary,omitempty"` Description string `json:"description,omitempty"` Get *Operation `json:"get,omitempty"` Put *Operation `json:"put,omitempty"` Post *Operation `json:"post,omitempty"` Delete *Operation `json:"delete,omitempty"` Options *Operation `json:"options,omitempty"` Head *Operation `json:"head,omitempty"` Patch *Operation `json:"patch,omitempty"` Trace *Operation `json:"trace,omitempty"` Servers []Server `json:"servers,omitempty"` Parameters []Parameter `json:"parameters,omitempty"` }
type RequestBody ¶
type Schema ¶
type Schema struct { OpenAPI string `json:"openapi,omitempty"` Info *SchemaInfo `json:"info,omitempty"` JSONSchemaDialect string `json:"jsonSchemaDialect,omitempty"` Servers []Server `json:"servers,omitempty"` Paths map[string]Path `json:"paths,omitempty"` Webhooks map[string]Path `json:"webhooks,omitempty"` Components *Components `json:"components,omitempty"` Security []SecurityRequirement `json:"security,omitempty"` Tags []Tag `json:"tags,omitempty"` ExternalDocs *ExternalDocs `json:"externalDocs,omitempty"` }
func GenerateBaseSchema ¶
func GenerateBaseSchema() *Schema
type SchemaInfo ¶
type SchemaInfo struct { Title string `json:"title,omitempty"` Summary string `json:"summary,omitempty"` Description string `json:"description,omitempty"` TermsOfService string `json:"termsOfService,omitempty"` Contact *Contact `json:"contact,omitempty"` License *License `json:"license,omitempty"` Version string `json:"version,omitempty"` }
type SchemaObject ¶
type SchemaObject struct { Ref string `json:"$ref,omitempty"` Type string `json:"type,omitempty"` Pattern string `json:"pattern,omitempty"` Maximum int `json:"maximum,omitempty"` Minimum int `json:"minimum,omitempty"` Required []string `json:"required,omitempty"` Title string `json:"title,omitempty"` Description string `json:"description,omitempty"` Default interface{} `json:"default,omitempty"` ReadOnly *bool `json:"readOnly,omitempty"` Format string `json:"format,omitempty"` Examples []Example `json:"examples,omitempty"` Items *SchemaObject `json:"items,omitempty"` Properties map[string]*SchemaObject `json:"properties,omitempty"` Discriminator *Discriminator `json:"discriminator,omitempty"` XML *XML `json:"xml,omitempty"` ExternalDocs *ExternalDocs `json:"externalDocs,omitempty"` Example *Example `json:"example,omitempty"` Enum []interface{} `json:"enum,omitempty"` OneOf []*SchemaObject `json:"oneOf,omitempty"` AllOf []*SchemaObject `json:"allOf,omitempty"` Const interface{} `json:"x-const,omitempty"` Deprecated *bool `json:"deprecated,omitempty"` XFilters []XModifier `json:"x-filter,omitempty"` XAggregator []XModifier `json:"x-aggregator,omitempty"` }
type SecurityRequirement ¶
type SecurityScheme ¶
type SecurityScheme struct { Ref string `json:"$ref,omitempty"` Type string `json:"type,omitempty"` Description string `json:"description,omitempty"` Name string `json:"name,omitempty"` In string `json:"in,omitempty"` Scheme string `json:"scheme,omitempty"` BearerFormat string `json:"bearerFormat,omitempty"` Flows *OAuthFlows `json:"flows,omitempty"` OpenIdConnectUrl string `json:"openIdConnectUrl,omitempty"` }
type Server ¶
type Server struct { URL string `json:"url,omitempty"` Description string `json:"description,omitempty"` Variables map[string]OpenAPIServerVariable `json:"variables,omitempty"` }
type Tag ¶
type Tag struct { Name string `json:"name,omitempty"` Description string `json:"description,omitempty"` ExternalDocs *ExternalDocs `json:"externalDocs,omitempty"` }
Source Files ¶
- auth_paths.go
- callback.go
- components.go
- contact.go
- discriminator.go
- encoding.go
- example.go
- external_docs.go
- generate_schema.go
- header.go
- license.go
- link.go
- media_type.go
- oauth_flow.go
- oauth_flows.go
- operation.go
- parameter.go
- path.go
- request_body.go
- response.go
- schema.go
- schema_info.go
- schema_object.go
- security_requirment.go
- security_scheme.go
- server.go
- server_variable.go
- tag.go
- x_modifier.go
- xml.go
Click to show internal directories.
Click to hide internal directories.