mirror of
https://github.com/astaxie/beego.git
synced 2024-11-22 23:00:55 +00:00
Merge pull request #2640 from franzwilhelm/master
Moved Security to Operation struct to support swagger API security auth
This commit is contained in:
commit
91400f10b0
@ -32,7 +32,7 @@ type Swagger struct {
|
|||||||
Paths map[string]*Item `json:"paths" yaml:"paths"`
|
Paths map[string]*Item `json:"paths" yaml:"paths"`
|
||||||
Definitions map[string]Schema `json:"definitions,omitempty" yaml:"definitions,omitempty"`
|
Definitions map[string]Schema `json:"definitions,omitempty" yaml:"definitions,omitempty"`
|
||||||
SecurityDefinitions map[string]Security `json:"securityDefinitions,omitempty" yaml:"securityDefinitions,omitempty"`
|
SecurityDefinitions map[string]Security `json:"securityDefinitions,omitempty" yaml:"securityDefinitions,omitempty"`
|
||||||
Security map[string][]string `json:"security,omitempty" yaml:"security,omitempty"`
|
Security []map[string][]string `json:"security,omitempty" yaml:"security,omitempty"`
|
||||||
Tags []Tag `json:"tags,omitempty" yaml:"tags,omitempty"`
|
Tags []Tag `json:"tags,omitempty" yaml:"tags,omitempty"`
|
||||||
ExternalDocs *ExternalDocs `json:"externalDocs,omitempty" yaml:"externalDocs,omitempty"`
|
ExternalDocs *ExternalDocs `json:"externalDocs,omitempty" yaml:"externalDocs,omitempty"`
|
||||||
}
|
}
|
||||||
@ -84,6 +84,7 @@ type Operation struct {
|
|||||||
Schemes []string `json:"schemes,omitempty" yaml:"schemes,omitempty"`
|
Schemes []string `json:"schemes,omitempty" yaml:"schemes,omitempty"`
|
||||||
Parameters []Parameter `json:"parameters,omitempty" yaml:"parameters,omitempty"`
|
Parameters []Parameter `json:"parameters,omitempty" yaml:"parameters,omitempty"`
|
||||||
Responses map[string]Response `json:"responses,omitempty" yaml:"responses,omitempty"`
|
Responses map[string]Response `json:"responses,omitempty" yaml:"responses,omitempty"`
|
||||||
|
Security []map[string][]string `json:"security,omitempty" yaml:"security,omitempty"`
|
||||||
Deprecated bool `json:"deprecated,omitempty" yaml:"deprecated,omitempty"`
|
Deprecated bool `json:"deprecated,omitempty" yaml:"deprecated,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user