Versions in this module Expand all Collapse all v1 v1.0.1 Feb 20, 2024 Changes in this version + type Callback struct + func NewCallback(method HttpMethod, rule RuntimeExpression, op *Operation) *Callback + func (i *Callback) UnmarshalJSON(data []byte) error + func (i Callback) MarshalJSON() ([]byte, error) + type CallbackObject map[RuntimeExpression]*PathItem + type ComponentRefer struct + Group string + ID string + func NewComponentRefer(group string, id string) *ComponentRefer + func ParseComponentRefer(ref string) *ComponentRefer + func (ref ComponentRefer) RefString() string + type Components struct + func (i *Components) UnmarshalJSON(data []byte) error + func (i Components) MarshalJSON() ([]byte, error) + type ComponentsObject struct + Parameters map[string]*Parameter + RequestBodies map[string]*RequestBody + Responses map[string]*Response + Schemas map[string]*Schema + func (object *ComponentsObject) AddParameter(id string, p *Parameter) + func (object *ComponentsObject) AddRequestBody(id string, e *RequestBody) + func (object *ComponentsObject) AddResponse(id string, r *Response) + func (object *ComponentsObject) AddSchema(id string, s *Schema) + func (object *ComponentsObject) RefCallback(id string) *Callback + func (object *ComponentsObject) RefExample(id string) *Example + func (object *ComponentsObject) RefHeader(id string) *Header + func (object *ComponentsObject) RefLink(id string) *Link + func (object *ComponentsObject) RefParameter(id string) *Parameter + func (object *ComponentsObject) RefRequestBody(id string) *RequestBody + func (object *ComponentsObject) RefResponse(id string) *Response + func (object *ComponentsObject) RefSchema(id string) *Schema + func (object *ComponentsObject) RequireSecurity(id string, scopes ...string) SecurityRequirement + type Contact struct + func (i *Contact) UnmarshalJSON(data []byte) error + func (i Contact) MarshalJSON() ([]byte, error) + type ContactObject struct + Email string + Name string + URL string + type Discriminator struct + Mapping map[string]string + PropertyName string + type Encoding struct + func NewEncoding() *Encoding + func (i *Encoding) UnmarshalJSON(data []byte) error + func (i Encoding) MarshalJSON() ([]byte, error) + type EncodingObject struct + AllowReserved bool + ContentType string + Explode bool + Style ParameterStyle + type Example struct + func NewExample() *Example + func (e *Example) UnmarshalJSON(data []byte) error + func (e Example) MarshalJSON() ([]byte, error) + type ExampleObject struct + Description string + ExternalValue string + Summary string + Value interface{} + type ExternalDoc struct + Description string + URL string + func NewExternalDoc(url string, desc string) *ExternalDoc + type Header struct + func NewHeaderWithSchema(s *Schema) *Header + func (h *Header) UnmarshalJSON(data []byte) error + func (h Header) MarshalJSON() ([]byte, error) + type HttpMethod string + const DELETE + const GET + const HEAD + const OPTIONS + const PATCH + const POST + const PUT + const TRACE + type Info struct + func (i *Info) UnmarshalJSON(data []byte) error + func (i Info) MarshalJSON() ([]byte, error) + type InfoObject struct + Description string + TermsOfService string + Title string + Version string + type License struct + func (i *License) UnmarshalJSON(data []byte) error + func (i License) MarshalJSON() ([]byte, error) + type LicenseObject struct + Name string + URL string + type Link struct + func NewLink(operationId string) *Link + func (l *Link) UnmarshalJSON(data []byte) error + func (l Link) MarshalJSON() ([]byte, error) + type LinkObject struct + Description string + OperationId string + OperationRef string + Parameters map[string]RuntimeExpression + RequestBody RuntimeExpression + Server *Server + func (o *LinkObject) AddParameter(name string, expr RuntimeExpression) + func (o *LinkObject) SetRequestBody(expr RuntimeExpression) + type MediaType struct + func NewMediaTypeWithSchema(s *Schema) *MediaType + func (i *MediaType) UnmarshalJSON(data []byte) error + func (i MediaType) MarshalJSON() ([]byte, error) + type MediaTypeObject struct + Example interface{} + Schema *Schema + type OAuthFlow struct + func NewOAuthFlow(authorizationURL string, tokenURL string, refreshURL string, ...) *OAuthFlow + func (i *OAuthFlow) UnmarshalJSON(data []byte) error + func (i OAuthFlow) MarshalJSON() ([]byte, error) + type OAuthFlowObject struct + AuthorizationURL string + RefreshURL string + Scopes map[string]string + TokenURL string + type OAuthFlows struct + func (i *OAuthFlows) UnmarshalJSON(data []byte) error + func (i OAuthFlows) MarshalJSON() ([]byte, error) + type OAuthFlowsObject struct + AuthorizationCode *OAuthFlow + ClientCredentials *OAuthFlow + Implicit *OAuthFlow + Password *OAuthFlow + type OpenAPI struct + func NewOpenAPI() *OpenAPI + func (i *OpenAPI) UnmarshalJSON(data []byte) error + func (i OpenAPI) MarshalJSON() ([]byte, error) + type OpenAPIObject struct + OpenAPI string + type Operation struct + func NewOperation(operationId string) *Operation + func (op *Operation) UnmarshalJSON(data []byte) error + func (op Operation) MarshalJSON() ([]byte, error) + func (op Operation) WithDesc(desc string) *Operation + func (op Operation) WithSummary(summary string) *Operation + func (op Operation) WithTags(tags ...string) *Operation + type OperationObject struct + Deprecated bool + Description string + ExternalDocs *ExternalDoc + OperationId string + RequestBody *RequestBody + Responses Responses + Summary string + Tags []string + func (o *OperationObject) AddResponse(statusCode int, r *Response) + func (o *OperationObject) SetDefaultResponse(r *Response) + func (o *OperationObject) SetRequestBody(rb *RequestBody) + type Operations struct + Operations map[HttpMethod]*Operation + func (v *Operations) AddOperation(method HttpMethod, op *Operation) + func (v *Operations) UnmarshalJSON(data []byte) error + func (v Operations) MarshalJSON() ([]byte, error) + type Parameter struct + func CookieParameter(name string, s *Schema, required bool) *Parameter + func HeaderParameter(name string, s *Schema, required bool) *Parameter + func PathParameter(name string, s *Schema) *Parameter + func QueryParameter(name string, s *Schema, required bool) *Parameter + func (p *Parameter) UnmarshalJSON(data []byte) error + func (p Parameter) MarshalJSON() ([]byte, error) + func (p Parameter) WithDesc(desc string) *Parameter + type ParameterCommonObject struct + AllowEmptyValue bool + AllowReserved bool + Deprecated bool + Description string + Example interface{} + Explode bool + Required bool + Style ParameterStyle + type ParameterObject struct + In Position + Name string + type ParameterStyle string + const ParameterStyleDeepObject + const ParameterStyleForm + const ParameterStyleLabel + const ParameterStyleMatrix + const ParameterStylePipeDelimited + const ParameterStyleSimple + const ParameterStyleSpaceDelimited + type PathItem struct + func (i *PathItem) UnmarshalJSON(data []byte) error + func (i PathItem) MarshalJSON() ([]byte, error) + type PathItemObject struct + Description string + Parameters []*Parameter + Servers []*Server + Summary string + type Paths struct + Paths map[string]*PathItem + func (p *Paths) AddOperation(method HttpMethod, path string, op *Operation) + func (p *Paths) UnmarshalJSON(data []byte) error + func (p Paths) MarshalJSON() ([]byte, error) + type Position string + const PositionCookie + const PositionHeader + const PositionPath + const PositionQuery + type Props map[string]*Schema + type Refer interface + RefString func() string + type Reference struct + Refer Refer + func (ref *Reference) UnmarshalJSONRefFirst(data []byte, values ...interface{}) error + func (ref Reference) MarshalJSONRefFirst(values ...interface{}) ([]byte, error) + type RequestBody struct + func NewRequestBody(desc string, required bool) *RequestBody + func (r *RequestBody) UnmarshalJSON(data []byte) error + func (r RequestBody) MarshalJSON() ([]byte, error) + type RequestBodyObject struct + Description string + Required bool + type Response struct + func NewResponse(desc string) *Response + func (r *Response) UnmarshalJSON(data []byte) error + func (r Response) MarshalJSON() ([]byte, error) + type ResponseObject struct + Description string + type Responses struct + func (i *Responses) UnmarshalJSON(data []byte) error + func (i Responses) MarshalJSON() ([]byte, error) + type ResponsesObject struct + Default *Response + Responses map[int]*Response + func (o *ResponsesObject) AddResponse(statusCode int, r *Response) + func (o *ResponsesObject) SetDefaultResponse(r *Response) + func (o *ResponsesObject) UnmarshalJSON(data []byte) error + func (o ResponsesObject) MarshalJSON() ([]byte, error) + type RuntimeExpression string + type Schema struct + func AllOf(schemas ...*Schema) *Schema + func AnyOf(schemas ...*Schema) *Schema + func Binary() *Schema + func Boolean() *Schema + func Byte() *Schema + func Date() *Schema + func DateTime() *Schema + func Double() *Schema + func Float() *Schema + func Integer() *Schema + func ItemsOf(items *Schema) *Schema + func KeyValueOf(k *Schema, s *Schema) *Schema + func Long() *Schema + func MapOf(s *Schema) *Schema + func NewSchema(tpe Type, fmt string) *Schema + func Not(schema *Schema) *Schema + func ObjectOf(props Props, required ...string) *Schema + func OneOf(schemas ...*Schema) *Schema + func Password() *Schema + func RefSchema(ref string) *Schema + func RefSchemaByRefer(refer Refer) *Schema + func String() *Schema + func (s *Schema) SetProperty(name string, propSchema *Schema, required bool) + func (s *Schema) UnmarshalJSON(data []byte) error + func (s Schema) MarshalJSON() ([]byte, error) + func (s Schema) WithDesc(desc string) *Schema + func (s Schema) WithDiscriminator(discriminator *Discriminator) *Schema + func (s Schema) WithTitle(title string) *Schema + func (s Schema) WithValidation(validation *SchemaValidation) *Schema + type SchemaObject struct + AdditionalProperties *SchemaOrBool + AllOf []*Schema + AnyOf []*Schema + Default interface{} + Deprecated bool + Description string + Discriminator *Discriminator + Example interface{} + ExternalDocs *ExternalDoc + Format string + Items *Schema + Not *Schema + Nullable bool + OneOf []*Schema + Properties map[string]*Schema + PropertyNames *Schema + ReadOnly bool + Title string + Type Type + WriteOnly bool + XML *XML + type SchemaOrBool struct + Allows bool + Schema *Schema + func (s *SchemaOrBool) MarshalJSON() ([]byte, error) + func (s *SchemaOrBool) UnmarshalJSON(data []byte) error + type SchemaValidation struct + Enum []interface{} + ExclusiveMaximum bool + ExclusiveMinimum bool + MaxItems *uint64 + MaxLength *uint64 + MaxProperties *uint64 + Maximum *float64 + MinItems *uint64 + MinLength *uint64 + MinProperties *uint64 + Minimum *float64 + MultipleOf *float64 + Pattern string + Required []string + UniqueItems bool + type SecurityRequirement map[string][]string + type SecurityScheme struct + func NewAPIKeySecurityScheme(name string, in Position) *SecurityScheme + func NewHTTPSecurityScheme(scheme string, bearerFormat string) *SecurityScheme + func NewOAuth2SecurityScheme(oauthFlowsObject OAuthFlowsObject) *SecurityScheme + func NewOpenIdConnectSecurityScheme(openIdConnectUrl string) *SecurityScheme + func (i *SecurityScheme) UnmarshalJSON(data []byte) error + func (i SecurityScheme) MarshalJSON() ([]byte, error) + type SecuritySchemeObject struct + BearerFormat string + Description string + Flows *OAuthFlows + In Position + Name string + OpenIdConnectUrl string + Scheme string + Type SecurityType + type SecurityType string + const SecurityTypeAPIKey + const SecurityTypeHttp + const SecurityTypeOAuth2 + const SecurityTypeOpenIdConnect + type Server struct + func NewServer(url string) *Server + func (i *Server) UnmarshalJSON(data []byte) error + func (i Server) MarshalJSON() ([]byte, error) + type ServerObject struct + Description string + URL string + Variables map[string]*ServerVariable + func (o *ServerObject) AddVariable(key string, v *ServerVariable) + type ServerVariable struct + func NewServerVariable(defaultValue string) *ServerVariable + func (i *ServerVariable) UnmarshalJSON(data []byte) error + func (i ServerVariable) MarshalJSON() ([]byte, error) + type ServerVariableObject struct + Default string + Description string + Enum []string + type SpecExtensions struct + Extensions map[string]interface{} + func (v *SpecExtensions) AddExtension(key string, value interface{}) + func (v *SpecExtensions) UnmarshalJSON(data []byte) error + func (v SpecExtensions) MarshalJSON() ([]byte, error) + type StringRefer struct + Ref string + func (ref StringRefer) RefString() string + type Tag struct + func NewTag(name string) *Tag + func (i *Tag) UnmarshalJSON(data []byte) error + func (i Tag) MarshalJSON() ([]byte, error) + type TagObject struct + Description string + ExternalDocs *ExternalDoc + Name string + type Type string + const TypeArray + const TypeBoolean + const TypeInteger + const TypeNumber + const TypeObject + const TypeString + type WithCallbacks struct + Callbacks map[string]*Callback + func (o *WithCallbacks) AddCallback(name string, c *Callback) + type WithContent struct + Content map[string]*MediaType + func (o *WithContent) AddContent(contentType string, mt *MediaType) + type WithContentOrSchema struct + Schema *Schema + func (o *WithContentOrSchema) AddContent(contentType string, mt *MediaType) + func (o *WithContentOrSchema) SetSchema(s *Schema) + type WithEncoding struct + Encoding map[string]*Encoding + func (o *WithEncoding) AddEncoding(name string, e *Encoding) + type WithExamples struct + Examples map[string]*Example + func (o *WithExamples) AddExample(name string, e *Example) + type WithHeaders struct + Headers map[string]*Header + func (object *WithHeaders) AddHeader(name string, h *Header) + type WithLinks struct + Links map[string]*Link + func (object *WithLinks) AddLink(name string, l *Link) + type WithParameters struct + Parameters []*Parameter + func (object *WithParameters) AddParameter(p *Parameter) + type WithSecurityRequirement struct + Security []*SecurityRequirement + func (o *WithSecurityRequirement) AddSecurityRequirement(sr *SecurityRequirement) + type WithSecuritySchemes struct + SecuritySchemes map[string]*SecurityScheme + func (o *WithSecuritySchemes) AddSecurityScheme(name string, ss *SecurityScheme) + type WithServers struct + Servers []*Server + func (o *WithServers) AddServer(s *Server) + type WithTags struct + Tags []*Tag + func (o *WithTags) AddTag(t *Tag) + type XML struct + Attribute bool + Name string + Namespace string + Prefix string + Wrapped bool