Documentation
¶
Index ¶
- type Callback
- type Components
- func (c *Components) Callbacks() map[string]*RefCallback
- func (c *Components) Examples() map[string]*RefExample
- func (c *Components) Headers() map[string]*RefHeader
- func (c *Components) Links() map[string]*RefLink
- func (c *Components) MarshalFields() []shared.Field
- func (c *Components) MarshalJSON() ([]byte, error)
- func (c *Components) MarshalYAML() (interface{}, error)
- func (c *Components) Parameters() map[string]*RefParameter
- func (c *Components) RequestBodies() map[string]*RefRequestBody
- func (c *Components) Responses() map[string]*RefResponse
- func (c *Components) Schemas() map[string]*RefSchema
- func (c *Components) SecuritySchemes() map[string]*RefSecurityScheme
- func (c *Components) SetCallbacks(callbacks map[string]*RefCallback) error
- func (c *Components) SetExamples(examples map[string]*RefExample) error
- func (c *Components) SetHeaders(headers map[string]*RefHeader) error
- func (c *Components) SetLinks(links map[string]*RefLink) error
- func (c *Components) SetParameters(parameters map[string]*RefParameter) error
- func (c *Components) SetRequestBodies(requestBodies map[string]*RefRequestBody) error
- func (c *Components) SetResponses(responses map[string]*RefResponse) error
- func (c *Components) SetSchemas(schemas map[string]*RefSchema) error
- func (c *Components) SetSecuritySchemes(securitySchemes map[string]*RefSecurityScheme) error
- 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 Discriminator
- func (d *Discriminator) Mapping() map[string]string
- func (d *Discriminator) MarshalFields() []shared.Field
- func (d *Discriminator) MarshalJSON() ([]byte, error)
- func (d *Discriminator) MarshalYAML() (interface{}, error)
- func (d *Discriminator) PropertyName() string
- func (d *Discriminator) SetMapping(mapping map[string]string) error
- func (d *Discriminator) SetPropertyName(propertyName string) error
- type ElementBase
- type Encoding
- func (e *Encoding) AllowReserved() bool
- func (e *Encoding) ContentType() string
- func (e *Encoding) Explode() *bool
- func (e *Encoding) Headers() map[string]*RefHeader
- func (e *Encoding) MarshalFields() []shared.Field
- func (e *Encoding) MarshalJSON() ([]byte, error)
- func (e *Encoding) MarshalYAML() (interface{}, error)
- func (e *Encoding) SetAllowReserved(allowReserved bool) error
- func (e *Encoding) SetContentType(contentType string) error
- func (e *Encoding) SetExplode(explode *bool) error
- func (e *Encoding) SetHeaders(headers map[string]*RefHeader) error
- func (e *Encoding) SetStyle(style string) error
- func (e *Encoding) Style() string
- type Example
- func (e *Example) Description() string
- func (e *Example) ExternalValue() string
- func (e *Example) MarshalFields() []shared.Field
- func (e *Example) MarshalJSON() ([]byte, error)
- func (e *Example) MarshalYAML() (interface{}, error)
- func (e *Example) SetDescription(description string) error
- func (e *Example) SetExternalValue(externalValue string) error
- func (e *Example) SetSummary(summary string) error
- func (e *Example) SetValue(value interface{}) error
- func (e *Example) Summary() string
- func (e *Example) Value() interface{}
- type ExternalDocumentation
- func (e *ExternalDocumentation) Description() string
- func (e *ExternalDocumentation) MarshalFields() []shared.Field
- func (e *ExternalDocumentation) MarshalJSON() ([]byte, error)
- func (e *ExternalDocumentation) MarshalYAML() (interface{}, error)
- func (e *ExternalDocumentation) SetDescription(description string) error
- func (e *ExternalDocumentation) SetURL(url string) error
- func (e *ExternalDocumentation) URL() string
- type Header
- func (h *Header) AllowEmptyValue() bool
- func (h *Header) AllowReserved() bool
- func (h *Header) Content() map[string]*MediaType
- func (h *Header) Deprecated() bool
- func (h *Header) Description() string
- func (h *Header) Example() interface{}
- func (h *Header) Examples() map[string]*RefExample
- func (h *Header) Explode() *bool
- func (h *Header) MarshalFields() []shared.Field
- func (h *Header) MarshalJSON() ([]byte, error)
- func (h *Header) MarshalYAML() (interface{}, error)
- func (h *Header) Required() bool
- func (h *Header) Schema() *RefSchema
- func (h *Header) SetAllowEmptyValue(allowEmptyValue bool) error
- func (h *Header) SetAllowReserved(allowReserved bool) error
- func (h *Header) SetContent(content map[string]*MediaType) error
- func (h *Header) SetDeprecated(deprecated bool) error
- func (h *Header) SetDescription(description string) error
- func (h *Header) SetExample(example interface{}) error
- func (h *Header) SetExamples(examples map[string]*RefExample) error
- func (h *Header) SetExplode(explode *bool) error
- func (h *Header) SetRequired(required bool) error
- func (h *Header) SetSchema(schema *RefSchema) error
- func (h *Header) SetStyle(style string) error
- func (h *Header) Style() string
- 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 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 Link
- func (l *Link) Description() string
- func (l *Link) MarshalFields() []shared.Field
- func (l *Link) MarshalJSON() ([]byte, error)
- func (l *Link) MarshalYAML() (interface{}, error)
- func (l *Link) OperationID() string
- func (l *Link) OperationRef() string
- func (l *Link) Parameters() map[string]interface{}
- func (l *Link) RequestBody() interface{}
- func (l *Link) Server() *Server
- func (l *Link) SetDescription(description string) error
- func (l *Link) SetOperationID(operationID string) error
- func (l *Link) SetOperationRef(operationRef string) error
- func (l *Link) SetParameters(parameters map[string]interface{}) error
- func (l *Link) SetRequestBody(requestBody interface{}) error
- func (l *Link) SetServer(server *Server) error
- type Location
- type MediaType
- func (mt *MediaType) Encoding() map[string]*Encoding
- func (mt *MediaType) Example() interface{}
- func (mt *MediaType) Examples() map[string]*RefExample
- func (mt *MediaType) MarshalFields() []shared.Field
- func (mt *MediaType) MarshalJSON() ([]byte, error)
- func (mt *MediaType) MarshalYAML() (interface{}, error)
- func (mt *MediaType) Schema() *RefSchema
- func (mt *MediaType) SetEncoding(encoding map[string]*Encoding) error
- func (mt *MediaType) SetExample(example interface{}) error
- func (mt *MediaType) SetExamples(examples map[string]*RefExample) error
- func (mt *MediaType) SetSchema(schema *RefSchema) error
- type NodeSource
- type OAuthFlow
- func (f *OAuthFlow) AuthorizationURL() string
- func (f *OAuthFlow) MarshalFields() []shared.Field
- func (f *OAuthFlow) MarshalJSON() ([]byte, error)
- func (f *OAuthFlow) MarshalYAML() (interface{}, error)
- func (f *OAuthFlow) RefreshURL() string
- func (f *OAuthFlow) Scopes() map[string]string
- func (f *OAuthFlow) SetAuthorizationURL(authorizationURL string) error
- func (f *OAuthFlow) SetRefreshURL(refreshURL string) error
- func (f *OAuthFlow) SetScopes(scopes map[string]string) error
- func (f *OAuthFlow) SetTokenURL(tokenURL string) error
- func (f *OAuthFlow) TokenURL() string
- type OAuthFlows
- func (f *OAuthFlows) AuthorizationCode() *OAuthFlow
- func (f *OAuthFlows) ClientCredentials() *OAuthFlow
- func (f *OAuthFlows) Implicit() *OAuthFlow
- func (f *OAuthFlows) MarshalFields() []shared.Field
- func (f *OAuthFlows) MarshalJSON() ([]byte, error)
- func (f *OAuthFlows) MarshalYAML() (interface{}, error)
- func (f *OAuthFlows) Password() *OAuthFlow
- func (f *OAuthFlows) SetAuthorizationCode(authorizationCode *OAuthFlow) error
- func (f *OAuthFlows) SetClientCredentials(clientCredentials *OAuthFlow) error
- func (f *OAuthFlows) SetImplicit(implicit *OAuthFlow) error
- func (f *OAuthFlows) SetPassword(password *OAuthFlow) error
- type OpenAPI
- func (o *OpenAPI) Components() *Components
- func (o *OpenAPI) ExternalDocs() *ExternalDocumentation
- func (o *OpenAPI) Info() *Info
- func (o *OpenAPI) MarshalFields() []shared.Field
- func (o *OpenAPI) MarshalJSON() ([]byte, error)
- func (o *OpenAPI) MarshalYAML() (interface{}, error)
- func (o *OpenAPI) OpenAPIVersion() string
- func (o *OpenAPI) Paths() *Paths
- func (o *OpenAPI) Security() []SecurityRequirement
- func (o *OpenAPI) Servers() []*Server
- func (o *OpenAPI) SetComponents(components *Components) error
- func (o *OpenAPI) SetExternalDocs(externalDocs *ExternalDocumentation) error
- func (o *OpenAPI) SetInfo(info *Info) error
- func (o *OpenAPI) SetOpenAPIVersion(openAPI string) error
- func (o *OpenAPI) SetPaths(paths *Paths) error
- func (o *OpenAPI) SetProperty(name string, value interface{})
- func (o *OpenAPI) SetSecurity(security []SecurityRequirement) error
- func (o *OpenAPI) SetServers(servers []*Server) error
- func (o *OpenAPI) SetTags(tags []*Tag) error
- func (o *OpenAPI) Tags() []*Tag
- type Operation
- func (o *Operation) Callbacks() map[string]*RefCallback
- func (o *Operation) Deprecated() bool
- func (o *Operation) Description() string
- func (o *Operation) ExternalDocs() *ExternalDocumentation
- 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) RequestBody() *RefRequestBody
- func (o *Operation) Responses() *Responses
- func (o *Operation) Security() []SecurityRequirement
- func (o *Operation) Servers() []*Server
- func (o *Operation) SetCallbacks(callbacks map[string]*RefCallback) error
- func (o *Operation) SetDeprecated(deprecated bool) error
- func (o *Operation) SetDescription(description string) error
- func (o *Operation) SetExternalDocs(externalDocs *ExternalDocumentation) error
- func (o *Operation) SetOperationID(operationID string) error
- func (o *Operation) SetParameters(parameters []*RefParameter) error
- func (o *Operation) SetRequestBody(requestBody *RefRequestBody) error
- func (o *Operation) SetResponses(responses *Responses) error
- func (o *Operation) SetSecurity(security []SecurityRequirement) error
- func (o *Operation) SetServers(servers []*Server) 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) AllowReserved() bool
- func (p *Parameter) Content() map[string]*MediaType
- func (p *Parameter) Deprecated() bool
- func (p *Parameter) Description() string
- func (p *Parameter) Example() interface{}
- func (p *Parameter) Examples() map[string]*RefExample
- func (p *Parameter) Explode() *bool
- func (p *Parameter) In() string
- func (p *Parameter) MarshalFields() []shared.Field
- func (p *Parameter) MarshalJSON() ([]byte, error)
- func (p *Parameter) MarshalYAML() (interface{}, error)
- func (p *Parameter) Name() string
- func (p *Parameter) Required() bool
- func (p *Parameter) Schema() *RefSchema
- func (p *Parameter) SetAllowEmptyValue(allowEmptyValue bool) error
- func (p *Parameter) SetAllowReserved(allowReserved bool) error
- func (p *Parameter) SetContent(content map[string]*MediaType) error
- func (p *Parameter) SetDeprecated(deprecated bool) error
- func (p *Parameter) SetDescription(description string) error
- func (p *Parameter) SetExample(example interface{}) error
- func (p *Parameter) SetExamples(examples map[string]*RefExample) error
- func (p *Parameter) SetExplode(explode *bool) error
- func (p *Parameter) SetIn(in string) error
- func (p *Parameter) SetName(name string) error
- func (p *Parameter) SetRequired(required bool) error
- func (p *Parameter) SetSchema(schema *RefSchema) error
- func (p *Parameter) SetStyle(style string) error
- func (p *Parameter) Style() string
- type ParseError
- type PathItem
- func (pi *PathItem) Delete() *Operation
- func (pi *PathItem) Description() string
- 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) Servers() []*Server
- func (pi *PathItem) SetDelete(delete *Operation) error
- func (pi *PathItem) SetDescription(description string) 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
- func (pi *PathItem) SetServers(servers []*Server) error
- func (pi *PathItem) SetSummary(summary string) error
- func (pi *PathItem) SetTrace(trace *Operation) error
- func (pi *PathItem) Summary() string
- func (pi *PathItem) Trace() *Operation
- type Paths
- type RefCallback
- type RefExample
- type RefHeader
- type RefLink
- type RefParameter
- type RefPathItem
- type RefRequestBody
- type RefResponse
- type RefSchema
- type RefSecurityScheme
- type RequestBody
- func (rb *RequestBody) Content() map[string]*MediaType
- func (rb *RequestBody) Description() string
- func (rb *RequestBody) MarshalFields() []shared.Field
- func (rb *RequestBody) MarshalJSON() ([]byte, error)
- func (rb *RequestBody) MarshalYAML() (interface{}, error)
- func (rb *RequestBody) Required() bool
- func (rb *RequestBody) SetContent(content map[string]*MediaType) error
- func (rb *RequestBody) SetDescription(description string) error
- func (rb *RequestBody) SetRequired(required bool) error
- type Response
- func (r *Response) Content() map[string]*MediaType
- func (r *Response) Description() string
- func (r *Response) Headers() map[string]*RefHeader
- func (r *Response) Links() map[string]*RefLink
- func (r *Response) MarshalFields() []shared.Field
- func (r *Response) MarshalJSON() ([]byte, error)
- func (r *Response) MarshalYAML() (interface{}, error)
- func (r *Response) SetContent(content map[string]*MediaType) error
- func (r *Response) SetDescription(description string) error
- func (r *Response) SetHeaders(headers map[string]*RefHeader) error
- func (r *Response) SetLinks(links map[string]*RefLink) 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) AnyOf() []*RefSchema
- func (s *Schema) Default() interface{}
- func (s *Schema) Deprecated() bool
- func (s *Schema) Description() string
- func (s *Schema) Discriminator() *Discriminator
- func (s *Schema) Enum() []interface{}
- func (s *Schema) Example() interface{}
- func (s *Schema) ExclusiveMaximum() bool
- func (s *Schema) ExclusiveMinimum() bool
- func (s *Schema) ExternalDocs() *ExternalDocumentation
- 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) Not() *RefSchema
- func (s *Schema) Nullable() bool
- func (s *Schema) OneOf() []*RefSchema
- 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) SetAnyOf(anyOf []*RefSchema) error
- func (s *Schema) SetDefault(defaultVal interface{}) error
- func (s *Schema) SetDeprecated(deprecated bool) error
- func (s *Schema) SetDescription(description string) error
- func (s *Schema) SetDiscriminator(discriminator *Discriminator) 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 *ExternalDocumentation) 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) SetNot(not *RefSchema) error
- func (s *Schema) SetNullable(nullable bool) error
- func (s *Schema) SetOneOf(oneOf []*RefSchema) 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) SetWriteOnly(writeOnly 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) WriteOnly() bool
- func (s *Schema) XML() *XML
- type SchemaFields
- type SecurityRequirement
- type SecurityScheme
- func (ss *SecurityScheme) BearerFormat() string
- func (ss *SecurityScheme) Description() string
- func (ss *SecurityScheme) Flows() *OAuthFlows
- func (ss *SecurityScheme) In() string
- func (ss *SecurityScheme) MarshalFields() []shared.Field
- func (ss *SecurityScheme) MarshalJSON() ([]byte, error)
- func (ss *SecurityScheme) MarshalYAML() (interface{}, error)
- func (ss *SecurityScheme) Name() string
- func (ss *SecurityScheme) OpenIDConnectURL() string
- func (ss *SecurityScheme) Scheme() string
- func (ss *SecurityScheme) SetBearerFormat(bearerFormat string) error
- func (ss *SecurityScheme) SetDescription(description string) error
- func (ss *SecurityScheme) SetFlows(flows *OAuthFlows) error
- func (ss *SecurityScheme) SetIn(in string) error
- func (ss *SecurityScheme) SetName(name string) error
- func (ss *SecurityScheme) SetOpenIDConnectURL(openIDConnectURL string) error
- func (ss *SecurityScheme) SetScheme(scheme string) error
- func (ss *SecurityScheme) SetType(secType string) error
- func (ss *SecurityScheme) Type() string
- type Server
- func (s *Server) Description() string
- func (s *Server) MarshalFields() []shared.Field
- func (s *Server) MarshalJSON() ([]byte, error)
- func (s *Server) MarshalYAML() (interface{}, error)
- func (s *Server) SetDescription(description string) error
- func (s *Server) SetURL(url string) error
- func (s *Server) SetVariables(variables map[string]*ServerVariable) error
- func (s *Server) URL() string
- func (s *Server) Variables() map[string]*ServerVariable
- type ServerVariable
- func (sv *ServerVariable) Default() string
- func (sv *ServerVariable) Description() string
- func (sv *ServerVariable) Enum() []string
- func (sv *ServerVariable) MarshalFields() []shared.Field
- func (sv *ServerVariable) MarshalJSON() ([]byte, error)
- func (sv *ServerVariable) MarshalYAML() (interface{}, error)
- func (sv *ServerVariable) SetDefault(defaultVal string) error
- func (sv *ServerVariable) SetDescription(description string) error
- func (sv *ServerVariable) SetEnum(enum []string) error
- type Tag
- func (t *Tag) Description() string
- func (t *Tag) ExternalDocs() *ExternalDocumentation
- 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 *ExternalDocumentation) 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 Callback ¶
type Callback struct {
ElementBase // embedded - provides VendorExtensions and Trix
// contains filtered or unexported fields
}
Callback is a map of possible out-of-band callbacks related to the parent operation. https://spec.openapis.org/oas/v3.0.3#callback-object
func NewCallback ¶
NewCallback creates a new Callback instance.
func (*Callback) MarshalFields ¶
MarshalFields implements shared.MarshalFieldsProvider for export.
func (*Callback) MarshalJSON ¶
MarshalJSON serializes Callback as a flat object with runtime expression keys.
func (*Callback) MarshalYAML ¶
MarshalYAML serializes Callback as a flat YAML mapping.
type Components ¶
type Components struct {
ElementBase // embedded - provides VendorExtensions and Trix
// contains filtered or unexported fields
}
Components holds reusable objects for the specification. https://spec.openapis.org/oas/v3.0.3#components-object
func NewComponents ¶
func NewComponents( schemas map[string]*RefSchema, responses map[string]*RefResponse, parameters map[string]*RefParameter, examples map[string]*RefExample, requestBodies map[string]*RefRequestBody, headers map[string]*RefHeader, securitySchemes map[string]*RefSecurityScheme, links map[string]*RefLink, callbacks map[string]*RefCallback, ) *Components
NewComponents creates a new Components instance.
func (*Components) Callbacks ¶
func (c *Components) Callbacks() map[string]*RefCallback
func (*Components) Examples ¶
func (c *Components) Examples() map[string]*RefExample
func (*Components) Headers ¶
func (c *Components) Headers() map[string]*RefHeader
func (*Components) Links ¶
func (c *Components) Links() map[string]*RefLink
func (*Components) MarshalFields ¶
func (c *Components) MarshalFields() []shared.Field
MarshalFields implements shared.MarshalFieldsProvider for export.
func (*Components) MarshalJSON ¶
func (c *Components) MarshalJSON() ([]byte, error)
func (*Components) MarshalYAML ¶
func (c *Components) MarshalYAML() (interface{}, error)
func (*Components) Parameters ¶
func (c *Components) Parameters() map[string]*RefParameter
func (*Components) RequestBodies ¶
func (c *Components) RequestBodies() map[string]*RefRequestBody
func (*Components) Responses ¶
func (c *Components) Responses() map[string]*RefResponse
func (*Components) Schemas ¶
func (c *Components) Schemas() map[string]*RefSchema
func (*Components) SecuritySchemes ¶
func (c *Components) SecuritySchemes() map[string]*RefSecurityScheme
func (*Components) SetCallbacks ¶
func (c *Components) SetCallbacks(callbacks map[string]*RefCallback) error
func (*Components) SetExamples ¶
func (c *Components) SetExamples(examples map[string]*RefExample) error
func (*Components) SetHeaders ¶
func (c *Components) SetHeaders(headers map[string]*RefHeader) error
func (*Components) SetParameters ¶
func (c *Components) SetParameters(parameters map[string]*RefParameter) error
func (*Components) SetRequestBodies ¶
func (c *Components) SetRequestBodies(requestBodies map[string]*RefRequestBody) error
func (*Components) SetResponses ¶
func (c *Components) SetResponses(responses map[string]*RefResponse) error
func (*Components) SetSchemas ¶
func (c *Components) SetSchemas(schemas map[string]*RefSchema) error
func (*Components) SetSecuritySchemes ¶
func (c *Components) SetSecuritySchemes(securitySchemes map[string]*RefSecurityScheme) error
type Contact ¶
type Contact struct {
ElementBase // embedded - provides VendorExtensions and Trix
// contains filtered or unexported fields
}
Contact provides contact information for the API. https://spec.openapis.org/oas/v3.0.3#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 Discriminator ¶
type Discriminator struct {
ElementBase // embedded - provides VendorExtensions and Trix
// contains filtered or unexported fields
}
Discriminator is used for polymorphism support. https://spec.openapis.org/oas/v3.0.3#discriminator-object
func NewDiscriminator ¶
func NewDiscriminator(propertyName string, mapping map[string]string) *Discriminator
NewDiscriminator creates a new Discriminator instance.
func (*Discriminator) Mapping ¶
func (d *Discriminator) Mapping() map[string]string
func (*Discriminator) MarshalFields ¶
func (d *Discriminator) MarshalFields() []shared.Field
MarshalFields implements shared.MarshalFieldsProvider for export.
func (*Discriminator) MarshalJSON ¶
func (d *Discriminator) MarshalJSON() ([]byte, error)
func (*Discriminator) MarshalYAML ¶
func (d *Discriminator) MarshalYAML() (interface{}, error)
func (*Discriminator) PropertyName ¶
func (d *Discriminator) PropertyName() string
func (*Discriminator) SetMapping ¶
func (d *Discriminator) SetMapping(mapping map[string]string) error
func (*Discriminator) SetPropertyName ¶
func (d *Discriminator) SetPropertyName(propertyName string) error
type ElementBase ¶
type ElementBase struct {
VendorExtensions map[string]interface{} `json:"-" yaml:"-"`
Trix Trix `json:"-" yaml:"-"`
}
ElementBase is embedded in all v30 types to provide vendor extensions and library metadata.
type Encoding ¶
type Encoding struct {
ElementBase // embedded - provides VendorExtensions and Trix
// contains filtered or unexported fields
}
Encoding defines encoding for a single schema property. https://spec.openapis.org/oas/v3.0.3#encoding-object
func NewEncoding ¶
func NewEncoding(contentType string, headers map[string]*RefHeader, style string, explode *bool, allowReserved bool) *Encoding
NewEncoding creates a new Encoding instance.
func (*Encoding) AllowReserved ¶
func (*Encoding) ContentType ¶
func (*Encoding) MarshalFields ¶
MarshalFields implements shared.MarshalFieldsProvider for export.
func (*Encoding) MarshalJSON ¶
func (*Encoding) MarshalYAML ¶
func (*Encoding) SetAllowReserved ¶
func (*Encoding) SetContentType ¶
func (*Encoding) SetExplode ¶
type Example ¶
type Example struct {
ElementBase // embedded - provides VendorExtensions and Trix
// contains filtered or unexported fields
}
Example represents an example of a media type. https://spec.openapis.org/oas/v3.0.3#example-object
func NewExample ¶
NewExample creates a new Example instance.
func (*Example) Description ¶
func (*Example) ExternalValue ¶
func (*Example) MarshalFields ¶
MarshalFields implements shared.MarshalFieldsProvider for export.
func (*Example) MarshalJSON ¶
func (*Example) MarshalYAML ¶
func (*Example) SetDescription ¶
func (*Example) SetExternalValue ¶
func (*Example) SetSummary ¶
type ExternalDocumentation ¶
type ExternalDocumentation struct {
ElementBase // embedded - provides VendorExtensions and Trix
// contains filtered or unexported fields
}
ExternalDocumentation allows referencing external documentation. https://spec.openapis.org/oas/v3.0.3#external-documentation-object
func NewExternalDocumentation ¶
func NewExternalDocumentation(url, description string) *ExternalDocumentation
NewExternalDocumentation creates a new ExternalDocumentation instance.
func (*ExternalDocumentation) Description ¶
func (e *ExternalDocumentation) Description() string
func (*ExternalDocumentation) MarshalFields ¶
func (e *ExternalDocumentation) MarshalFields() []shared.Field
MarshalFields implements shared.MarshalFieldsProvider for export.
func (*ExternalDocumentation) MarshalJSON ¶
func (e *ExternalDocumentation) MarshalJSON() ([]byte, error)
func (*ExternalDocumentation) MarshalYAML ¶
func (e *ExternalDocumentation) MarshalYAML() (interface{}, error)
func (*ExternalDocumentation) SetDescription ¶
func (e *ExternalDocumentation) SetDescription(description string) error
func (*ExternalDocumentation) SetURL ¶
func (e *ExternalDocumentation) SetURL(url string) error
func (*ExternalDocumentation) URL ¶
func (e *ExternalDocumentation) URL() string
type Header ¶
type Header struct {
ElementBase // embedded - provides VendorExtensions and Trix
// contains filtered or unexported fields
}
Header represents a Header Object. https://spec.openapis.org/oas/v3.0.3#header-object
func NewHeader ¶
func NewHeader( description string, required, deprecated, allowEmptyValue bool, style string, explode *bool, allowReserved bool, schema *RefSchema, example interface{}, examples map[string]*RefExample, content map[string]*MediaType, ) *Header
NewHeader creates a new Header instance.
func (*Header) AllowEmptyValue ¶
func (*Header) AllowReserved ¶
func (*Header) Deprecated ¶
func (*Header) Description ¶
func (*Header) Examples ¶
func (h *Header) Examples() map[string]*RefExample
func (*Header) MarshalFields ¶
MarshalFields implements shared.MarshalFieldsProvider for export.
func (*Header) MarshalJSON ¶
func (*Header) MarshalYAML ¶
func (*Header) SetAllowEmptyValue ¶
func (*Header) SetAllowReserved ¶
func (*Header) SetDeprecated ¶
func (*Header) SetDescription ¶
func (*Header) SetExample ¶
func (*Header) SetExamples ¶
func (h *Header) SetExamples(examples map[string]*RefExample) error
func (*Header) SetExplode ¶
func (*Header) SetRequired ¶
type Info ¶
type Info struct {
ElementBase // embedded - provides VendorExtensions and Trix
// contains filtered or unexported fields
}
Info provides metadata about the API. https://spec.openapis.org/oas/v3.0.3#info-object
func NewInfo ¶
func NewInfo(title, description, termsOfService, version string, contact *Contact, license *License) *Info
NewInfo creates a new Info instance with all spec-defined fields.
func (*Info) Description ¶
Description returns the description of the API.
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 ¶
TermsOfService returns the URL to the Terms of Service.
type License ¶
type License struct {
ElementBase // embedded - provides VendorExtensions and Trix
// contains filtered or unexported fields
}
License provides license information for the API. https://spec.openapis.org/oas/v3.0.3#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 Link ¶
type Link struct {
ElementBase // embedded - provides VendorExtensions and Trix
// contains filtered or unexported fields
}
Link represents a possible design-time link for a response. https://spec.openapis.org/oas/v3.0.3#link-object
func NewLink ¶
func NewLink(operationRef, operationID string, parameters map[string]interface{}, requestBody interface{}, description string, server *Server) *Link
NewLink creates a new Link instance.
func (*Link) Description ¶
func (*Link) MarshalFields ¶
MarshalFields implements shared.MarshalFieldsProvider for export.
func (*Link) MarshalJSON ¶
func (*Link) MarshalYAML ¶
func (*Link) OperationID ¶
func (*Link) OperationRef ¶
func (*Link) Parameters ¶
func (*Link) RequestBody ¶
func (l *Link) RequestBody() interface{}
func (*Link) SetDescription ¶
func (*Link) SetOperationID ¶
func (*Link) SetOperationRef ¶
func (*Link) SetParameters ¶
func (*Link) SetRequestBody ¶
type MediaType ¶
type MediaType struct {
ElementBase // embedded - provides VendorExtensions and Trix
// contains filtered or unexported fields
}
MediaType provides schema and examples for a media type. https://spec.openapis.org/oas/v3.0.3#media-type-object
func NewMediaType ¶
func NewMediaType(schema *RefSchema, example interface{}, examples map[string]*RefExample, encoding map[string]*Encoding) *MediaType
NewMediaType creates a new MediaType instance.
func (*MediaType) Examples ¶
func (mt *MediaType) Examples() map[string]*RefExample
func (*MediaType) MarshalFields ¶
MarshalFields implements shared.MarshalFieldsProvider for export.
func (*MediaType) MarshalJSON ¶
func (*MediaType) MarshalYAML ¶
func (*MediaType) SetEncoding ¶
func (*MediaType) SetExample ¶
func (*MediaType) SetExamples ¶
func (mt *MediaType) SetExamples(examples map[string]*RefExample) error
type NodeSource ¶
type NodeSource = shared.NodeSource
NodeSource contains source location and raw parsed data for a node.
type OAuthFlow ¶
type OAuthFlow struct {
ElementBase // embedded - provides VendorExtensions and Trix
// contains filtered or unexported fields
}
OAuthFlow represents configuration for an OAuth flow. https://spec.openapis.org/oas/v3.0.3#oauth-flow-object
func NewOAuthFlow ¶
func NewOAuthFlow(authorizationURL, tokenURL, refreshURL string, scopes map[string]string) *OAuthFlow
NewOAuthFlow creates a new OAuthFlow instance.
func (*OAuthFlow) AuthorizationURL ¶
func (*OAuthFlow) MarshalFields ¶
MarshalFields implements shared.MarshalFieldsProvider for export.
func (*OAuthFlow) MarshalJSON ¶
func (*OAuthFlow) MarshalYAML ¶
func (*OAuthFlow) RefreshURL ¶
func (*OAuthFlow) SetAuthorizationURL ¶
func (*OAuthFlow) SetRefreshURL ¶
func (*OAuthFlow) SetTokenURL ¶
type OAuthFlows ¶
type OAuthFlows struct {
ElementBase // embedded - provides VendorExtensions and Trix
// contains filtered or unexported fields
}
OAuthFlows allows configuration of supported OAuth flows. https://spec.openapis.org/oas/v3.0.3#oauth-flows-object
func NewOAuthFlows ¶
func NewOAuthFlows(implicit, password, clientCredentials, authorizationCode *OAuthFlow) *OAuthFlows
NewOAuthFlows creates a new OAuthFlows instance.
func (*OAuthFlows) AuthorizationCode ¶
func (f *OAuthFlows) AuthorizationCode() *OAuthFlow
func (*OAuthFlows) ClientCredentials ¶
func (f *OAuthFlows) ClientCredentials() *OAuthFlow
func (*OAuthFlows) Implicit ¶
func (f *OAuthFlows) Implicit() *OAuthFlow
func (*OAuthFlows) MarshalFields ¶
func (f *OAuthFlows) MarshalFields() []shared.Field
MarshalFields implements shared.MarshalFieldsProvider for export.
func (*OAuthFlows) MarshalJSON ¶
func (f *OAuthFlows) MarshalJSON() ([]byte, error)
func (*OAuthFlows) MarshalYAML ¶
func (f *OAuthFlows) MarshalYAML() (interface{}, error)
func (*OAuthFlows) Password ¶
func (f *OAuthFlows) Password() *OAuthFlow
func (*OAuthFlows) SetAuthorizationCode ¶
func (f *OAuthFlows) SetAuthorizationCode(authorizationCode *OAuthFlow) error
func (*OAuthFlows) SetClientCredentials ¶
func (f *OAuthFlows) SetClientCredentials(clientCredentials *OAuthFlow) error
func (*OAuthFlows) SetImplicit ¶
func (f *OAuthFlows) SetImplicit(implicit *OAuthFlow) error
func (*OAuthFlows) SetPassword ¶
func (f *OAuthFlows) SetPassword(password *OAuthFlow) error
type OpenAPI ¶
type OpenAPI struct {
ElementBase // embedded - provides VendorExtensions and Trix
// contains filtered or unexported fields
}
OpenAPI is the root document object of the OpenAPI specification. https://spec.openapis.org/oas/v3.0.3#openapi-object
func NewOpenAPI ¶
NewOpenAPI creates a new OpenAPI root document instance.
func (*OpenAPI) Components ¶
func (o *OpenAPI) Components() *Components
func (*OpenAPI) ExternalDocs ¶
func (o *OpenAPI) ExternalDocs() *ExternalDocumentation
func (*OpenAPI) MarshalFields ¶
MarshalFields implements shared.MarshalFieldsProvider for export.
func (*OpenAPI) MarshalJSON ¶
func (*OpenAPI) MarshalYAML ¶
func (*OpenAPI) OpenAPIVersion ¶
func (*OpenAPI) Security ¶
func (o *OpenAPI) Security() []SecurityRequirement
func (*OpenAPI) SetComponents ¶
func (o *OpenAPI) SetComponents(components *Components) error
func (*OpenAPI) SetExternalDocs ¶
func (o *OpenAPI) SetExternalDocs(externalDocs *ExternalDocumentation) error
func (*OpenAPI) SetOpenAPIVersion ¶
func (*OpenAPI) SetProperty ¶
SetProperty sets a named property on the OpenAPI document. This is used by parsers for post-construction field assignment.
func (*OpenAPI) SetSecurity ¶
func (o *OpenAPI) SetSecurity(security []SecurityRequirement) error
func (*OpenAPI) SetServers ¶
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://spec.openapis.org/oas/v3.0.3#operation-object
func NewOperation ¶
func NewOperation( tags []string, summary, description string, externalDocs *ExternalDocumentation, operationID string, parameters []*RefParameter, requestBody *RefRequestBody, responses *Responses, callbacks map[string]*RefCallback, deprecated bool, security []SecurityRequirement, servers []*Server, ) *Operation
NewOperation creates a new Operation instance.
func (*Operation) Callbacks ¶
func (o *Operation) Callbacks() map[string]*RefCallback
func (*Operation) Deprecated ¶
func (*Operation) Description ¶
func (*Operation) ExternalDocs ¶
func (o *Operation) ExternalDocs() *ExternalDocumentation
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) RequestBody ¶
func (o *Operation) RequestBody() *RefRequestBody
func (*Operation) Security ¶
func (o *Operation) Security() []SecurityRequirement
func (*Operation) SetCallbacks ¶
func (o *Operation) SetCallbacks(callbacks map[string]*RefCallback) error
func (*Operation) SetDeprecated ¶
func (*Operation) SetDescription ¶
func (*Operation) SetExternalDocs ¶
func (o *Operation) SetExternalDocs(externalDocs *ExternalDocumentation) error
func (*Operation) SetOperationID ¶
func (*Operation) SetParameters ¶
func (o *Operation) SetParameters(parameters []*RefParameter) error
func (*Operation) SetRequestBody ¶
func (o *Operation) SetRequestBody(requestBody *RefRequestBody) error
func (*Operation) SetResponses ¶
func (*Operation) SetSecurity ¶
func (o *Operation) SetSecurity(security []SecurityRequirement) error
func (*Operation) SetServers ¶
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://spec.openapis.org/oas/v3.0.3#parameter-object
func NewParameter ¶
func NewParameter( name, in, description string, required, deprecated, allowEmptyValue bool, style string, explode *bool, allowReserved bool, schema *RefSchema, example interface{}, examples map[string]*RefExample, content map[string]*MediaType, ) *Parameter
NewParameter creates a new Parameter instance.
func (*Parameter) AllowEmptyValue ¶
func (*Parameter) AllowReserved ¶
func (*Parameter) Deprecated ¶
func (*Parameter) Description ¶
func (*Parameter) Examples ¶
func (p *Parameter) Examples() map[string]*RefExample
func (*Parameter) MarshalFields ¶
MarshalFields implements shared.MarshalFieldsProvider for export.
func (*Parameter) MarshalJSON ¶
func (*Parameter) MarshalYAML ¶
func (*Parameter) SetAllowEmptyValue ¶
func (*Parameter) SetAllowReserved ¶
func (*Parameter) SetDeprecated ¶
func (*Parameter) SetDescription ¶
func (*Parameter) SetExample ¶
func (*Parameter) SetExamples ¶
func (p *Parameter) SetExamples(examples map[string]*RefExample) error
func (*Parameter) SetExplode ¶
func (*Parameter) SetRequired ¶
type ParseError ¶
type ParseError = shared.ParseError
ParseError represents a parsing error associated with a specific node.
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://spec.openapis.org/oas/v3.0.3#path-item-object
func NewPathItem ¶
func NewPathItem( ref, summary, description string, get, put, post, del, options, head, patch, trace *Operation, servers []*Server, parameters []*RefParameter, ) *PathItem
NewPathItem creates a new PathItem instance.
func (*PathItem) Description ¶
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) SetDescription ¶
func (*PathItem) SetOptions ¶
func (*PathItem) SetParameters ¶
func (pi *PathItem) SetParameters(parameters []*RefParameter) error
func (*PathItem) SetServers ¶
func (*PathItem) SetSummary ¶
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://spec.openapis.org/oas/v3.0.3#paths-object
func (*Paths) MarshalFields ¶
MarshalFields implements shared.MarshalFieldsProvider for export.
func (*Paths) MarshalJSON ¶
MarshalJSON serializes Paths as a flat JSON object with path keys.
func (*Paths) MarshalYAML ¶
MarshalYAML serializes Paths as a flat YAML mapping with path keys.
type RefCallback ¶
func NewRefCallback ¶
func NewRefCallback(ref string) *RefCallback
type RefExample ¶
func NewRefExample ¶
func NewRefExample(ref string) *RefExample
type RefHeader ¶
func NewRefHeader ¶
type RefLink ¶
func NewRefLink ¶
type RefParameter ¶
func NewRefParameter ¶
func NewRefParameter(ref string) *RefParameter
type RefPathItem ¶
func NewRefPathItem ¶
func NewRefPathItem(ref string) *RefPathItem
type RefRequestBody ¶
type RefRequestBody = shared.Ref[RequestBody]
func NewRefRequestBody ¶
func NewRefRequestBody(ref string) *RefRequestBody
type RefResponse ¶
func NewRefResponse ¶
func NewRefResponse(ref string) *RefResponse
type RefSchema ¶
Ref type aliases — use these instead of shared.Ref[T] throughout the package.
func NewRefSchema ¶
type RefSecurityScheme ¶
type RefSecurityScheme = shared.Ref[SecurityScheme]
func NewRefSecurityScheme ¶
func NewRefSecurityScheme(ref string) *RefSecurityScheme
type RequestBody ¶
type RequestBody struct {
ElementBase // embedded - provides VendorExtensions and Trix
// contains filtered or unexported fields
}
RequestBody describes a single request body. https://spec.openapis.org/oas/v3.0.3#request-body-object
func NewRequestBody ¶
func NewRequestBody(description string, content map[string]*MediaType, required bool) *RequestBody
NewRequestBody creates a new RequestBody instance.
func (*RequestBody) Content ¶
func (rb *RequestBody) Content() map[string]*MediaType
func (*RequestBody) Description ¶
func (rb *RequestBody) Description() string
func (*RequestBody) MarshalFields ¶
func (rb *RequestBody) MarshalFields() []shared.Field
MarshalFields implements shared.MarshalFieldsProvider for export.
func (*RequestBody) MarshalJSON ¶
func (rb *RequestBody) MarshalJSON() ([]byte, error)
func (*RequestBody) MarshalYAML ¶
func (rb *RequestBody) MarshalYAML() (interface{}, error)
func (*RequestBody) Required ¶
func (rb *RequestBody) Required() bool
func (*RequestBody) SetContent ¶
func (rb *RequestBody) SetContent(content map[string]*MediaType) error
func (*RequestBody) SetDescription ¶
func (rb *RequestBody) SetDescription(description string) error
func (*RequestBody) SetRequired ¶
func (rb *RequestBody) SetRequired(required bool) error
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://spec.openapis.org/oas/v3.0.3#response-object
func NewResponse ¶
func NewResponse(description string, headers map[string]*RefHeader, content map[string]*MediaType, links map[string]*RefLink) *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 ¶
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://spec.openapis.org/oas/v3.0.3#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 ¶
MarshalJSON serializes Responses as a flat object: "default" first, then status codes sorted.
func (*Responses) MarshalYAML ¶
MarshalYAML serializes Responses as a flat YAML mapping.
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 OpenAPI 3.0 Schema Object. https://spec.openapis.org/oas/v3.0.3#schema-object
func NewSchema ¶
func NewSchema(f SchemaFields) *Schema
NewSchema creates a new Schema instance. Due to the large number of fields, callers should use NewSchemaFields.
func (*Schema) AdditionalProperties ¶
func (*Schema) AdditionalPropertiesAllowed ¶
func (*Schema) Deprecated ¶
func (*Schema) Description ¶
func (*Schema) Discriminator ¶
func (s *Schema) Discriminator() *Discriminator
func (*Schema) ExclusiveMaximum ¶
func (*Schema) ExclusiveMinimum ¶
func (*Schema) ExternalDocs ¶
func (s *Schema) ExternalDocs() *ExternalDocumentation
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) SetDeprecated ¶
func (*Schema) SetDescription ¶
func (*Schema) SetDiscriminator ¶
func (s *Schema) SetDiscriminator(discriminator *Discriminator) error
func (*Schema) SetExample ¶
func (*Schema) SetExclusiveMaximum ¶
func (*Schema) SetExclusiveMinimum ¶
func (*Schema) SetExternalDocs ¶
func (s *Schema) SetExternalDocs(externalDocs *ExternalDocumentation) 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) SetNullable ¶
func (*Schema) SetPattern ¶
func (*Schema) SetProperties ¶
func (*Schema) SetReadOnly ¶
func (*Schema) SetRequired ¶
func (*Schema) SetUniqueItems ¶
func (*Schema) SetWriteOnly ¶
func (*Schema) UniqueItems ¶
type SchemaFields ¶
type SchemaFields struct {
Title string
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
AllOf []*RefSchema
OneOf []*RefSchema
AnyOf []*RefSchema
Not *RefSchema
Items *RefSchema
Properties map[string]*RefSchema
Description string
Format string
Default interface{}
AdditionalProperties *RefSchema
AdditionalPropertiesAllowed *bool
Nullable bool
Discriminator *Discriminator
ReadOnly bool
WriteOnly bool
XML *XML
ExternalDocs *ExternalDocumentation
Example interface{}
Deprecated bool
}
SchemaFields holds all fields for constructing a Schema. Using a struct avoids a 44-parameter constructor.
type SecurityRequirement ¶
SecurityRequirement lists required security schemes to execute an operation. https://spec.openapis.org/oas/v3.0.3#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://spec.openapis.org/oas/v3.0.3#security-scheme-object
func NewSecurityScheme ¶
func NewSecurityScheme(secType, description, name, in, scheme, bearerFormat string, flows *OAuthFlows, openIDConnectURL string) *SecurityScheme
NewSecurityScheme creates a new SecurityScheme instance.
func (*SecurityScheme) BearerFormat ¶
func (ss *SecurityScheme) BearerFormat() string
func (*SecurityScheme) Description ¶
func (ss *SecurityScheme) Description() string
func (*SecurityScheme) Flows ¶
func (ss *SecurityScheme) Flows() *OAuthFlows
func (*SecurityScheme) In ¶
func (ss *SecurityScheme) In() string
func (*SecurityScheme) MarshalFields ¶
func (ss *SecurityScheme) MarshalFields() []shared.Field
MarshalFields implements shared.MarshalFieldsProvider for export.
func (*SecurityScheme) MarshalJSON ¶
func (ss *SecurityScheme) MarshalJSON() ([]byte, error)
func (*SecurityScheme) MarshalYAML ¶
func (ss *SecurityScheme) MarshalYAML() (interface{}, error)
func (*SecurityScheme) Name ¶
func (ss *SecurityScheme) Name() string
func (*SecurityScheme) OpenIDConnectURL ¶
func (ss *SecurityScheme) OpenIDConnectURL() string
func (*SecurityScheme) Scheme ¶
func (ss *SecurityScheme) Scheme() string
func (*SecurityScheme) SetBearerFormat ¶
func (ss *SecurityScheme) SetBearerFormat(bearerFormat string) error
func (*SecurityScheme) SetDescription ¶
func (ss *SecurityScheme) SetDescription(description string) error
func (*SecurityScheme) SetFlows ¶
func (ss *SecurityScheme) SetFlows(flows *OAuthFlows) error
func (*SecurityScheme) SetIn ¶
func (ss *SecurityScheme) SetIn(in string) error
func (*SecurityScheme) SetName ¶
func (ss *SecurityScheme) SetName(name string) error
func (*SecurityScheme) SetOpenIDConnectURL ¶
func (ss *SecurityScheme) SetOpenIDConnectURL(openIDConnectURL string) error
func (*SecurityScheme) SetScheme ¶
func (ss *SecurityScheme) SetScheme(scheme string) error
func (*SecurityScheme) SetType ¶
func (ss *SecurityScheme) SetType(secType string) error
func (*SecurityScheme) Type ¶
func (ss *SecurityScheme) Type() string
type Server ¶
type Server struct {
ElementBase // embedded - provides VendorExtensions and Trix
// contains filtered or unexported fields
}
Server represents a server. https://spec.openapis.org/oas/v3.0.3#server-object
func NewServer ¶
func NewServer(url, description string, variables map[string]*ServerVariable) *Server
NewServer creates a new Server instance.
func (*Server) Description ¶
func (*Server) MarshalFields ¶
MarshalFields implements shared.MarshalFieldsProvider for export.
func (*Server) MarshalJSON ¶
func (*Server) MarshalYAML ¶
func (*Server) SetDescription ¶
func (*Server) SetVariables ¶
func (s *Server) SetVariables(variables map[string]*ServerVariable) error
func (*Server) Variables ¶
func (s *Server) Variables() map[string]*ServerVariable
type ServerVariable ¶
type ServerVariable struct {
ElementBase // embedded - provides VendorExtensions and Trix
// contains filtered or unexported fields
}
ServerVariable represents a server variable for URL template substitution. https://spec.openapis.org/oas/v3.0.3#server-variable-object
func NewServerVariable ¶
func NewServerVariable(defaultValue, description string, enum []string) *ServerVariable
NewServerVariable creates a new ServerVariable instance.
func (*ServerVariable) Default ¶
func (sv *ServerVariable) Default() string
func (*ServerVariable) Description ¶
func (sv *ServerVariable) Description() string
func (*ServerVariable) Enum ¶
func (sv *ServerVariable) Enum() []string
func (*ServerVariable) MarshalFields ¶
func (sv *ServerVariable) MarshalFields() []shared.Field
MarshalFields implements shared.MarshalFieldsProvider for export.
func (*ServerVariable) MarshalJSON ¶
func (sv *ServerVariable) MarshalJSON() ([]byte, error)
func (*ServerVariable) MarshalYAML ¶
func (sv *ServerVariable) MarshalYAML() (interface{}, error)
func (*ServerVariable) SetDefault ¶
func (sv *ServerVariable) SetDefault(defaultVal string) error
func (*ServerVariable) SetDescription ¶
func (sv *ServerVariable) SetDescription(description string) error
func (*ServerVariable) SetEnum ¶
func (sv *ServerVariable) SetEnum(enum []string) error
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://spec.openapis.org/oas/v3.0.3#tag-object
func NewTag ¶
func NewTag(name, description string, externalDocs *ExternalDocumentation) *Tag
NewTag creates a new Tag instance.
func (*Tag) Description ¶
func (*Tag) ExternalDocs ¶
func (t *Tag) ExternalDocs() *ExternalDocumentation
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 *ExternalDocumentation) error
type Trix ¶
type Trix struct {
shared.Trix // promotes Source, Errors, OnSet, RunHooks
// ResolvedMapping holds discriminator mapping values resolved to schema refs (Discriminator only).
ResolvedMapping map[string]*RefSchema `json:"-" yaml:"-"`
// ResolvedOperation holds the operation resolved from operationRef (Link only).
ResolvedOperation *Operation `json:"-" yaml:"-"`
}
Trix contains all library-level metadata and functionality. Everything under Trix is provided by the apitrix library, not part of the OpenAPI specification itself.
type XML ¶
type XML struct {
ElementBase // embedded - provides VendorExtensions and Trix
// contains filtered or unexported fields
}
XML provides additional metadata for XML serialization. https://spec.openapis.org/oas/v3.0.3#xml-object
func (*XML) MarshalFields ¶
MarshalFields implements shared.MarshalFieldsProvider for export.
func (*XML) MarshalJSON ¶
func (*XML) MarshalYAML ¶
func (*XML) SetAttribute ¶
func (*XML) SetNamespace ¶
func (*XML) SetWrapped ¶
Source Files
¶
- callback.go
- components.go
- contact.go
- discriminator.go
- encoding.go
- example.go
- external_documentation.go
- header.go
- info.go
- license.go
- link.go
- media_type.go
- meta.go
- oauth_flow.go
- oauth_flows.go
- openapi.go
- operation.go
- parameter.go
- path_item.go
- paths.go
- request_body.go
- response.go
- responses.go
- schema.go
- security_requirement.go
- security_scheme.go
- server.go
- server_variable.go
- tag.go
- xml.go