Documentation
¶
Index ¶
- type Contact
- func (c *Contact) Email() string
- func (c *Contact) MarshalFields() []shared.Field
- func (c *Contact) MarshalJSON() ([]byte, error)
- func (c *Contact) MarshalYAML() (interface{}, error)
- func (c *Contact) Name() string
- func (c *Contact) SetEmail(email string) error
- func (c *Contact) SetName(name string) error
- func (c *Contact) SetURL(url string) error
- func (c *Contact) URL() string
- type ElementBase
- type ExternalDocs
- func (ed *ExternalDocs) Description() string
- func (ed *ExternalDocs) MarshalFields() []shared.Field
- func (ed *ExternalDocs) MarshalJSON() ([]byte, error)
- func (ed *ExternalDocs) MarshalYAML() (interface{}, error)
- func (ed *ExternalDocs) SetDescription(description string) error
- func (ed *ExternalDocs) SetURL(url string) error
- func (ed *ExternalDocs) URL() string
- type Header
- func (h *Header) CollectionFormat() string
- func (h *Header) Default() interface{}
- func (h *Header) Description() string
- func (h *Header) Enum() []interface{}
- func (h *Header) ExclusiveMaximum() bool
- func (h *Header) ExclusiveMinimum() bool
- func (h *Header) Format() string
- func (h *Header) Items() *Items
- func (h *Header) MarshalFields() []shared.Field
- func (h *Header) MarshalJSON() ([]byte, error)
- func (h *Header) MarshalYAML() (interface{}, error)
- func (h *Header) MaxItems() *uint64
- func (h *Header) MaxLength() *uint64
- func (h *Header) Maximum() *float64
- func (h *Header) MinItems() *uint64
- func (h *Header) MinLength() *uint64
- func (h *Header) Minimum() *float64
- func (h *Header) MultipleOf() *float64
- func (h *Header) Pattern() string
- func (h *Header) SetCollectionFormat(collectionFormat string) error
- func (h *Header) SetDefault(defaultVal interface{}) error
- func (h *Header) SetDescription(description string) error
- func (h *Header) SetEnum(enum []interface{}) error
- func (h *Header) SetExclusiveMaximum(exclusiveMaximum bool) error
- func (h *Header) SetExclusiveMinimum(exclusiveMinimum bool) error
- func (h *Header) SetFormat(format string) error
- func (h *Header) SetItems(items *Items) error
- func (h *Header) SetMaxItems(maxItems *uint64) error
- func (h *Header) SetMaxLength(maxLength *uint64) error
- func (h *Header) SetMaximum(maximum *float64) error
- func (h *Header) SetMinItems(minItems *uint64) error
- func (h *Header) SetMinLength(minLength *uint64) error
- func (h *Header) SetMinimum(minimum *float64) error
- func (h *Header) SetMultipleOf(multipleOf *float64) error
- func (h *Header) SetPattern(pattern string) error
- func (h *Header) SetType(headerType string) error
- func (h *Header) SetUniqueItems(uniqueItems bool) error
- func (h *Header) Type() string
- func (h *Header) UniqueItems() bool
- type HeaderFields
- type Info
- func (i *Info) Contact() *Contact
- func (i *Info) Description() string
- func (i *Info) License() *License
- func (i *Info) MarshalFields() []shared.Field
- func (i *Info) MarshalJSON() ([]byte, error)
- func (i *Info) MarshalYAML() (interface{}, error)
- func (i *Info) SetContact(contact *Contact) error
- func (i *Info) SetDescription(description string) error
- func (i *Info) SetLicense(license *License) error
- func (i *Info) SetTermsOfService(termsOfService string) error
- func (i *Info) SetTitle(title string) error
- func (i *Info) SetVersion(version string) error
- func (i *Info) TermsOfService() string
- func (i *Info) Title() string
- func (i *Info) Version() string
- type Items
- func (it *Items) CollectionFormat() string
- func (it *Items) Default() interface{}
- func (it *Items) Enum() []interface{}
- func (it *Items) ExclusiveMaximum() bool
- func (it *Items) ExclusiveMinimum() bool
- func (it *Items) Format() string
- func (it *Items) Items() *Items
- func (it *Items) MarshalFields() []shared.Field
- func (it *Items) MarshalJSON() ([]byte, error)
- func (it *Items) MarshalYAML() (interface{}, error)
- func (it *Items) MaxItems() *uint64
- func (it *Items) MaxLength() *uint64
- func (it *Items) Maximum() *float64
- func (it *Items) MinItems() *uint64
- func (it *Items) MinLength() *uint64
- func (it *Items) Minimum() *float64
- func (it *Items) MultipleOf() *float64
- func (it *Items) Pattern() string
- func (it *Items) SetCollectionFormat(collectionFormat string) error
- func (it *Items) SetDefault(defaultVal interface{}) error
- func (it *Items) SetEnum(enum []interface{}) error
- func (it *Items) SetExclusiveMaximum(exclusiveMaximum bool) error
- func (it *Items) SetExclusiveMinimum(exclusiveMinimum bool) error
- func (it *Items) SetFormat(format string) error
- func (it *Items) SetItems(items *Items) error
- func (it *Items) SetMaxItems(maxItems *uint64) error
- func (it *Items) SetMaxLength(maxLength *uint64) error
- func (it *Items) SetMaximum(maximum *float64) error
- func (it *Items) SetMinItems(minItems *uint64) error
- func (it *Items) SetMinLength(minLength *uint64) error
- func (it *Items) SetMinimum(minimum *float64) error
- func (it *Items) SetMultipleOf(multipleOf *float64) error
- func (it *Items) SetPattern(pattern string) error
- func (it *Items) SetType(itemType string) error
- func (it *Items) SetUniqueItems(uniqueItems bool) error
- func (it *Items) Type() string
- func (it *Items) UniqueItems() bool
- type ItemsFields
- type License
- func (l *License) MarshalFields() []shared.Field
- func (l *License) MarshalJSON() ([]byte, error)
- func (l *License) MarshalYAML() (interface{}, error)
- func (l *License) Name() string
- func (l *License) SetName(name string) error
- func (l *License) SetURL(url string) error
- func (l *License) URL() string
- type Location
- type NodeSource
- type Operation
- func (o *Operation) Consumes() []string
- func (o *Operation) Deprecated() bool
- func (o *Operation) Description() string
- func (o *Operation) ExternalDocs() *ExternalDocs
- func (o *Operation) MarshalFields() []shared.Field
- func (o *Operation) MarshalJSON() ([]byte, error)
- func (o *Operation) MarshalYAML() (interface{}, error)
- func (o *Operation) OperationID() string
- func (o *Operation) Parameters() []*RefParameter
- func (o *Operation) Produces() []string
- func (o *Operation) Responses() *Responses
- func (o *Operation) Schemes() []string
- func (o *Operation) Security() []SecurityRequirement
- func (o *Operation) SetConsumes(consumes []string) error
- func (o *Operation) SetDeprecated(deprecated bool) error
- func (o *Operation) SetDescription(description string) error
- func (o *Operation) SetExternalDocs(externalDocs *ExternalDocs) error
- func (o *Operation) SetOperationID(operationID string) error
- func (o *Operation) SetParameters(parameters []*RefParameter) error
- func (o *Operation) SetProduces(produces []string) error
- func (o *Operation) SetResponses(responses *Responses) error
- func (o *Operation) SetSchemes(schemes []string) error
- func (o *Operation) SetSecurity(security []SecurityRequirement) error
- func (o *Operation) SetSummary(summary string) error
- func (o *Operation) SetTags(tags []string) error
- func (o *Operation) Summary() string
- func (o *Operation) Tags() []string
- type Parameter
- func (p *Parameter) AllowEmptyValue() bool
- func (p *Parameter) CollectionFormat() string
- func (p *Parameter) Default() interface{}
- func (p *Parameter) Description() string
- func (p *Parameter) Enum() []interface{}
- func (p *Parameter) ExclusiveMaximum() bool
- func (p *Parameter) ExclusiveMinimum() bool
- func (p *Parameter) Format() string
- func (p *Parameter) In() string
- func (p *Parameter) Items() *Items
- func (p *Parameter) MarshalFields() []shared.Field
- func (p *Parameter) MarshalJSON() ([]byte, error)
- func (p *Parameter) MarshalYAML() (interface{}, error)
- func (p *Parameter) MaxItems() *uint64
- func (p *Parameter) MaxLength() *uint64
- func (p *Parameter) Maximum() *float64
- func (p *Parameter) MinItems() *uint64
- func (p *Parameter) MinLength() *uint64
- func (p *Parameter) Minimum() *float64
- func (p *Parameter) MultipleOf() *float64
- func (p *Parameter) Name() string
- func (p *Parameter) Pattern() string
- func (p *Parameter) Required() bool
- func (p *Parameter) Schema() *RefSchema
- func (p *Parameter) SetAllowEmptyValue(allowEmptyValue bool) error
- func (p *Parameter) SetCollectionFormat(collectionFormat string) error
- func (p *Parameter) SetDefault(defaultVal interface{}) error
- func (p *Parameter) SetDescription(description string) error
- func (p *Parameter) SetEnum(enum []interface{}) error
- func (p *Parameter) SetExclusiveMaximum(exclusiveMaximum bool) error
- func (p *Parameter) SetExclusiveMinimum(exclusiveMinimum bool) error
- func (p *Parameter) SetFormat(format string) error
- func (p *Parameter) SetIn(in string) error
- func (p *Parameter) SetItems(items *Items) error
- func (p *Parameter) SetMaxItems(maxItems *uint64) error
- func (p *Parameter) SetMaxLength(maxLength *uint64) error
- func (p *Parameter) SetMaximum(maximum *float64) error
- func (p *Parameter) SetMinItems(minItems *uint64) error
- func (p *Parameter) SetMinLength(minLength *uint64) error
- func (p *Parameter) SetMinimum(minimum *float64) error
- func (p *Parameter) SetMultipleOf(multipleOf *float64) error
- func (p *Parameter) SetName(name string) error
- func (p *Parameter) SetPattern(pattern string) error
- func (p *Parameter) SetRequired(required bool) error
- func (p *Parameter) SetSchema(schema *RefSchema) error
- func (p *Parameter) SetType(paramType string) error
- func (p *Parameter) SetUniqueItems(uniqueItems bool) error
- func (p *Parameter) Type() string
- func (p *Parameter) UniqueItems() bool
- type ParameterFields
- type ParseError
- type PathItem
- func (pi *PathItem) Delete() *Operation
- func (pi *PathItem) Get() *Operation
- func (pi *PathItem) Head() *Operation
- func (pi *PathItem) MarshalFields() []shared.Field
- func (pi *PathItem) MarshalJSON() ([]byte, error)
- func (pi *PathItem) MarshalYAML() (interface{}, error)
- func (pi *PathItem) Options() *Operation
- func (pi *PathItem) Parameters() []*RefParameter
- func (pi *PathItem) Patch() *Operation
- func (pi *PathItem) Post() *Operation
- func (pi *PathItem) Put() *Operation
- func (pi *PathItem) Ref() string
- func (pi *PathItem) SetDelete(delete *Operation) error
- func (pi *PathItem) SetGet(get *Operation) error
- func (pi *PathItem) SetHead(head *Operation) error
- func (pi *PathItem) SetOptions(options *Operation) error
- func (pi *PathItem) SetParameters(parameters []*RefParameter) error
- func (pi *PathItem) SetPatch(patch *Operation) error
- func (pi *PathItem) SetPost(post *Operation) error
- func (pi *PathItem) SetPut(put *Operation) error
- func (pi *PathItem) SetRef(ref string) error
- type Paths
- type RefParameter
- type RefResponse
- type RefSchema
- type Response
- func (r *Response) Description() string
- func (r *Response) Examples() map[string]interface{}
- func (r *Response) Headers() map[string]*Header
- func (r *Response) MarshalFields() []shared.Field
- func (r *Response) MarshalJSON() ([]byte, error)
- func (r *Response) MarshalYAML() (interface{}, error)
- func (r *Response) Schema() *RefSchema
- func (r *Response) SetDescription(description string) error
- func (r *Response) SetExamples(examples map[string]interface{}) error
- func (r *Response) SetHeaders(headers map[string]*Header) error
- func (r *Response) SetSchema(schema *RefSchema) error
- type Responses
- func (r *Responses) Codes() map[string]*RefResponse
- func (r *Responses) Default() *RefResponse
- func (r *Responses) MarshalFields() []shared.Field
- func (r *Responses) MarshalJSON() ([]byte, error)
- func (r *Responses) MarshalYAML() (interface{}, error)
- func (r *Responses) SetCodes(codes map[string]*RefResponse) error
- func (r *Responses) SetDefault(defaultResp *RefResponse) error
- type Schema
- func (s *Schema) AdditionalProperties() *RefSchema
- func (s *Schema) AdditionalPropertiesAllowed() *bool
- func (s *Schema) AllOf() []*RefSchema
- func (s *Schema) Default() interface{}
- func (s *Schema) Description() string
- func (s *Schema) Discriminator() string
- func (s *Schema) Enum() []interface{}
- func (s *Schema) Example() interface{}
- func (s *Schema) ExclusiveMaximum() bool
- func (s *Schema) ExclusiveMinimum() bool
- func (s *Schema) ExternalDocs() *ExternalDocs
- func (s *Schema) Format() string
- func (s *Schema) Items() *RefSchema
- func (s *Schema) MarshalFields() []shared.Field
- func (s *Schema) MarshalJSON() ([]byte, error)
- func (s *Schema) MarshalYAML() (interface{}, error)
- func (s *Schema) MaxItems() *uint64
- func (s *Schema) MaxLength() *uint64
- func (s *Schema) MaxProperties() *uint64
- func (s *Schema) Maximum() *float64
- func (s *Schema) MinItems() *uint64
- func (s *Schema) MinLength() *uint64
- func (s *Schema) MinProperties() *uint64
- func (s *Schema) Minimum() *float64
- func (s *Schema) MultipleOf() *float64
- func (s *Schema) Pattern() string
- func (s *Schema) Properties() map[string]*RefSchema
- func (s *Schema) ReadOnly() bool
- func (s *Schema) Required() []string
- func (s *Schema) SetAdditionalProperties(additionalProperties *RefSchema) error
- func (s *Schema) SetAdditionalPropertiesAllowed(additionalPropertiesAllowed *bool) error
- func (s *Schema) SetAllOf(allOf []*RefSchema) error
- func (s *Schema) SetDefault(defaultVal interface{}) error
- func (s *Schema) SetDescription(description string) error
- func (s *Schema) SetDiscriminator(discriminator string) error
- func (s *Schema) SetEnum(enum []interface{}) error
- func (s *Schema) SetExample(example interface{}) error
- func (s *Schema) SetExclusiveMaximum(exclusiveMaximum bool) error
- func (s *Schema) SetExclusiveMinimum(exclusiveMinimum bool) error
- func (s *Schema) SetExternalDocs(externalDocs *ExternalDocs) error
- func (s *Schema) SetFormat(format string) error
- func (s *Schema) SetItems(items *RefSchema) error
- func (s *Schema) SetMaxItems(maxItems *uint64) error
- func (s *Schema) SetMaxLength(maxLength *uint64) error
- func (s *Schema) SetMaxProperties(maxProperties *uint64) error
- func (s *Schema) SetMaximum(maximum *float64) error
- func (s *Schema) SetMinItems(minItems *uint64) error
- func (s *Schema) SetMinLength(minLength *uint64) error
- func (s *Schema) SetMinProperties(minProperties *uint64) error
- func (s *Schema) SetMinimum(minimum *float64) error
- func (s *Schema) SetMultipleOf(multipleOf *float64) error
- func (s *Schema) SetPattern(pattern string) error
- func (s *Schema) SetProperties(properties map[string]*RefSchema) error
- func (s *Schema) SetReadOnly(readOnly bool) error
- func (s *Schema) SetRequired(required []string) error
- func (s *Schema) SetTitle(title string) error
- func (s *Schema) SetType(schemaType string) error
- func (s *Schema) SetUniqueItems(uniqueItems bool) error
- func (s *Schema) SetXML(xml *XML) error
- func (s *Schema) Title() string
- func (s *Schema) Type() string
- func (s *Schema) UniqueItems() bool
- func (s *Schema) XML() *XML
- type SchemaFields
- type SecurityRequirement
- type SecurityScheme
- func (s *SecurityScheme) AuthorizationURL() string
- func (s *SecurityScheme) Description() string
- func (s *SecurityScheme) Flow() string
- func (s *SecurityScheme) In() string
- func (s *SecurityScheme) MarshalFields() []shared.Field
- func (s *SecurityScheme) MarshalJSON() ([]byte, error)
- func (s *SecurityScheme) MarshalYAML() (interface{}, error)
- func (s *SecurityScheme) Name() string
- func (s *SecurityScheme) Scopes() map[string]string
- func (s *SecurityScheme) SetAuthorizationURL(authorizationURL string) error
- func (s *SecurityScheme) SetDescription(description string) error
- func (s *SecurityScheme) SetFlow(flow string) error
- func (s *SecurityScheme) SetIn(in string) error
- func (s *SecurityScheme) SetName(name string) error
- func (s *SecurityScheme) SetScopes(scopes map[string]string) error
- func (s *SecurityScheme) SetTokenURL(tokenURL string) error
- func (s *SecurityScheme) SetType(securityType string) error
- func (s *SecurityScheme) TokenURL() string
- func (s *SecurityScheme) Type() string
- type Swagger
- func (s *Swagger) BasePath() string
- func (s *Swagger) Consumes() []string
- func (s *Swagger) Definitions() map[string]*RefSchema
- func (s *Swagger) ExternalDocs() *ExternalDocs
- func (s *Swagger) Host() string
- func (s *Swagger) Info() *Info
- func (s *Swagger) MarshalFields() []shared.Field
- func (s *Swagger) MarshalJSON() ([]byte, error)
- func (s *Swagger) MarshalYAML() (interface{}, error)
- func (s *Swagger) Parameters() map[string]*RefParameter
- func (s *Swagger) Paths() *Paths
- func (s *Swagger) Produces() []string
- func (s *Swagger) Responses() map[string]*RefResponse
- func (s *Swagger) Schemes() []string
- func (s *Swagger) Security() []SecurityRequirement
- func (s *Swagger) SecurityDefinitions() map[string]*SecurityScheme
- func (s *Swagger) SetBasePath(basePath string) error
- func (s *Swagger) SetConsumes(consumes []string) error
- func (s *Swagger) SetDefinitions(definitions map[string]*RefSchema) error
- func (s *Swagger) SetExternalDocs(externalDocs *ExternalDocs) error
- func (s *Swagger) SetHost(host string) error
- func (s *Swagger) SetInfo(info *Info) error
- func (s *Swagger) SetParameters(parameters map[string]*RefParameter) error
- func (s *Swagger) SetPaths(paths *Paths) error
- func (s *Swagger) SetProduces(produces []string) error
- func (s *Swagger) SetProperty(key string, value interface{})
- func (s *Swagger) SetResponses(responses map[string]*RefResponse) error
- func (s *Swagger) SetSchemes(schemes []string) error
- func (s *Swagger) SetSecurity(security []SecurityRequirement) error
- func (s *Swagger) SetSecurityDefinitions(securityDefinitions map[string]*SecurityScheme) error
- func (s *Swagger) SetSwaggerVersion(swagger string) error
- func (s *Swagger) SetTags(tags []*Tag) error
- func (s *Swagger) SwaggerVersion() string
- func (s *Swagger) Tags() []*Tag
- type Tag
- func (t *Tag) Description() string
- func (t *Tag) ExternalDocs() *ExternalDocs
- func (t *Tag) MarshalFields() []shared.Field
- func (t *Tag) MarshalJSON() ([]byte, error)
- func (t *Tag) MarshalYAML() (interface{}, error)
- func (t *Tag) Name() string
- func (t *Tag) SetDescription(description string) error
- func (t *Tag) SetExternalDocs(externalDocs *ExternalDocs) error
- func (t *Tag) SetName(name string) error
- type Trix
- type XML
- func (x *XML) Attribute() bool
- func (x *XML) MarshalFields() []shared.Field
- func (x *XML) MarshalJSON() ([]byte, error)
- func (x *XML) MarshalYAML() (interface{}, error)
- func (x *XML) Name() string
- func (x *XML) Namespace() string
- func (x *XML) Prefix() string
- func (x *XML) SetAttribute(attribute bool) error
- func (x *XML) SetName(name string) error
- func (x *XML) SetNamespace(namespace string) error
- func (x *XML) SetPrefix(prefix string) error
- func (x *XML) SetWrapped(wrapped bool) error
- func (x *XML) Wrapped() bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Contact ¶
type Contact struct {
ElementBase // embedded - provides VendorExtensions and Trix
// contains filtered or unexported fields
}
Contact provides contact information for the API. https://swagger.io/specification/v2/#contact-object
func NewContact ¶
NewContact creates a new Contact instance.
func (*Contact) MarshalFields ¶
MarshalFields implements shared.MarshalFieldsProvider for export.
func (*Contact) MarshalJSON ¶
func (*Contact) MarshalYAML ¶
type ElementBase ¶
type ElementBase = shared.ElementBase
ElementBase is embedded in all v20 types to provide vendor extensions and library metadata.
type ExternalDocs ¶
type ExternalDocs struct {
ElementBase // embedded - provides VendorExtensions and Trix
// contains filtered or unexported fields
}
ExternalDocs allows referencing external documentation. https://swagger.io/specification/v2/#external-documentation-object
func NewExternalDocs ¶
func NewExternalDocs(description, url string) *ExternalDocs
NewExternalDocs creates a new ExternalDocs instance.
func (*ExternalDocs) Description ¶
func (ed *ExternalDocs) Description() string
func (*ExternalDocs) MarshalFields ¶
func (ed *ExternalDocs) MarshalFields() []shared.Field
MarshalFields implements shared.MarshalFieldsProvider for export.
func (*ExternalDocs) MarshalJSON ¶
func (ed *ExternalDocs) MarshalJSON() ([]byte, error)
func (*ExternalDocs) MarshalYAML ¶
func (ed *ExternalDocs) MarshalYAML() (interface{}, error)
func (*ExternalDocs) SetDescription ¶
func (ed *ExternalDocs) SetDescription(description string) error
func (*ExternalDocs) SetURL ¶
func (ed *ExternalDocs) SetURL(url string) error
func (*ExternalDocs) URL ¶
func (ed *ExternalDocs) URL() string
type Header ¶
type Header struct {
ElementBase // embedded - provides VendorExtensions and Trix
// contains filtered or unexported fields
}
Header represents a Header Object in a response. https://swagger.io/specification/v2/#header-object
func (*Header) CollectionFormat ¶
func (*Header) Description ¶
func (*Header) ExclusiveMaximum ¶
func (*Header) ExclusiveMinimum ¶
func (*Header) MarshalFields ¶
MarshalFields implements shared.MarshalFieldsProvider for export.
func (*Header) MarshalJSON ¶
func (*Header) MarshalYAML ¶
func (*Header) MultipleOf ¶
func (*Header) SetCollectionFormat ¶
func (*Header) SetDefault ¶
func (*Header) SetDescription ¶
func (*Header) SetExclusiveMaximum ¶
func (*Header) SetExclusiveMinimum ¶
func (*Header) SetMaxItems ¶
func (*Header) SetMaxLength ¶
func (*Header) SetMaximum ¶
func (*Header) SetMinItems ¶
func (*Header) SetMinLength ¶
func (*Header) SetMinimum ¶
func (*Header) SetMultipleOf ¶
func (*Header) SetPattern ¶
func (*Header) SetUniqueItems ¶
func (*Header) UniqueItems ¶
type HeaderFields ¶
type HeaderFields struct {
Description string
Type string
Format string
Items *Items
CollectionFormat string
Default interface{}
Maximum *float64
ExclusiveMaximum bool
Minimum *float64
ExclusiveMinimum bool
MaxLength *uint64
MinLength *uint64
Pattern string
MaxItems *uint64
MinItems *uint64
UniqueItems bool
Enum []interface{}
MultipleOf *float64
}
HeaderFields groups all header properties for the constructor.
type Info ¶
type Info struct {
ElementBase // embedded - provides VendorExtensions and Trix
// contains filtered or unexported fields
}
Info provides metadata about the API. https://swagger.io/specification/v2/#info-object
func NewInfo ¶
func NewInfo(title, description, termsOfService, version string, contact *Contact, license *License) *Info
NewInfo creates a new Info instance.
func (*Info) Description ¶
func (*Info) MarshalFields ¶
MarshalFields implements shared.MarshalFieldsProvider for export.
func (*Info) MarshalJSON ¶
func (*Info) MarshalYAML ¶
func (*Info) SetContact ¶
func (*Info) SetDescription ¶
func (*Info) SetLicense ¶
func (*Info) SetTermsOfService ¶
func (*Info) SetVersion ¶
func (*Info) TermsOfService ¶
type Items ¶
type Items struct {
ElementBase // embedded - provides VendorExtensions and Trix
// contains filtered or unexported fields
}
Items describes the type of items in an array parameter. https://swagger.io/specification/v2/#items-object
func (*Items) CollectionFormat ¶
func (*Items) ExclusiveMaximum ¶
func (*Items) ExclusiveMinimum ¶
func (*Items) MarshalFields ¶
MarshalFields implements shared.MarshalFieldsProvider for export.
func (*Items) MarshalJSON ¶
func (*Items) MarshalYAML ¶
func (*Items) MultipleOf ¶
func (*Items) SetCollectionFormat ¶
func (*Items) SetDefault ¶
func (*Items) SetExclusiveMaximum ¶
func (*Items) SetExclusiveMinimum ¶
func (*Items) SetMaxItems ¶
func (*Items) SetMaxLength ¶
func (*Items) SetMaximum ¶
func (*Items) SetMinItems ¶
func (*Items) SetMinLength ¶
func (*Items) SetMinimum ¶
func (*Items) SetMultipleOf ¶
func (*Items) SetPattern ¶
func (*Items) SetUniqueItems ¶
func (*Items) UniqueItems ¶
type ItemsFields ¶
type ItemsFields struct {
Type string
Format string
Items *Items
CollectionFormat string
Default interface{}
Maximum *float64
ExclusiveMaximum bool
Minimum *float64
ExclusiveMinimum bool
MaxLength *uint64
MinLength *uint64
Pattern string
MaxItems *uint64
MinItems *uint64
UniqueItems bool
Enum []interface{}
MultipleOf *float64
}
ItemsFields groups all items properties for the constructor.
type License ¶
type License struct {
ElementBase // embedded - provides VendorExtensions and Trix
// contains filtered or unexported fields
}
License provides license information for the API. https://swagger.io/specification/v2/#license-object
func NewLicense ¶
NewLicense creates a new License instance.
func (*License) MarshalFields ¶
MarshalFields implements shared.MarshalFieldsProvider for export.
func (*License) MarshalJSON ¶
func (*License) MarshalYAML ¶
type NodeSource ¶
type NodeSource = shared.NodeSource
type Operation ¶
type Operation struct {
ElementBase // embedded - provides VendorExtensions and Trix
// contains filtered or unexported fields
}
Operation describes a single API operation on a path. https://swagger.io/specification/v2/#operation-object
func NewOperation ¶
func NewOperation( tags []string, summary, description string, externalDocs *ExternalDocs, operationID string, consumes, produces []string, parameters []*RefParameter, responses *Responses, schemes []string, deprecated bool, security []SecurityRequirement, ) *Operation
NewOperation creates a new Operation instance.
func (*Operation) Deprecated ¶
func (*Operation) Description ¶
func (*Operation) ExternalDocs ¶
func (o *Operation) ExternalDocs() *ExternalDocs
func (*Operation) MarshalFields ¶
MarshalFields implements shared.MarshalFieldsProvider for export.
func (*Operation) MarshalJSON ¶
func (*Operation) MarshalYAML ¶
func (*Operation) OperationID ¶
func (*Operation) Parameters ¶
func (o *Operation) Parameters() []*RefParameter
func (*Operation) Security ¶
func (o *Operation) Security() []SecurityRequirement
func (*Operation) SetConsumes ¶
func (*Operation) SetDeprecated ¶
func (*Operation) SetDescription ¶
func (*Operation) SetExternalDocs ¶
func (o *Operation) SetExternalDocs(externalDocs *ExternalDocs) error
func (*Operation) SetOperationID ¶
func (*Operation) SetParameters ¶
func (o *Operation) SetParameters(parameters []*RefParameter) error
func (*Operation) SetProduces ¶
func (*Operation) SetResponses ¶
func (*Operation) SetSchemes ¶
func (*Operation) SetSecurity ¶
func (o *Operation) SetSecurity(security []SecurityRequirement) error
func (*Operation) SetSummary ¶
type Parameter ¶
type Parameter struct {
ElementBase // embedded - provides VendorExtensions and Trix
// contains filtered or unexported fields
}
Parameter describes a single operation parameter. https://swagger.io/specification/v2/#parameter-object
func NewParameter ¶
func NewParameter(f ParameterFields) *Parameter
NewParameter creates a new Parameter instance.
func (*Parameter) AllowEmptyValue ¶
func (*Parameter) CollectionFormat ¶
func (*Parameter) Description ¶
func (*Parameter) ExclusiveMaximum ¶
func (*Parameter) ExclusiveMinimum ¶
func (*Parameter) MarshalFields ¶
MarshalFields implements shared.MarshalFieldsProvider for export.
func (*Parameter) MarshalJSON ¶
func (*Parameter) MarshalYAML ¶
func (*Parameter) MultipleOf ¶
func (*Parameter) SetAllowEmptyValue ¶
func (*Parameter) SetCollectionFormat ¶
func (*Parameter) SetDefault ¶
func (*Parameter) SetDescription ¶
func (*Parameter) SetExclusiveMaximum ¶
func (*Parameter) SetExclusiveMinimum ¶
func (*Parameter) SetMaxItems ¶
func (*Parameter) SetMaxLength ¶
func (*Parameter) SetMaximum ¶
func (*Parameter) SetMinItems ¶
func (*Parameter) SetMinLength ¶
func (*Parameter) SetMinimum ¶
func (*Parameter) SetMultipleOf ¶
func (*Parameter) SetPattern ¶
func (*Parameter) SetRequired ¶
func (*Parameter) SetUniqueItems ¶
func (*Parameter) UniqueItems ¶
type ParameterFields ¶
type ParameterFields struct {
Name string
In string
Description string
Required bool
AllowEmptyValue bool
Schema *RefSchema
Type string
Format string
Items *Items
CollectionFormat string
Default interface{}
Maximum *float64
ExclusiveMaximum bool
Minimum *float64
ExclusiveMinimum bool
MaxLength *uint64
MinLength *uint64
Pattern string
MaxItems *uint64
MinItems *uint64
UniqueItems bool
Enum []interface{}
MultipleOf *float64
}
ParameterFields groups all parameter properties for the constructor.
type ParseError ¶
type ParseError = shared.ParseError
type PathItem ¶
type PathItem struct {
ElementBase // embedded - provides VendorExtensions and Trix
// contains filtered or unexported fields
}
PathItem describes operations available on a single path. https://swagger.io/specification/v2/#path-item-object
func NewPathItem ¶
func NewPathItem( ref string, get, put, post, del, options, head, patch *Operation, parameters []*RefParameter, ) *PathItem
NewPathItem creates a new PathItem instance.
func (*PathItem) MarshalFields ¶
MarshalFields implements shared.MarshalFieldsProvider for export.
func (*PathItem) MarshalJSON ¶
func (*PathItem) MarshalYAML ¶
func (*PathItem) Parameters ¶
func (pi *PathItem) Parameters() []*RefParameter
func (*PathItem) SetOptions ¶
func (*PathItem) SetParameters ¶
func (pi *PathItem) SetParameters(parameters []*RefParameter) error
type Paths ¶
type Paths struct {
ElementBase // embedded - provides VendorExtensions and Trix
// contains filtered or unexported fields
}
Paths holds the relative paths to individual endpoints. https://swagger.io/specification/v2/#paths-object
func (*Paths) MarshalFields ¶
MarshalFields implements shared.MarshalFieldsProvider for export.
func (*Paths) MarshalJSON ¶
func (*Paths) MarshalYAML ¶
type RefParameter ¶
func NewRefParameter ¶
func NewRefParameter(ref string) *RefParameter
NewRefParameter creates a Ref to a Parameter.
type RefResponse ¶
func NewRefResponse ¶
func NewRefResponse(ref string) *RefResponse
NewRefResponse creates a Ref to a Response.
type RefSchema ¶
Ref type aliases — use these instead of shared.Ref[T] throughout the package.
func NewRefSchema ¶
NewRefSchema creates a Ref to a Schema.
type Response ¶
type Response struct {
ElementBase // embedded - provides VendorExtensions and Trix
// contains filtered or unexported fields
}
Response describes a single response from an API operation. https://swagger.io/specification/v2/#response-object
func NewResponse ¶
func NewResponse(description string, schema *RefSchema, headers map[string]*Header, examples map[string]interface{}) *Response
NewResponse creates a new Response instance.
func (*Response) Description ¶
func (*Response) MarshalFields ¶
MarshalFields implements shared.MarshalFieldsProvider for export.
func (*Response) MarshalJSON ¶
func (*Response) MarshalYAML ¶
func (*Response) SetDescription ¶
func (*Response) SetExamples ¶
type Responses ¶
type Responses struct {
ElementBase // embedded - provides VendorExtensions and Trix
// contains filtered or unexported fields
}
Responses is a container for expected responses of an operation. https://swagger.io/specification/v2/#responses-object
func NewResponses ¶
func NewResponses(defaultResp *RefResponse, codes map[string]*RefResponse) *Responses
NewResponses creates a new Responses instance.
func (*Responses) Codes ¶
func (r *Responses) Codes() map[string]*RefResponse
func (*Responses) Default ¶
func (r *Responses) Default() *RefResponse
func (*Responses) MarshalFields ¶
MarshalFields implements shared.MarshalFieldsProvider for export.
func (*Responses) MarshalJSON ¶
func (*Responses) MarshalYAML ¶
func (*Responses) SetDefault ¶
func (r *Responses) SetDefault(defaultResp *RefResponse) error
type Schema ¶
type Schema struct {
ElementBase // embedded - provides VendorExtensions and Trix
// contains filtered or unexported fields
}
Schema represents the Swagger 2.0 Schema Object (JSON Schema subset). https://swagger.io/specification/v2/#schema-object
func (*Schema) AdditionalProperties ¶
func (*Schema) AdditionalPropertiesAllowed ¶
func (*Schema) Description ¶
func (*Schema) Discriminator ¶
func (*Schema) ExclusiveMaximum ¶
func (*Schema) ExclusiveMinimum ¶
func (*Schema) ExternalDocs ¶
func (s *Schema) ExternalDocs() *ExternalDocs
func (*Schema) MarshalFields ¶
MarshalFields implements shared.MarshalFieldsProvider for export.
func (*Schema) MarshalJSON ¶
func (*Schema) MarshalYAML ¶
func (*Schema) MaxProperties ¶
func (*Schema) MinProperties ¶
func (*Schema) MultipleOf ¶
func (*Schema) Properties ¶
func (*Schema) SetAdditionalProperties ¶
func (*Schema) SetAdditionalPropertiesAllowed ¶
func (*Schema) SetDefault ¶
func (*Schema) SetDescription ¶
func (*Schema) SetDiscriminator ¶
func (*Schema) SetExample ¶
func (*Schema) SetExclusiveMaximum ¶
func (*Schema) SetExclusiveMinimum ¶
func (*Schema) SetExternalDocs ¶
func (s *Schema) SetExternalDocs(externalDocs *ExternalDocs) error
func (*Schema) SetMaxItems ¶
func (*Schema) SetMaxLength ¶
func (*Schema) SetMaxProperties ¶
func (*Schema) SetMaximum ¶
func (*Schema) SetMinItems ¶
func (*Schema) SetMinLength ¶
func (*Schema) SetMinProperties ¶
func (*Schema) SetMinimum ¶
func (*Schema) SetMultipleOf ¶
func (*Schema) SetPattern ¶
func (*Schema) SetProperties ¶
func (*Schema) SetReadOnly ¶
func (*Schema) SetRequired ¶
func (*Schema) SetUniqueItems ¶
func (*Schema) UniqueItems ¶
type SchemaFields ¶
type SchemaFields struct {
Title string
Description string
Default interface{}
MultipleOf *float64
Maximum *float64
ExclusiveMaximum bool
Minimum *float64
ExclusiveMinimum bool
MaxLength *uint64
MinLength *uint64
Pattern string
MaxItems *uint64
MinItems *uint64
UniqueItems bool
MaxProperties *uint64
MinProperties *uint64
Required []string
Enum []interface{}
Type string
Format string
AllOf []*RefSchema
Items *RefSchema
Properties map[string]*RefSchema
AdditionalProperties *RefSchema
AdditionalPropertiesAllowed *bool
Discriminator string
ReadOnly bool
XML *XML
ExternalDocs *ExternalDocs
Example interface{}
}
SchemaFields groups all schema properties for the constructor.
type SecurityRequirement ¶
SecurityRequirement lists required security schemes to execute an operation. https://swagger.io/specification/v2/#security-requirement-object
type SecurityScheme ¶
type SecurityScheme struct {
ElementBase // embedded - provides VendorExtensions and Trix
// contains filtered or unexported fields
}
SecurityScheme defines a security scheme for the API. https://swagger.io/specification/v2/#security-scheme-object
func NewSecurityScheme ¶
func NewSecurityScheme( securityType, description, name, in, flow, authorizationURL, tokenURL string, scopes map[string]string, ) *SecurityScheme
NewSecurityScheme creates a new SecurityScheme instance.
func (*SecurityScheme) AuthorizationURL ¶
func (s *SecurityScheme) AuthorizationURL() string
func (*SecurityScheme) Description ¶
func (s *SecurityScheme) Description() string
func (*SecurityScheme) Flow ¶
func (s *SecurityScheme) Flow() string
func (*SecurityScheme) In ¶
func (s *SecurityScheme) In() string
func (*SecurityScheme) MarshalFields ¶
func (s *SecurityScheme) MarshalFields() []shared.Field
MarshalFields implements shared.MarshalFieldsProvider for export.
func (*SecurityScheme) MarshalJSON ¶
func (s *SecurityScheme) MarshalJSON() ([]byte, error)
func (*SecurityScheme) MarshalYAML ¶
func (s *SecurityScheme) MarshalYAML() (interface{}, error)
func (*SecurityScheme) Name ¶
func (s *SecurityScheme) Name() string
func (*SecurityScheme) Scopes ¶
func (s *SecurityScheme) Scopes() map[string]string
func (*SecurityScheme) SetAuthorizationURL ¶
func (s *SecurityScheme) SetAuthorizationURL(authorizationURL string) error
func (*SecurityScheme) SetDescription ¶
func (s *SecurityScheme) SetDescription(description string) error
func (*SecurityScheme) SetFlow ¶
func (s *SecurityScheme) SetFlow(flow string) error
func (*SecurityScheme) SetIn ¶
func (s *SecurityScheme) SetIn(in string) error
func (*SecurityScheme) SetName ¶
func (s *SecurityScheme) SetName(name string) error
func (*SecurityScheme) SetScopes ¶
func (s *SecurityScheme) SetScopes(scopes map[string]string) error
func (*SecurityScheme) SetTokenURL ¶
func (s *SecurityScheme) SetTokenURL(tokenURL string) error
func (*SecurityScheme) SetType ¶
func (s *SecurityScheme) SetType(securityType string) error
func (*SecurityScheme) TokenURL ¶
func (s *SecurityScheme) TokenURL() string
func (*SecurityScheme) Type ¶
func (s *SecurityScheme) Type() string
type Swagger ¶
type Swagger struct {
ElementBase // embedded - provides VendorExtensions and Trix
// contains filtered or unexported fields
}
Swagger is the root document object of the Swagger 2.0 specification. https://swagger.io/specification/v2/#swagger-object
func (*Swagger) Definitions ¶
func (*Swagger) ExternalDocs ¶
func (s *Swagger) ExternalDocs() *ExternalDocs
func (*Swagger) MarshalFields ¶
MarshalFields implements shared.MarshalFieldsProvider for export.
func (*Swagger) MarshalJSON ¶
func (*Swagger) MarshalYAML ¶
func (*Swagger) Parameters ¶
func (s *Swagger) Parameters() map[string]*RefParameter
func (*Swagger) Responses ¶
func (s *Swagger) Responses() map[string]*RefResponse
func (*Swagger) Security ¶
func (s *Swagger) Security() []SecurityRequirement
func (*Swagger) SecurityDefinitions ¶
func (s *Swagger) SecurityDefinitions() map[string]*SecurityScheme
func (*Swagger) SetBasePath ¶
func (*Swagger) SetConsumes ¶
func (*Swagger) SetDefinitions ¶
func (*Swagger) SetExternalDocs ¶
func (s *Swagger) SetExternalDocs(externalDocs *ExternalDocs) error
func (*Swagger) SetParameters ¶
func (s *Swagger) SetParameters(parameters map[string]*RefParameter) error
func (*Swagger) SetProduces ¶
func (*Swagger) SetProperty ¶
SetProperty sets a property on the Swagger document. Used by parsers for incremental building of the root document where many fields are optional.
func (*Swagger) SetResponses ¶
func (s *Swagger) SetResponses(responses map[string]*RefResponse) error
func (*Swagger) SetSchemes ¶
func (*Swagger) SetSecurity ¶
func (s *Swagger) SetSecurity(security []SecurityRequirement) error
func (*Swagger) SetSecurityDefinitions ¶
func (s *Swagger) SetSecurityDefinitions(securityDefinitions map[string]*SecurityScheme) error
func (*Swagger) SetSwaggerVersion ¶
func (*Swagger) SwaggerVersion ¶
type Tag ¶
type Tag struct {
ElementBase // embedded - provides VendorExtensions and Trix
// contains filtered or unexported fields
}
Tag adds metadata to a single tag used by the Operation Object. https://swagger.io/specification/v2/#tag-object
func NewTag ¶
func NewTag(name, description string, externalDocs *ExternalDocs) *Tag
NewTag creates a new Tag instance.
func (*Tag) Description ¶
func (*Tag) ExternalDocs ¶
func (t *Tag) ExternalDocs() *ExternalDocs
func (*Tag) MarshalFields ¶
MarshalFields implements shared.MarshalFieldsProvider for export.
func (*Tag) MarshalJSON ¶
func (*Tag) MarshalYAML ¶
func (*Tag) SetDescription ¶
func (*Tag) SetExternalDocs ¶
func (t *Tag) SetExternalDocs(externalDocs *ExternalDocs) error
type XML ¶
type XML struct {
ElementBase // embedded - provides VendorExtensions and Trix
// contains filtered or unexported fields
}
XML provides additional metadata for XML serialization. https://swagger.io/specification/v2/#xml-object
func (*XML) MarshalFields ¶
MarshalFields implements shared.MarshalFieldsProvider for export.