Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateDefinitionFromSwagger ¶
func CreateDefinitionFromSwagger(s *SwaggerAST, orgId string, versionName string) (*objects.DBApiDefinition, error)
func NewEmptyVersion ¶
func NewEmptyVersion() apidef.VersionInfo
Types ¶
type DefinitionObjectAST ¶
type DefinitionObjectAST struct { Type string `json:"type"` Required []string `json:"required"` Properties map[string]DefinitionObjectFormatAST `json:"properties"` }
type PathItemObject ¶
type PathItemObject struct { Get PathMethodObject `json:"get"` Put PathMethodObject `json:"put"` Post PathMethodObject `json:"post"` Patch PathMethodObject `json:"patch"` Options PathMethodObject `json:"options"` Delete PathMethodObject `json:"delete"` Head PathMethodObject `json:"head"` }
type PathMethodObject ¶
type PathMethodObject struct { Description string `json:"description"` OperationID string `json:"operationId"` Responses map[string]ResponseCodeObjectAST `json:"responses"` }
type ResponseCodeObjectAST ¶
type SwaggerAST ¶
type SwaggerAST struct { BasePath string `json:"basePath"` Consumes []string `json:"consumes"` Definitions map[string]DefinitionObjectAST `json:"definitions"` Host string `json:"host"` Info struct { Contact struct { Email string `json:"email"` Name string `json:"name"` URL string `json:"url"` } `json:"contact"` Description string `json:"description"` License struct { Name string `json:"name"` URL string `json:"url"` } `json:"license"` TermsOfService string `json:"termsOfService"` Title string `json:"title"` Version string `json:"version"` } `json:"info"` Paths map[string]PathItemObject `json:"paths"` Produces []string `json:"produces"` Schemes []string `json:"schemes"` Swagger string `json:"swagger"` }
func (*SwaggerAST) ConvertIntoApiVersion ¶
func (s *SwaggerAST) ConvertIntoApiVersion(versionName string) (apidef.VersionInfo, error)
func (*SwaggerAST) ReadString ¶
func (s *SwaggerAST) ReadString(asJson string) error
Click to show internal directories.
Click to hide internal directories.