1
0
mirror of https://github.com/astaxie/beego.git synced 2024-11-22 12:10:55 +00:00

Update swagger.go

This commit is contained in:
Sergey Lanzman 2016-09-14 23:36:38 +03:00 committed by GitHub
parent 58ffc6f5f8
commit da0e6e790d

View File

@ -22,19 +22,19 @@ package swagger
// Swagger list the resource // Swagger list the resource
type Swagger struct { type Swagger struct {
SwaggerVersion string `json:"swagger,omitempty"` SwaggerVersion string `json:"swagger,omitempty"`
Infos Information `json:"info"` Infos Information `json:"info"`
Host string `json:"host,omitempty"` Host string `json:"host,omitempty"`
BasePath string `json:"basePath,omitempty"` BasePath string `json:"basePath,omitempty"`
Schemes []string `json:"schemes,omitempty"` Schemes []string `json:"schemes,omitempty"`
Consumes []string `json:"consumes,omitempty"` Consumes []string `json:"consumes,omitempty"`
Produces []string `json:"produces,omitempty"` Produces []string `json:"produces,omitempty"`
Paths map[string]*Item `json:"paths"` Paths map[string]*Item `json:"paths"`
Definitions map[string]Schema `json:"definitions,omitempty"` Definitions map[string]Schema `json:"definitions,omitempty"`
SecurityDefinitions map[string]Scurity `json:"securityDefinitions,omitempty"` SecurityDefinitions map[string]Security `json:"securityDefinitions,omitempty"`
Security map[string][]string `json:"security,omitempty"` Security map[string][]string `json:"security,omitempty"`
Tags []Tag `json:"tags,omitempty"` Tags []Tag `json:"tags,omitempty"`
ExternalDocs *ExternalDocs `json:"externalDocs,omitempty"` ExternalDocs *ExternalDocs `json:"externalDocs,omitempty"`
} }
// Information Provides metadata about the API. The metadata can be used by the clients if needed. // Information Provides metadata about the API. The metadata can be used by the clients if needed.
@ -44,8 +44,8 @@ type Information struct {
Version string `json:"version,omitempty"` Version string `json:"version,omitempty"`
TermsOfService string `json:"termsOfService,omitempty"` TermsOfService string `json:"termsOfService,omitempty"`
Contact Contact `json:"contact,omitempty"` Contact Contact `json:"contact,omitempty"`
License License `json:"license,omitempty"` License *License `json:"license,omitempty"`
} }
// Contact information for the exposed API. // Contact information for the exposed API.
@ -144,8 +144,8 @@ type Response struct {
Ref string `json:"$ref,omitempty"` Ref string `json:"$ref,omitempty"`
} }
// Scurity Allows the definition of a security scheme that can be used by the operations // Security Allows the definition of a security scheme that can be used by the operations
type Scurity struct { type Security struct {
Type string `json:"type,omitempty"` // Valid values are "basic", "apiKey" or "oauth2". Type string `json:"type,omitempty"` // Valid values are "basic", "apiKey" or "oauth2".
Description string `json:"description,omitempty"` Description string `json:"description,omitempty"`
Name string `json:"name,omitempty"` Name string `json:"name,omitempty"`