From da0e6e790df1530bb8902e048a1442b2a359e1be Mon Sep 17 00:00:00 2001 From: Sergey Lanzman Date: Wed, 14 Sep 2016 23:36:38 +0300 Subject: [PATCH] Update swagger.go --- swagger/swagger.go | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/swagger/swagger.go b/swagger/swagger.go index a16b26b4..4c542b73 100644 --- a/swagger/swagger.go +++ b/swagger/swagger.go @@ -22,19 +22,19 @@ package swagger // Swagger list the resource type Swagger struct { - SwaggerVersion string `json:"swagger,omitempty"` - Infos Information `json:"info"` - Host string `json:"host,omitempty"` - BasePath string `json:"basePath,omitempty"` - Schemes []string `json:"schemes,omitempty"` - Consumes []string `json:"consumes,omitempty"` - Produces []string `json:"produces,omitempty"` - Paths map[string]*Item `json:"paths"` - Definitions map[string]Schema `json:"definitions,omitempty"` - SecurityDefinitions map[string]Scurity `json:"securityDefinitions,omitempty"` - Security map[string][]string `json:"security,omitempty"` - Tags []Tag `json:"tags,omitempty"` - ExternalDocs *ExternalDocs `json:"externalDocs,omitempty"` + SwaggerVersion string `json:"swagger,omitempty"` + Infos Information `json:"info"` + Host string `json:"host,omitempty"` + BasePath string `json:"basePath,omitempty"` + Schemes []string `json:"schemes,omitempty"` + Consumes []string `json:"consumes,omitempty"` + Produces []string `json:"produces,omitempty"` + Paths map[string]*Item `json:"paths"` + Definitions map[string]Schema `json:"definitions,omitempty"` + SecurityDefinitions map[string]Security `json:"securityDefinitions,omitempty"` + Security map[string][]string `json:"security,omitempty"` + Tags []Tag `json:"tags,omitempty"` + ExternalDocs *ExternalDocs `json:"externalDocs,omitempty"` } // 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"` TermsOfService string `json:"termsOfService,omitempty"` - Contact Contact `json:"contact,omitempty"` - License License `json:"license,omitempty"` + Contact Contact `json:"contact,omitempty"` + License *License `json:"license,omitempty"` } // Contact information for the exposed API. @@ -144,8 +144,8 @@ type Response struct { Ref string `json:"$ref,omitempty"` } -// Scurity Allows the definition of a security scheme that can be used by the operations -type Scurity struct { +// Security Allows the definition of a security scheme that can be used by the operations +type Security struct { Type string `json:"type,omitempty"` // Valid values are "basic", "apiKey" or "oauth2". Description string `json:"description,omitempty"` Name string `json:"name,omitempty"`