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) MediaTypes() map[string]*RefMediaType
- func (c *Components) Parameters() map[string]*RefParameter
- func (c *Components) PathItems() map[string]*RefPathItem
- 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) SetMediaTypes(mediaTypes map[string]*RefMediaType) error
- func (c *Components) SetParameters(parameters map[string]*RefParameter) error
- func (c *Components) SetPathItems(pathItems map[string]*RefPathItem) error
- func (c *Components) SetProperty(name string, value interface{})
- 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) DefaultMapping() string
- 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) SetDefaultMapping(defaultMapping string) error
- 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) Encoding() map[string]*Encoding
- func (e *Encoding) Explode() *bool
- func (e *Encoding) Headers() map[string]*RefHeader
- func (e *Encoding) ItemEncoding() *Encoding
- func (e *Encoding) MarshalFields() []shared.Field
- func (e *Encoding) MarshalJSON() ([]byte, error)
- func (e *Encoding) MarshalYAML() (interface{}, error)
- func (e *Encoding) PrefixEncoding() []*Encoding
- func (e *Encoding) SetAllowReserved(allowReserved bool) error
- func (e *Encoding) SetContentType(contentType string) error
- func (e *Encoding) SetEncoding(encoding map[string]*Encoding) error
- func (e *Encoding) SetExplode(explode *bool) error
- func (e *Encoding) SetHeaders(headers map[string]*RefHeader) error
- func (e *Encoding) SetItemEncoding(itemEncoding *Encoding) error
- func (e *Encoding) SetPrefixEncoding(prefixEncoding []*Encoding) error
- func (e *Encoding) SetStyle(style string) error
- func (e *Encoding) Style() string
- type Example
- func (e *Example) DataValue() interface{}
- 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) SerializedValue() string
- func (e *Example) SetDataValue(dataValue interface{}) error
- func (e *Example) SetDescription(description string) error
- func (e *Example) SetExternalValue(externalValue string) error
- func (e *Example) SetSerializedValue(serializedValue 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 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) SetSummary(summary string) 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) Summary() string
- func (i *Info) TermsOfService() string
- func (i *Info) Title() string
- func (i *Info) Version() string
- type License
- func (l *License) Identifier() string
- 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) SetIdentifier(identifier string) error
- 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 (m *MediaType) Description() string
- func (m *MediaType) Encoding() map[string]*Encoding
- func (m *MediaType) Example() interface{}
- func (m *MediaType) Examples() map[string]*RefExample
- func (m *MediaType) ItemEncoding() *Encoding
- func (m *MediaType) ItemSchema() *RefSchema
- func (m *MediaType) MarshalFields() []shared.Field
- func (m *MediaType) MarshalJSON() ([]byte, error)
- func (m *MediaType) MarshalYAML() (interface{}, error)
- func (m *MediaType) PrefixEncoding() []*Encoding
- func (m *MediaType) Schema() *RefSchema
- func (m *MediaType) SetDescription(description string) error
- func (m *MediaType) SetEncoding(encoding map[string]*Encoding) error
- func (m *MediaType) SetExample(example interface{}) error
- func (m *MediaType) SetExamples(examples map[string]*RefExample) error
- func (m *MediaType) SetItemEncoding(itemEncoding *Encoding) error
- func (m *MediaType) SetItemSchema(itemSchema *RefSchema) error
- func (m *MediaType) SetPrefixEncoding(prefixEncoding []*Encoding) error
- func (m *MediaType) SetSchema(schema *RefSchema) error
- type NodeSource
- type OAuthFlow
- func (f *OAuthFlow) AuthorizationURL() string
- func (f *OAuthFlow) DeviceAuthorizationURL() 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) SetDeviceAuthorizationURL(deviceAuthorizationURL 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) DeviceAuthorization() *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) SetDeviceAuthorization(deviceAuthorization *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) JsonSchemaDialect() string
- 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) Self() string
- 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) SetJsonSchemaDialect(jsonSchemaDialect string) 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) SetSelf(self string) error
- func (o *OpenAPI) SetServers(servers []*Server) error
- func (o *OpenAPI) SetTags(tags []*Tag) error
- func (o *OpenAPI) SetWebhooks(webhooks map[string]*RefPathItem) error
- func (o *OpenAPI) Tags() []*Tag
- func (o *OpenAPI) Webhooks() map[string]*RefPathItem
- 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) SetProperty(name string, value interface{})
- 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 ParameterFields
- type ParseError
- type PathItem
- func (p *PathItem) AdditionalOperations() map[string]*Operation
- func (p *PathItem) Delete() *Operation
- func (p *PathItem) Description() string
- func (p *PathItem) Get() *Operation
- func (p *PathItem) Head() *Operation
- func (p *PathItem) MarshalFields() []shared.Field
- func (p *PathItem) MarshalJSON() ([]byte, error)
- func (p *PathItem) MarshalYAML() (interface{}, error)
- func (p *PathItem) Options() *Operation
- func (p *PathItem) Parameters() []*RefParameter
- func (p *PathItem) Patch() *Operation
- func (p *PathItem) Post() *Operation
- func (p *PathItem) Put() *Operation
- func (p *PathItem) Query() *Operation
- func (p *PathItem) Ref() string
- func (p *PathItem) Servers() []*Server
- func (p *PathItem) SetAdditionalOperations(additionalOperations map[string]*Operation) error
- func (p *PathItem) SetDelete(delete *Operation) error
- func (p *PathItem) SetDescription(description string) error
- func (p *PathItem) SetGet(get *Operation) error
- func (p *PathItem) SetHead(head *Operation) error
- func (p *PathItem) SetOptions(options *Operation) error
- func (p *PathItem) SetParameters(parameters []*RefParameter) error
- func (p *PathItem) SetPatch(patch *Operation) error
- func (p *PathItem) SetPost(post *Operation) error
- func (p *PathItem) SetProperty(name string, value interface{})
- func (p *PathItem) SetPut(put *Operation) error
- func (p *PathItem) SetQuery(query *Operation) error
- func (p *PathItem) SetRef(ref string) error
- func (p *PathItem) SetServers(servers []*Server) error
- func (p *PathItem) SetSummary(summary string) error
- func (p *PathItem) SetTrace(trace *Operation) error
- func (p *PathItem) Summary() string
- func (p *PathItem) Trace() *Operation
- type Paths
- type RefCallback
- type RefExample
- type RefHeader
- type RefLink
- type RefMediaType
- type RefParameter
- type RefPathItem
- type RefRequestBody
- type RefResponse
- type RefSchema
- type RefSecurityScheme
- type RequestBody
- func (r *RequestBody) Content() map[string]*MediaType
- func (r *RequestBody) Description() string
- func (r *RequestBody) MarshalFields() []shared.Field
- func (r *RequestBody) MarshalJSON() ([]byte, error)
- func (r *RequestBody) MarshalYAML() (interface{}, error)
- func (r *RequestBody) Required() bool
- func (r *RequestBody) SetContent(content map[string]*MediaType) error
- func (r *RequestBody) SetDescription(description string) error
- func (r *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
- func (r *Response) SetSummary(summary string) error
- func (r *Response) Summary() string
- 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) Anchor() string
- func (s *Schema) AnyOf() []*RefSchema
- func (s *Schema) Const() interface{}
- func (s *Schema) ContentEncoding() string
- func (s *Schema) ContentMediaType() string
- func (s *Schema) ContentSchema() *RefSchema
- func (s *Schema) Default() interface{}
- func (s *Schema) DependentSchemas() map[string]*RefSchema
- func (s *Schema) Deprecated() bool
- func (s *Schema) Description() string
- func (s *Schema) Discriminator() *Discriminator
- func (s *Schema) DynamicAnchor() string
- func (s *Schema) DynamicRef() string
- func (s *Schema) Else() *RefSchema
- func (s *Schema) Enum() []interface{}
- func (s *Schema) Example() interface{}
- func (s *Schema) Examples() []interface{}
- func (s *Schema) ExclusiveMaximum() *float64
- func (s *Schema) ExclusiveMinimum() *float64
- func (s *Schema) ExternalDocs() *ExternalDocumentation
- func (s *Schema) Format() string
- func (s *Schema) If() *RefSchema
- 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) OneOf() []*RefSchema
- func (s *Schema) Pattern() string
- func (s *Schema) PrefixItems() []*RefSchema
- 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) SetAnchor(anchor string) error
- func (s *Schema) SetAnyOf(anyOf []*RefSchema) error
- func (s *Schema) SetConst(constVal interface{}) error
- func (s *Schema) SetContentEncoding(contentEncoding string) error
- func (s *Schema) SetContentMediaType(contentMediaType string) error
- func (s *Schema) SetContentSchema(contentSchema *RefSchema) error
- func (s *Schema) SetDefault(defaultVal interface{}) error
- func (s *Schema) SetDependentSchemas(dependentSchemas map[string]*RefSchema) 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) SetDynamicAnchor(dynamicAnchor string) error
- func (s *Schema) SetDynamicRef(dynamicRef string) error
- func (s *Schema) SetElse(elseSchema *RefSchema) error
- func (s *Schema) SetEnum(enum []interface{}) error
- func (s *Schema) SetExample(example interface{}) error
- func (s *Schema) SetExamples(examples []interface{}) error
- func (s *Schema) SetExclusiveMaximum(exclusiveMaximum *float64) error
- func (s *Schema) SetExclusiveMinimum(exclusiveMinimum *float64) error
- func (s *Schema) SetExternalDocs(externalDocs *ExternalDocumentation) error
- func (s *Schema) SetFormat(format string) error
- func (s *Schema) SetIf(ifSchema *RefSchema) 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) SetOneOf(oneOf []*RefSchema) error
- func (s *Schema) SetPattern(pattern string) error
- func (s *Schema) SetPrefixItems(prefixItems []*RefSchema) 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) SetThen(thenSchema *RefSchema) error
- func (s *Schema) SetTitle(title string) error
- func (s *Schema) SetType(schemaType SchemaType) error
- func (s *Schema) SetUnevaluatedItems(unevaluatedItems *RefSchema) error
- func (s *Schema) SetUnevaluatedProperties(unevaluatedProperties *RefSchema) 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) Then() *RefSchema
- func (s *Schema) Title() string
- func (s *Schema) Type() SchemaType
- func (s *Schema) UnevaluatedItems() *RefSchema
- func (s *Schema) UnevaluatedProperties() *RefSchema
- func (s *Schema) UniqueItems() bool
- func (s *Schema) WriteOnly() bool
- func (s *Schema) XML() *XML
- type SchemaFields
- type SchemaType
- type SecurityRequirement
- type SecurityScheme
- func (s *SecurityScheme) BearerFormat() string
- func (s *SecurityScheme) Deprecated() *bool
- func (s *SecurityScheme) Description() string
- func (s *SecurityScheme) Flows() *OAuthFlows
- 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) OAuth2MetadataURL() string
- func (s *SecurityScheme) OpenIDConnectURL() string
- func (s *SecurityScheme) Scheme() string
- func (s *SecurityScheme) SetBearerFormat(bearerFormat string) error
- func (s *SecurityScheme) SetDeprecated(deprecated *bool) error
- func (s *SecurityScheme) SetDescription(description string) error
- func (s *SecurityScheme) SetFlows(flows *OAuthFlows) error
- func (s *SecurityScheme) SetIn(in string) error
- func (s *SecurityScheme) SetName(name string) error
- func (s *SecurityScheme) SetOAuth2MetadataURL(oauth2MetadataURL string) error
- func (s *SecurityScheme) SetOpenIDConnectURL(openIDConnectURL string) error
- func (s *SecurityScheme) SetScheme(scheme string) error
- func (s *SecurityScheme) SetType(schemeType string) error
- func (s *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) Name() string
- func (s *Server) SetDescription(description string) error
- func (s *Server) SetName(name 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 (v *ServerVariable) Default() string
- func (v *ServerVariable) Description() string
- func (v *ServerVariable) Enum() []string
- func (v *ServerVariable) MarshalFields() []shared.Field
- func (v *ServerVariable) MarshalJSON() ([]byte, error)
- func (v *ServerVariable) MarshalYAML() (interface{}, error)
- func (v *ServerVariable) SetDefault(defaultVal string) error
- func (v *ServerVariable) SetDescription(description string) error
- func (v *ServerVariable) SetEnum(enum []string) error
- type Tag
- func (t *Tag) Description() string
- func (t *Tag) ExternalDocs() *ExternalDocumentation
- func (t *Tag) Kind() string
- 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) Parent() string
- func (t *Tag) SetDescription(description string) error
- func (t *Tag) SetExternalDocs(externalDocs *ExternalDocumentation) error
- func (t *Tag) SetKind(kind string) error
- func (t *Tag) SetName(name string) error
- func (t *Tag) SetParent(parent string) error
- func (t *Tag) SetSummary(summary string) error
- func (t *Tag) Summary() string
- 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.1.0#callback-object
func NewCallback ¶
NewCallback creates a new Callback instance.
func (*Callback) MarshalFields ¶
MarshalFields implements shared.MarshalFieldsProvider for export.
func (*Callback) MarshalJSON ¶
func (*Callback) MarshalYAML ¶
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.1.0#components-object
func NewComponents ¶
func NewComponents() *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) MediaTypes ¶
func (c *Components) MediaTypes() map[string]*RefMediaType
func (*Components) Parameters ¶
func (c *Components) Parameters() map[string]*RefParameter
func (*Components) PathItems ¶
func (c *Components) PathItems() map[string]*RefPathItem
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) SetMediaTypes ¶
func (c *Components) SetMediaTypes(mediaTypes map[string]*RefMediaType) error
func (*Components) SetParameters ¶
func (c *Components) SetParameters(parameters map[string]*RefParameter) error
func (*Components) SetPathItems ¶
func (c *Components) SetPathItems(pathItems map[string]*RefPathItem) error
func (*Components) SetProperty ¶
func (c *Components) SetProperty(name string, value interface{})
SetProperty sets a named property on the Components. Used by parsers for post-construction field assignment.
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.1.0#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.1.0#discriminator-object
func NewDiscriminator ¶
func NewDiscriminator(propertyName string, mapping map[string]string) *Discriminator
NewDiscriminator creates a new Discriminator instance.
func (*Discriminator) DefaultMapping ¶
func (d *Discriminator) DefaultMapping() string
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) SetDefaultMapping ¶
func (d *Discriminator) SetDefaultMapping(defaultMapping string) error
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 v31 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.1.0#encoding-object
func NewEncoding ¶
func NewEncoding(contentType, style string, headers map[string]*RefHeader, explode *bool, allowReserved bool) *Encoding
NewEncoding creates a new Encoding instance.
func (*Encoding) AllowReserved ¶
func (*Encoding) ContentType ¶
func (*Encoding) ItemEncoding ¶
func (*Encoding) MarshalFields ¶
MarshalFields implements shared.MarshalFieldsProvider for export.
func (*Encoding) MarshalJSON ¶
func (*Encoding) MarshalYAML ¶
func (*Encoding) PrefixEncoding ¶
func (*Encoding) SetAllowReserved ¶
func (*Encoding) SetContentType ¶
func (*Encoding) SetExplode ¶
func (*Encoding) SetItemEncoding ¶
func (*Encoding) SetPrefixEncoding ¶
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.1.0#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) SerializedValue ¶
func (*Example) SetDataValue ¶
func (*Example) SetDescription ¶
func (*Example) SetExternalValue ¶
func (*Example) SetSerializedValue ¶
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.1.0#external-documentation-object
func NewExternalDocumentation ¶
func NewExternalDocumentation(description, url 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.1.0#header-object
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 HeaderFields ¶
type HeaderFields struct {
Description string
Required bool
Deprecated bool
AllowEmptyValue bool
Style string
Explode *bool
AllowReserved bool
Schema *RefSchema
Example interface{}
Examples map[string]*RefExample
Content map[string]*MediaType
}
HeaderFields holds all fields for constructing a Header.
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.1.0#info-object
func NewInfo ¶
func NewInfo(title, summary, description, termsOfService, version string, contact *Contact, license *License) *Info
NewInfo creates a new Info instance with all spec-defined fields.
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) SetSummary ¶
func (*Info) SetTermsOfService ¶
func (*Info) SetVersion ¶
func (*Info) TermsOfService ¶
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.1.0#license-object
func NewLicense ¶
NewLicense creates a new License instance.
func (*License) Identifier ¶
func (*License) MarshalFields ¶
MarshalFields implements shared.MarshalFieldsProvider for export.
func (*License) MarshalJSON ¶
func (*License) MarshalYAML ¶
func (*License) SetIdentifier ¶
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.1.0#link-object
func NewLink ¶
func NewLink(operationRef, operationID, description string, parameters map[string]interface{}, requestBody interface{}, 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.1.0#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) Description ¶
func (*MediaType) Examples ¶
func (m *MediaType) Examples() map[string]*RefExample
func (*MediaType) ItemEncoding ¶
func (*MediaType) ItemSchema ¶
func (*MediaType) MarshalFields ¶
MarshalFields implements shared.MarshalFieldsProvider for export.
func (*MediaType) MarshalJSON ¶
func (*MediaType) MarshalYAML ¶
func (*MediaType) PrefixEncoding ¶
func (*MediaType) SetDescription ¶
func (*MediaType) SetEncoding ¶
func (*MediaType) SetExample ¶
func (*MediaType) SetExamples ¶
func (m *MediaType) SetExamples(examples map[string]*RefExample) error
func (*MediaType) SetItemEncoding ¶
func (*MediaType) SetItemSchema ¶
func (*MediaType) SetPrefixEncoding ¶
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.1.0#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) DeviceAuthorizationURL ¶
func (*OAuthFlow) MarshalFields ¶
MarshalFields implements shared.MarshalFieldsProvider for export.
func (*OAuthFlow) MarshalJSON ¶
func (*OAuthFlow) MarshalYAML ¶
func (*OAuthFlow) RefreshURL ¶
func (*OAuthFlow) SetAuthorizationURL ¶
func (*OAuthFlow) SetDeviceAuthorizationURL ¶
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.1.0#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) DeviceAuthorization ¶
func (f *OAuthFlows) DeviceAuthorization() *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) SetDeviceAuthorization ¶
func (f *OAuthFlows) SetDeviceAuthorization(deviceAuthorization *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.1.0#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) JsonSchemaDialect ¶
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) SetJsonSchemaDialect ¶
func (*OpenAPI) SetOpenAPIVersion ¶
func (*OpenAPI) SetProperty ¶
SetProperty sets a named property on the OpenAPI document. Used by parsers for post-construction field assignment.
func (*OpenAPI) SetSecurity ¶
func (o *OpenAPI) SetSecurity(security []SecurityRequirement) error
func (*OpenAPI) SetServers ¶
func (*OpenAPI) SetWebhooks ¶
func (o *OpenAPI) SetWebhooks(webhooks map[string]*RefPathItem) error
func (*OpenAPI) Webhooks ¶
func (o *OpenAPI) Webhooks() map[string]*RefPathItem
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.1.0#operation-object
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) SetProperty ¶
SetProperty sets a named property on the Operation. Used by parsers for post-construction field assignment.
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.1.0#parameter-object
func NewParameter ¶
func NewParameter(f ParameterFields) *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 ParameterFields ¶
type ParameterFields struct {
Name string
In string
Description string
Required bool
Deprecated bool
AllowEmptyValue bool
Style string
Explode *bool
AllowReserved bool
Schema *RefSchema
Example interface{}
Examples map[string]*RefExample
Content map[string]*MediaType
}
ParameterFields holds all fields for constructing a Parameter.
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.1.0#path-item-object
func (*PathItem) AdditionalOperations ¶
func (*PathItem) Description ¶
func (*PathItem) MarshalFields ¶
MarshalFields implements shared.MarshalFieldsProvider for export.
func (*PathItem) MarshalJSON ¶
func (*PathItem) MarshalYAML ¶
func (*PathItem) Parameters ¶
func (p *PathItem) Parameters() []*RefParameter
func (*PathItem) SetAdditionalOperations ¶
func (*PathItem) SetDescription ¶
func (*PathItem) SetOptions ¶
func (*PathItem) SetParameters ¶
func (p *PathItem) SetParameters(parameters []*RefParameter) error
func (*PathItem) SetProperty ¶
SetProperty sets a named property on the PathItem. Used by parsers for post-construction field assignment.
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.1.0#paths-object
func (*Paths) MarshalFields ¶
MarshalFields implements shared.MarshalFieldsProvider for export.
func (*Paths) MarshalJSON ¶
func (*Paths) MarshalYAML ¶
type RefCallback ¶
type RefCallback = shared.RefWithMeta[Callback]
func NewRefCallback ¶
func NewRefCallback(ref string) *RefCallback
type RefExample ¶
type RefExample = shared.RefWithMeta[Example]
func NewRefExample ¶
func NewRefExample(ref string) *RefExample
type RefMediaType ¶
type RefMediaType = shared.RefWithMeta[MediaType]
func NewRefMediaType ¶
func NewRefMediaType(ref string) *RefMediaType
type RefParameter ¶
type RefParameter = shared.RefWithMeta[Parameter]
func NewRefParameter ¶
func NewRefParameter(ref string) *RefParameter
type RefPathItem ¶
type RefPathItem = shared.RefWithMeta[PathItem]
func NewRefPathItem ¶
func NewRefPathItem(ref string) *RefPathItem
type RefRequestBody ¶
type RefRequestBody = shared.RefWithMeta[RequestBody]
func NewRefRequestBody ¶
func NewRefRequestBody(ref string) *RefRequestBody
type RefResponse ¶
type RefResponse = shared.RefWithMeta[Response]
func NewRefResponse ¶
func NewRefResponse(ref string) *RefResponse
type RefSchema ¶
type RefSchema = shared.RefWithMeta[Schema]
RefWithMeta type aliases — use these instead of shared.RefWithMeta[T] throughout the package.
func NewRefSchema ¶
type RefSecurityScheme ¶
type RefSecurityScheme = shared.RefWithMeta[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.1.0#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 (r *RequestBody) Content() map[string]*MediaType
func (*RequestBody) Description ¶
func (r *RequestBody) Description() string
func (*RequestBody) MarshalFields ¶
func (r *RequestBody) MarshalFields() []shared.Field
MarshalFields implements shared.MarshalFieldsProvider for export.
func (*RequestBody) MarshalJSON ¶
func (r *RequestBody) MarshalJSON() ([]byte, error)
func (*RequestBody) MarshalYAML ¶
func (r *RequestBody) MarshalYAML() (interface{}, error)
func (*RequestBody) Required ¶
func (r *RequestBody) Required() bool
func (*RequestBody) SetContent ¶
func (r *RequestBody) SetContent(content map[string]*MediaType) error
func (*RequestBody) SetDescription ¶
func (r *RequestBody) SetDescription(description string) error
func (*RequestBody) SetRequired ¶
func (r *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.1.0#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 ¶
func (*Response) SetSummary ¶
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.1.0#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 OpenAPI 3.1 Schema Object. Based on JSON Schema Draft 2020-12. https://spec.openapis.org/oas/v3.1.0#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 SchemaFields.
func (*Schema) AdditionalProperties ¶
func (*Schema) AdditionalPropertiesAllowed ¶
func (*Schema) ContentEncoding ¶
func (*Schema) ContentMediaType ¶
func (*Schema) ContentSchema ¶
func (*Schema) DependentSchemas ¶
func (*Schema) Deprecated ¶
func (*Schema) Description ¶
func (*Schema) Discriminator ¶
func (s *Schema) Discriminator() *Discriminator
func (*Schema) DynamicAnchor ¶
func (*Schema) DynamicRef ¶
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) PrefixItems ¶
func (*Schema) Properties ¶
func (*Schema) SetAdditionalProperties ¶
func (*Schema) SetAdditionalPropertiesAllowed ¶
func (*Schema) SetContentEncoding ¶
func (*Schema) SetContentMediaType ¶
func (*Schema) SetContentSchema ¶
func (*Schema) SetDefault ¶
func (*Schema) SetDependentSchemas ¶
func (*Schema) SetDeprecated ¶
func (*Schema) SetDescription ¶
func (*Schema) SetDiscriminator ¶
func (s *Schema) SetDiscriminator(discriminator *Discriminator) error
func (*Schema) SetDynamicAnchor ¶
func (*Schema) SetDynamicRef ¶
func (*Schema) SetExample ¶
func (*Schema) SetExamples ¶
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) SetPattern ¶
func (*Schema) SetPrefixItems ¶
func (*Schema) SetProperties ¶
func (*Schema) SetReadOnly ¶
func (*Schema) SetRequired ¶
func (*Schema) SetType ¶
func (s *Schema) SetType(schemaType SchemaType) error
func (*Schema) SetUnevaluatedItems ¶
func (*Schema) SetUnevaluatedProperties ¶
func (*Schema) SetUniqueItems ¶
func (*Schema) SetWriteOnly ¶
func (*Schema) Type ¶
func (s *Schema) Type() SchemaType
func (*Schema) UnevaluatedItems ¶
func (*Schema) UnevaluatedProperties ¶
func (*Schema) UniqueItems ¶
type SchemaFields ¶
type SchemaFields struct {
Title string
MultipleOf *float64
Maximum *float64
ExclusiveMaximum *float64
Minimum *float64
ExclusiveMinimum *float64
MaxLength *uint64
MinLength *uint64
Pattern string
MaxItems *uint64
MinItems *uint64
UniqueItems bool
MaxProperties *uint64
MinProperties *uint64
Required []string
Enum []interface{}
Type SchemaType
AllOf []*RefSchema
OneOf []*RefSchema
AnyOf []*RefSchema
Not *RefSchema
Items *RefSchema
Properties map[string]*RefSchema
Description string
Format string
Default interface{}
AdditionalProperties *RefSchema
AdditionalPropertiesAllowed *bool
// JSON Schema 2020-12
Const interface{}
If *RefSchema
Then *RefSchema
Else *RefSchema
DependentSchemas map[string]*RefSchema
PrefixItems []*RefSchema
Anchor string
DynamicRef string
DynamicAnchor string
ContentEncoding string
ContentMediaType string
ContentSchema *RefSchema
UnevaluatedItems *RefSchema
UnevaluatedProperties *RefSchema
Examples []interface{}
// OpenAPI extensions
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 55+ parameter constructor.
type SchemaType ¶
type SchemaType struct {
// Single is set when the type is a single string value (e.g. "string").
Single string
// Array is set when the type is an array of strings (e.g. ["string", "null"]).
Array []string
}
SchemaType represents a JSON Schema type field that can be either a single string or an array of strings (JSON Schema Draft 2020-12).
func (SchemaType) IsEmpty ¶
func (t SchemaType) IsEmpty() bool
IsEmpty returns true if no type was specified.
func (SchemaType) MarshalJSON ¶
func (t SchemaType) MarshalJSON() ([]byte, error)
func (SchemaType) MarshalYAML ¶
func (t SchemaType) MarshalYAML() (interface{}, error)
func (SchemaType) Values ¶
func (t SchemaType) Values() []string
Values returns all type values as a slice, whether specified as single or array.
type SecurityRequirement ¶
SecurityRequirement lists required security schemes to execute an operation. https://spec.openapis.org/oas/v3.1.0#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.1.0#security-scheme-object
func NewSecurityScheme ¶
func NewSecurityScheme(schemeType, description, name, in, scheme, bearerFormat, openIDConnectURL string, flows *OAuthFlows) *SecurityScheme
NewSecurityScheme creates a new SecurityScheme instance.
func (*SecurityScheme) BearerFormat ¶
func (s *SecurityScheme) BearerFormat() string
func (*SecurityScheme) Deprecated ¶
func (s *SecurityScheme) Deprecated() *bool
func (*SecurityScheme) Description ¶
func (s *SecurityScheme) Description() string
func (*SecurityScheme) Flows ¶
func (s *SecurityScheme) Flows() *OAuthFlows
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) OAuth2MetadataURL ¶
func (s *SecurityScheme) OAuth2MetadataURL() string
func (*SecurityScheme) OpenIDConnectURL ¶
func (s *SecurityScheme) OpenIDConnectURL() string
func (*SecurityScheme) Scheme ¶
func (s *SecurityScheme) Scheme() string
func (*SecurityScheme) SetBearerFormat ¶
func (s *SecurityScheme) SetBearerFormat(bearerFormat string) error
func (*SecurityScheme) SetDeprecated ¶
func (s *SecurityScheme) SetDeprecated(deprecated *bool) error
func (*SecurityScheme) SetDescription ¶
func (s *SecurityScheme) SetDescription(description string) error
func (*SecurityScheme) SetFlows ¶
func (s *SecurityScheme) SetFlows(flows *OAuthFlows) error
func (*SecurityScheme) SetIn ¶
func (s *SecurityScheme) SetIn(in string) error
func (*SecurityScheme) SetName ¶
func (s *SecurityScheme) SetName(name string) error
func (*SecurityScheme) SetOAuth2MetadataURL ¶
func (s *SecurityScheme) SetOAuth2MetadataURL(oauth2MetadataURL string) error
func (*SecurityScheme) SetOpenIDConnectURL ¶
func (s *SecurityScheme) SetOpenIDConnectURL(openIDConnectURL string) error
func (*SecurityScheme) SetScheme ¶
func (s *SecurityScheme) SetScheme(scheme string) error
func (*SecurityScheme) SetType ¶
func (s *SecurityScheme) SetType(schemeType string) error
func (*SecurityScheme) Type ¶
func (s *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.1.0#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.1.0#server-variable-object
func NewServerVariable ¶
func NewServerVariable(enum []string, defaultValue, description string) *ServerVariable
NewServerVariable creates a new ServerVariable instance.
func (*ServerVariable) Default ¶
func (v *ServerVariable) Default() string
func (*ServerVariable) Description ¶
func (v *ServerVariable) Description() string
func (*ServerVariable) Enum ¶
func (v *ServerVariable) Enum() []string
func (*ServerVariable) MarshalFields ¶
func (v *ServerVariable) MarshalFields() []shared.Field
MarshalFields implements shared.MarshalFieldsProvider for export.
func (*ServerVariable) MarshalJSON ¶
func (v *ServerVariable) MarshalJSON() ([]byte, error)
func (*ServerVariable) MarshalYAML ¶
func (v *ServerVariable) MarshalYAML() (interface{}, error)
func (*ServerVariable) SetDefault ¶
func (v *ServerVariable) SetDefault(defaultVal string) error
func (*ServerVariable) SetDescription ¶
func (v *ServerVariable) SetDescription(description string) error
func (*ServerVariable) SetEnum ¶
func (v *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.1.0#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
func (*Tag) SetSummary ¶
type Trix ¶
type Trix struct {
shared.Trix // promotes Source, Errors, OnSet, RunHooks
// ResolvedDynamicRef holds the schema resolved from $dynamicRef (Schema only).
ResolvedDynamicRef *RefSchema `json:"-" yaml:"-"`
// 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.1.0#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
- schema_type.go
- security_requirement.go
- security_scheme.go
- server.go
- server_variable.go
- tag.go
- xml.go