Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
B
beego
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
beego
Commits
1b4f30e1
Commit
1b4f30e1
authored
Aug 13, 2016
by
astaxie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update swagger
parent
957db136
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
28 deletions
+29
-28
swagger.go
swagger/swagger.go
+29
-28
No files found.
swagger/swagger.go
View file @
1b4f30e1
...
...
@@ -34,15 +34,15 @@ type Swagger struct {
SecurityDefinitions
map
[
string
]
Scurity
`json:"securityDefinitions,omitempty"`
Security
map
[
string
][]
string
`json:"security,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.
type
Information
struct
{
Title
string
`json:"title,omitempty"`
Description
string
`json:"description,omitempty"`
Version
string
`json:"version,omitempty"`
TermsOfService
URL
string
`json:"termsOfServiceUrl
,omitempty"`
Title
string
`json:"title,omitempty"`
Description
string
`json:"description,omitempty"`
Version
string
`json:"version,omitempty"`
TermsOfService
string
`json:"termsOfService
,omitempty"`
Contact
Contact
`json:"contact,omitempty"`
License
License
`json:"license,omitempty"`
...
...
@@ -89,13 +89,13 @@ type Operation struct {
// Parameter Describes a single operation parameter.
type
Parameter
struct
{
In
string
`json:"in,omitempty"`
Name
string
`json:"name,omitempty"`
Description
string
`json:"description,omitempty"`
Required
bool
`json:"required,omitempty"`
Schema
Schema
`json:"schema,omitempty"`
Type
string
`json:"type,omitempty"`
Format
string
`json:"format,omitempty"`
In
string
`json:"in,omitempty"`
Name
string
`json:"name,omitempty"`
Description
string
`json:"description,omitempty"`
Required
bool
`json:"required,omitempty"`
Schema
*
Schema
`json:"schema,omitempty"`
Type
string
`json:"type,omitempty"`
Format
string
`json:"format,omitempty"`
}
// Schema Object allows the definition of input and output data types.
...
...
@@ -111,23 +111,24 @@ type Schema struct {
// Propertie are taken from the JSON Schema definition but their definitions were adjusted to the Swagger Specification
type
Propertie
struct
{
Ref
string
`json:"$ref,omitempty"`
Title
string
`json:"title,omitempty"`
Description
string
`json:"description,omitempty"`
Default
string
`json:"default,omitempty"`
Type
string
`json:"type,omitempty"`
Example
string
`json:"example,omitempty"`
Required
[]
string
`json:"required,omitempty"`
Format
string
`json:"format,omitempty"`
ReadOnly
bool
`json:"readOnly,omitempty"`
Properties
map
[
string
]
Propertie
`json:"properties,omitempty"`
Ref
string
`json:"$ref,omitempty"`
Title
string
`json:"title,omitempty"`
Description
string
`json:"description,omitempty"`
Default
string
`json:"default,omitempty"`
Type
string
`json:"type,omitempty"`
Example
string
`json:"example,omitempty"`
Required
[]
string
`json:"required,omitempty"`
Format
string
`json:"format,omitempty"`
ReadOnly
bool
`json:"readOnly,omitempty"`
Properties
map
[
string
]
Propertie
`json:"properties,omitempty"`
AdditionalProperties
*
Propertie
`json:"additionalProperties,omitempty"`
}
// Response as they are returned from executing this operation.
type
Response
struct
{
Description
string
`json:"description,omitempty"`
Schema
Schema
`json:"schema,omitempty"`
Ref
string
`json:"$ref,omitempty"`
Description
string
`json:"description,omitempty"`
Schema
*
Schema
`json:"schema,omitempty"`
Ref
string
`json:"$ref,omitempty"`
}
// Scurity Allows the definition of a security scheme that can be used by the operations
...
...
@@ -144,9 +145,9 @@ type Scurity struct {
// Tag Allows adding meta data to a single tag that is used by the Operation Object
type
Tag
struct
{
Name
string
`json:"name,omitempty"`
Description
string
`json:"description,omitempty"`
ExternalDocs
ExternalDocs
`json:"externalDocs,omitempty"`
Name
string
`json:"name,omitempty"`
Description
string
`json:"description,omitempty"`
ExternalDocs
*
ExternalDocs
`json:"externalDocs,omitempty"`
}
// ExternalDocs include Additional external documentation
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment