objects

package
v0.0.0-...-70d4dd9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 11, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Convert

func Convert(i interface{}) interface{}

Convert changes all the `map[interface{}]interface{}` values into `map[string]interface{}` and whole numbers (float64) into integers.

func ConvertArray

func ConvertArray(in []interface{}) []interface{}

Types

type Callback

type Callback struct {
	CallbackFields
	SpecificationExtensions
}

A map of possible out-of band callbacks related to the parent operation. Each value in the map is a Path Item Object that describes a set of requests that may be initiated by the API provider and the expected responses.

func (Callback) MarshalJSON

func (c Callback) MarshalJSON() ([]byte, error)

func (Callback) MarshalYAML

func (c Callback) MarshalYAML() (interface{}, error)

func (*Callback) UnmarshalJSON

func (c *Callback) UnmarshalJSON(data []byte) error

func (*Callback) UnmarshalYAML

func (c *Callback) UnmarshalYAML(data []byte) error

type CallbackFields

type CallbackFields map[string]PathItem

type Components

type Components struct {
	ComponentsFields
	SpecificationExtensions
}

Components holds a set of reusable objects for different aspects of the OAS. All objects defined within the components object will have no effect on the API unless they are explicitly referenced from properties outside the components object.

Key must match `^[a-zA-Z0-9\.\-_]+$`.

func (Components) MarshalJSON

func (c Components) MarshalJSON() ([]byte, error)

func (Components) MarshalYAML

func (c Components) MarshalYAML() (interface{}, error)

func (*Components) UnmarshalJSON

func (c *Components) UnmarshalJSON(data []byte) error

func (*Components) UnmarshalYAML

func (c *Components) UnmarshalYAML(data []byte) error

type ComponentsFields

type ComponentsFields struct {
	// An object to hold reusable Schema Objects.
	Schemas map[string]Schema
	// An object to hold reusable Response Objects.
	Responses map[string]Response
	// An object to hold reusable Parameter Objects.
	Parameters map[string]Parameter
	// An object to hold reusable Example Objects.
	Examples map[string]Example
	// An object to hold reusable RequestBody Objects.
	RequestBodies map[string]RequestBody `yaml:"requestBodies"`
	// An object to hold reusable Header Objects.
	Headers map[string]Header
	// An object to hold reusable SecurityScheme Objects.
	SecuritySchemes map[string]SecurityScheme `yaml:"securitySchemes"`
	// An object to hold reusable Link Objects.
	Links map[string]Link
	// An object to hold reusable Callback Objects.
	Callbacks map[string]Callback
}

type Contact

type Contact struct {
	ContactFields
	SpecificationExtensions
}

Contact information for the exposed API.

func (Contact) MarshalJSON

func (c Contact) MarshalJSON() ([]byte, error)

func (Contact) MarshalYAML

func (c Contact) MarshalYAML() (interface{}, error)

func (*Contact) UnmarshalJSON

func (c *Contact) UnmarshalJSON(data []byte) error

func (*Contact) UnmarshalYAML

func (c *Contact) UnmarshalYAML(data []byte) error

type ContactFields

type ContactFields struct {
	// The identifying name of the contact person/organization.
	Name string
	// The URL pointing to the contact information.
	URL string
	// The email address of the contact person/organization.
	Email string
}

type Discriminator

type Discriminator struct {
	// The name of the property in the payload that will hold the discriminator value.
	PropertyName string `yaml:"propertyName" oas3:"REQUIRED"`
	// An object to hold mappings between payload values and schema names or references.
	Mapping map[string]string
}

Discriminator can be used to aid in serialization, deserialization, and validation when request bodies or response payloads may be one of a number of different schemas.

type Encoding

type Encoding struct {
	EncodingFields
	SpecificationExtensions
}

Encoding is an encoding definition applied to a single schema property.

func (Encoding) MarshalJSON

func (e Encoding) MarshalJSON() ([]byte, error)

func (Encoding) MarshalYAML

func (e Encoding) MarshalYAML() (interface{}, error)

func (*Encoding) UnmarshalJSON

func (e *Encoding) UnmarshalJSON(data []byte) error

func (*Encoding) UnmarshalYAML

func (e *Encoding) UnmarshalYAML(data []byte) error

type EncodingFields

type EncodingFields struct {
	// The Content-Type for encoding a specific property.
	ContentType string `yaml:"contentType"`
	// A map allowing additional information to be provided as headers.
	Headers map[string]Header
	// Describes how a specific property value will be serialized depending on its type.
	Style string
	// When this is true, property values of type array or object generate separate
	// parameters for each value of the array, or key-value-pair of the map.
	Explode bool
	// Determines whether the parameter value SHOULD allow reserved characters, as defined
	// by RFC3986 `:/?#[]@!$&'()*+,;=` to be included without percent-encoding.
	AllowReserved bool `yaml:"allowReserved"`
}

type Example

type Example struct {
	ExampleFields
	SpecificationExtensions
}

func (Example) MarshalJSON

func (e Example) MarshalJSON() ([]byte, error)

func (Example) MarshalYAML

func (e Example) MarshalYAML() (interface{}, error)

func (*Example) UnmarshalJSON

func (e *Example) UnmarshalJSON(data []byte) error

func (*Example) UnmarshalYAML

func (e *Example) UnmarshalYAML(data []byte) error

type ExampleFields

type ExampleFields struct {
	// Short description for the example.
	Summary string
	// Long description for the example.
	Description string
	// Embedded literal example.
	Value interface{}
	// A URL that points to the literal example.
	ExternalValue string `yaml:"externalValue"`
}

type ExternalDocumentation

type ExternalDocumentation struct {
	ExternalDocumentationFields
	SpecificationExtensions
}

ExternalDocumentation allows referencing an external resource for extended documentation.

func (ExternalDocumentation) MarshalJSON

func (d ExternalDocumentation) MarshalJSON() ([]byte, error)

func (ExternalDocumentation) MarshalYAML

func (d ExternalDocumentation) MarshalYAML() (interface{}, error)

func (*ExternalDocumentation) UnmarshalJSON

func (d *ExternalDocumentation) UnmarshalJSON(data []byte) error

func (*ExternalDocumentation) UnmarshalYAML

func (d *ExternalDocumentation) UnmarshalYAML(data []byte) error

type ExternalDocumentationFields

type ExternalDocumentationFields struct {
	// A short description of the target documentation.
	Description string
	// The URL for the target documentation.
	URL string `oas3:"REQUIRED"`
}
type Header struct {
	ParameterFields
	SpecificationExtensions
}

Header follows the structure of the Parameter Object with the following changes:

  • Name must not be specified, it is given in the corresponding headers map.
  • In must not be specified, it is implicitly in header.
  • All traits that are affected by the location MUST be applicable to a location of header (for example, style).

func (Header) MarshalJSON

func (h Header) MarshalJSON() ([]byte, error)

func (Header) MarshalYAML

func (h Header) MarshalYAML() (interface{}, error)

func (*Header) UnmarshalJSON

func (h *Header) UnmarshalJSON(data []byte) error

func (*Header) UnmarshalYAML

func (h *Header) UnmarshalYAML(data []byte) error

type Info

type Info struct {
	InfoFields
	SpecificationExtensions
}

Info provides metadata about the API. The metadata MAY be used by the clients if needed, and MAY be presented in editing or documentation generation tools for convenience.

func (Info) MarshalJSON

func (a Info) MarshalJSON() ([]byte, error)

func (Info) MarshalYAML

func (a Info) MarshalYAML() (interface{}, error)

func (*Info) UnmarshalJSON

func (a *Info) UnmarshalJSON(data []byte) error

func (*Info) UnmarshalYAML

func (a *Info) UnmarshalYAML(data []byte) error

type InfoFields

type InfoFields struct {
	// The title of the API.
	Title string `oas3:"REQUIRED"`
	// A short description of the API.
	Description string
	// A URL to the Terms of Service for the API.
	TermsOfService string `yaml:"termsOfService"`
	// The contact information for the exposed API.
	Contact Contact
	// The license information for the exposed API.
	License License
	// The version of the OpenAPI document itself.
	Version string `oas3:"REQUIRED"`
}

type License

type License struct {
	LicenseFields
	SpecificationExtensions
}

License information for the exposed API.

func (License) MarshalJSON

func (l License) MarshalJSON() ([]byte, error)

func (License) MarshalYAML

func (l License) MarshalYAML() (interface{}, error)

func (*License) UnmarshalJSON

func (l *License) UnmarshalJSON(data []byte) error

func (*License) UnmarshalYAML

func (l *License) UnmarshalYAML(data []byte) error

type LicenseFields

type LicenseFields struct {
	// The license name used for the API.
	Name string `oas3:"REQUIRED"`
	// A URL to the license used for the API.
	URL string
}
type Link struct {
	LinkFields
	SpecificationExtensions
}

Link represents a possible design-time link for a response.

func (Link) MarshalJSON

func (l Link) MarshalJSON() ([]byte, error)

func (Link) MarshalYAML

func (l Link) MarshalYAML() (interface{}, error)

func (*Link) UnmarshalJSON

func (l *Link) UnmarshalJSON(data []byte) error

func (*Link) UnmarshalYAML

func (l *Link) UnmarshalYAML(data []byte) error

type LinkFields

type LinkFields struct {
	// A relative or absolute URI reference to an OAS operation.
	OperationRef string `yaml:"operationRef"`
	// The name of an existing, resolvable OAS operation, as defined with a unique
	// OperationID.
	OperationID string `yaml:"operationId"`
	// A map representing parameters to pass to an operation as specified with OperationID
	// or identified via OperationRef.
	Parameters map[string]interface{}
	// A literal value or expression to use as a request body when calling the target
	// operation.
	RequestBody interface{} `yaml:"requestBody"`
	// A description of the link.
	Description string
	// A server object to be used by the target operation.
	Server Server
}

type MediaType

type MediaType struct {
	MediaTypeFields
	SpecificationExtensions
}

MediaType provides a schema and examples for the media type identified by its key.

func (MediaType) MarshalJSON

func (t MediaType) MarshalJSON() ([]byte, error)

func (MediaType) MarshalYAML

func (t MediaType) MarshalYAML() (interface{}, error)

func (*MediaType) UnmarshalJSON

func (t *MediaType) UnmarshalJSON(data []byte) error

func (*MediaType) UnmarshalYAML

func (t *MediaType) UnmarshalYAML(data []byte) error

type MediaTypeFields

type MediaTypeFields struct {
	// The schema defining the content of the request, response, or parameter.
	Schema Schema
	// Example of the media type.
	Example interface{}
	// Examples of the media type.
	Examples map[string]Example
	// A map between a property name and its encoding information.
	Encoding map[string]Encoding
}

type OAuthFlow

type OAuthFlow struct {
	OAuthFlowFields
	SpecificationExtensions
}

OAuthFlow allows configuration of the supported OAuth Flows.

func (OAuthFlow) MarshalJSON

func (f OAuthFlow) MarshalJSON() ([]byte, error)

func (OAuthFlow) MarshalYAML

func (f OAuthFlow) MarshalYAML() (interface{}, error)

func (*OAuthFlow) UnmarshalJSON

func (f *OAuthFlow) UnmarshalJSON(data []byte) error

func (*OAuthFlow) UnmarshalYAML

func (f *OAuthFlow) UnmarshalYAML(data []byte) error

type OAuthFlowFields

type OAuthFlowFields struct {
	// The authorization URL to be used for this flow.
	AuthorizationURL string `yaml:"authorizationUrl" oas3:"REQUIRED"`
	// The token URL to be used for this flow.
	TokenURL string `yaml:"tokenUrl" oas3:"REQUIRED"`
	// The URL to be used for obtaining refresh tokens.
	RefreshURL string `yaml:"refreshUrl"`
	// The available scopes for the OAuth2 security scheme. A map between the scope name
	// and a short description for it. The map may be empty.
	Scopes map[string]string `oas3:"REQUIRED"`
}

type OAuthFlows

type OAuthFlows struct {
	OAuthFlowsFields
	SpecificationExtensions
}

OAuthFlows are configuration details for a supported OAuth Flow.

func (OAuthFlows) MarshalJSON

func (f OAuthFlows) MarshalJSON() ([]byte, error)

func (OAuthFlows) MarshalYAML

func (f OAuthFlows) MarshalYAML() (interface{}, error)

func (*OAuthFlows) UnmarshalJSON

func (f *OAuthFlows) UnmarshalJSON(data []byte) error

func (*OAuthFlows) UnmarshalYAML

func (f *OAuthFlows) UnmarshalYAML(data []byte) error

type OAuthFlowsFields

type OAuthFlowsFields struct {
	// Configuration for the OAuth Implicit flow
	Implicit OAuthFlow
	// Configuration for the OAuth Resource Owner Password flow.
	Password OAuthFlow
	// Configuration for the OAuth Client Credentials flow. Previously called
	// `application` in OpenAPI 2.0.
	ClientCredentials OAuthFlow `yaml:"clientCredentials"`
	// Configuration for the OAuth Authorization Code flow. Previously called `accessCode`
	// in OpenAPI 2.0.
	AuthorizationCode OAuthFlow `yaml:"authorizationCode"`
}

type OpenAPI

type OpenAPI struct {
	OpenAPIFields
	SpecificationExtensions
}

OpenAPI is the root document object of the OpenAPI document.

func (OpenAPI) MarshalJSON

func (a OpenAPI) MarshalJSON() ([]byte, error)

func (OpenAPI) MarshalYAML

func (a OpenAPI) MarshalYAML() (interface{}, error)

func (*OpenAPI) UnmarshalJSON

func (a *OpenAPI) UnmarshalJSON(data []byte) error

func (*OpenAPI) UnmarshalYAML

func (a *OpenAPI) UnmarshalYAML(data []byte) error

type OpenAPIFields

type OpenAPIFields struct {
	// This string MUST be the semantic version number of the OpenAPI Specification
	// version that the OpenAPI document uses.
	OpenAPI string `yaml:"openapi" oas3:"REQUIRED"`
	// Provides metadata about the API.
	Info Info `oas3:"REQUIRED"`
	// An array of Server Objects, which provide connectivity information to a target
	// server. The default value would be a Server Object with a url value of `/`.
	Servers []Server
	// The available paths and operations for the API.
	Paths Paths `oas3:"REQUIRED"`
	// An element to hold various schemas for the specification.
	Components Components
	// A declaration of which security mechanisms can be used across the API.
	Security []SecurityRequirement
	// A list of tags used by the specification with additional metadata.
	Tags []Tag
	// Additional external documentation.
	ExternalDocs ExternalDocumentation `yaml:"externalDocs"`
}

type Operation

type Operation struct {
	OperationFields
	SpecificationExtensions
}

Operation describes a single API operation on a path.

func (Operation) MarshalJSON

func (o Operation) MarshalJSON() ([]byte, error)

func (Operation) MarshalYAML

func (o Operation) MarshalYAML() (interface{}, error)

func (*Operation) UnmarshalJSON

func (o *Operation) UnmarshalJSON(data []byte) error

func (*Operation) UnmarshalYAML

func (o *Operation) UnmarshalYAML(data []byte) error

type OperationFields

type OperationFields struct {
	// A list of tags for API documentation control.
	Tags []string
	// A short summary of what the operation does.
	Summary string
	// A verbose explanation of the operation behavior.
	Description string
	// Additional external documentation for this operation.
	ExternalDocs ExternalDocumentation `yaml:"externalDocs"`
	// Unique string used to identify the operation.
	OperationID string `yaml:"operationId"`
	// A list of parameters that are applicable for this operation. If a parameter is
	// already defined at the Path Item, the new definition will override it but can never
	// remove it.
	Parameters []Parameter
	// The request body applicable for this operation.
	RequestBody RequestBody `yaml:"requestBody"`
	// The list of possible responses as they are returned from executing this operation.
	Responses Responses `oas3:"REQUIRED"`
	// A map of possible out-of band callbacks related to the parent operation.
	Callbacks map[string]Callback
	// Declares this operation to be deprecated. Consumers should refrain from usage of
	// the declared operation. Default value is false.
	Deprecated bool
	// A declaration of which security mechanisms can be used for this operation.
	Security []SecurityRequirement
	// An alternative server array to service this operation. If an alternative server
	// object is specified at the PathItem Object or Root level, it will be overridden by
	// this value.
	Servers []Server
}

type Parameter

type Parameter struct {
	ParameterFields
	SpecificationExtensions
}

Parameter describes a single operation parameter. A unique parameter is defined by a combination of a name and location.

Parameter Locations There are four possible parameter locations specified by the in field:

  • path: Used together with Path Templating, where the parameter value is actually part of the operation's URL. This does not include the host or base path of the API. For example, in /items/{itemId}, the path parameter is itemId.
  • query: Parameters that are appended to the URL. For example, in /items?id=###, the query parameter is id.
  • header: Custom headers that are expected as part of the request. Note that RFC7230 states header names are case insensitive.
  • cookie: Used to pass a specific cookie value to the API.

func (Parameter) MarshalJSON

func (p Parameter) MarshalJSON() ([]byte, error)

func (Parameter) MarshalYAML

func (p Parameter) MarshalYAML() (interface{}, error)

func (*Parameter) UnmarshalJSON

func (p *Parameter) UnmarshalJSON(data []byte) error

func (*Parameter) UnmarshalYAML

func (p *Parameter) UnmarshalYAML(data []byte) error

type ParameterFields

type ParameterFields struct {
	// The name of the parameter. Parameter names are case sensitive.
	Name string `oas3:"REQUIRED"`
	// The location of the parameter.
	// Possible values are "query", "header", "path" or "cookie".
	In string `oas3:"REQUIRED"`
	// A brief description of the parameter.
	Description string
	// Determines whether this parameter is mandatory.
	Required bool `oas3:"REQUIRED"`
	// Specifies that a parameter is deprecated and should be transitioned out of usage.
	// Default value is false.
	Deprecated bool
	// Sets the ability to pass empty-valued parameters.
	AllowEmptyValue bool `yaml:"allowEmptyValue"`

	// Describes how the parameter value will be serialized depending on the type of the
	// parameter value.
	Style string
	// When this is true, parameter values of type array or object generate separate
	// parameters for each value of the array or key-value pair of the map.
	Explode bool
	// Determines whether the parameter value SHOULD allow reserved characters, as defined
	// by RFC3986 `:/?#[]@!$&'()*+,;=` to be included without percent-encoding.
	AllowReserved bool `yaml:"allowReserved"`
	// The schema defining the type used for the parameter.
	Schema Schema

	// Example of the parameter's potential value.
	Example interface{}
	// Examples of the parameter's potential value.
	Examples map[string]Example

	// A map containing the representations for the parameter.
	Content map[string]MediaType
}

type PathItem

type PathItem struct {
	PathItemFields
	SpecificationExtensions
}

Describes the operations available on a single path. The path itself is still exposed to the documentation viewer but they will not know which operations and parameters are available.

func (PathItem) MarshalJSON

func (p PathItem) MarshalJSON() ([]byte, error)

func (PathItem) MarshalYAML

func (p PathItem) MarshalYAML() (interface{}, error)

func (*PathItem) UnmarshalJSON

func (p *PathItem) UnmarshalJSON(data []byte) error

func (*PathItem) UnmarshalYAML

func (p *PathItem) UnmarshalYAML(data []byte) error

type PathItemFields

type PathItemFields struct {
	// Allows for an external definition of this path item.
	Ref string
	// An optional, string summary, intended to apply to all operations in this path.
	Summary string
	// An optional, string description, intended to apply to all operations in this path.
	Description string
	// A definition of a GET operation on this path.
	Get Operation
	// A definition of a PUT operation on this path.
	Put Operation
	// A definition of a POST operation on this path.
	Post Operation
	// A definition of a DELETE operation on this path.
	Delete Operation
	// A definition of a OPTIONS operation on this path.
	Options Operation
	// A definition of a HEAD operation on this path.
	Head Operation
	// A definition of a PATCH operation on this path.
	Patch Operation
	// A definition of a TRACE operation on this path.
	Trace Operation
	// An alternative server array to service all operations in this path.
	Servers []Server
	// A list of parameters that are applicable for all the operations described under
	// this path.
	Parameters []Parameter
}

type Paths

type Paths struct {
	PathsFields
	SpecificationExtensions
}

Paths holds the relative paths to the individual endpoints and their operations. The path is appended to the URL from the Server Object in order to construct the full URL.

Key is a relative path to an individual endpoint and must begin with a forward slash.

func (Paths) MarshalJSON

func (p Paths) MarshalJSON() ([]byte, error)

func (Paths) MarshalYAML

func (p Paths) MarshalYAML() (interface{}, error)

func (*Paths) UnmarshalJSON

func (p *Paths) UnmarshalJSON(data []byte) error

func (*Paths) UnmarshalYAML

func (p *Paths) UnmarshalYAML(data []byte) error

type PathsFields

type PathsFields map[string]PathItem

type RequestBody

type RequestBody struct {
	RequestBodyFields
	SpecificationExtensions
}

RequestBody describes a single request body.

func (RequestBody) MarshalJSON

func (f RequestBody) MarshalJSON() ([]byte, error)

func (RequestBody) MarshalYAML

func (f RequestBody) MarshalYAML() (interface{}, error)

func (*RequestBody) UnmarshalJSON

func (f *RequestBody) UnmarshalJSON(data []byte) error

func (*RequestBody) UnmarshalYAML

func (f *RequestBody) UnmarshalYAML(data []byte) error

type RequestBodyFields

type RequestBodyFields struct {
	// A brief description of the request body.
	Description string
	// The content of the request body. The key is a media type or media type range and
	// the value describes it.
	Content map[string]MediaType `oas3:"REQUIRED"`
	// Determines if the request body is required in the request. Defaults to false.
	Required bool
}

type Response

type Response struct {
	ResponseFields
	SpecificationExtensions
}

Response describes a single response from an API Operation, including design-time, static links to operations based on the response.

func (Response) MarshalJSON

func (r Response) MarshalJSON() ([]byte, error)

func (Response) MarshalYAML

func (r Response) MarshalYAML() (interface{}, error)

func (*Response) UnmarshalJSON

func (r *Response) UnmarshalJSON(data []byte) error

func (*Response) UnmarshalYAML

func (r *Response) UnmarshalYAML(data []byte) error

type ResponseFields

type ResponseFields struct {
	// A short description of the response.
	Description string `oas3:"REQUIRED"`
	// Maps a header name to its definition.
	Headers map[string]Header
	// A map containing descriptions of potential response payloads.
	Content map[string]MediaType
	// A map of operations links that can be followed from the response.
	Links map[string]Link
}

type Responses

type Responses struct {
	ResponsesFields
	SpecificationExtensions
}

Responses is a container for the expected responses of an operation.

func (Responses) MarshalJSON

func (r Responses) MarshalJSON() ([]byte, error)

func (Responses) MarshalYAML

func (r Responses) MarshalYAML() (interface{}, error)

func (*Responses) UnmarshalJSON

func (r *Responses) UnmarshalJSON(data []byte) error

func (*Responses) UnmarshalYAML

func (r *Responses) UnmarshalYAML(data []byte) error

type ResponsesFields

type ResponsesFields map[string]Response

type Schema

type Schema struct {
	SchemaFields
	SpecificationExtensions
}

Schema allows the definition of input and output data types.

func (Schema) MarshalJSON

func (s Schema) MarshalJSON() ([]byte, error)

func (Schema) MarshalYAML

func (s Schema) MarshalYAML() (interface{}, error)

func (*Schema) UnmarshalJSON

func (s *Schema) UnmarshalJSON(data []byte) error

func (*Schema) UnmarshalYAML

func (s *Schema) UnmarshalYAML(data []byte) error

type SchemaFields

type SchemaFields map[string]interface{}

type SecurityRequirement

type SecurityRequirement map[string][]string

SecurityRequirement lists the required security schemes to execute this operation.

type SecurityScheme

type SecurityScheme struct {
	SecuritySchemeFields
	SpecificationExtensions
}

SecurityScheme defines a security scheme that can be used by the operations.

func (SecurityScheme) MarshalJSON

func (x SecurityScheme) MarshalJSON() ([]byte, error)

func (SecurityScheme) MarshalYAML

func (x SecurityScheme) MarshalYAML() (interface{}, error)

func (*SecurityScheme) UnmarshalJSON

func (x *SecurityScheme) UnmarshalJSON(data []byte) error

func (*SecurityScheme) UnmarshalYAML

func (x *SecurityScheme) UnmarshalYAML(data []byte) error

type SecuritySchemeFields

type SecuritySchemeFields struct {
	// The type of the security scheme.
	Type string `oas3:"REQUIRED"`
	// A short description for security scheme.
	Description string
	// The name of the header, query or cookie parameter to be used.
	Name string `oas3:"REQUIRED"`
	// The location of the API key. Valid values are "query", "header" or "cookie".
	In string `oas3:"REQUIRED"`
	// The name of the HTTP Authorization scheme to be used in the Authorization header
	// as defined in RFC7235.
	Scheme string `oas3:"REQUIRED"`
	// A hint to the client to identify how the bearer token is formatted.
	BearerFormat string `yaml:"bearerFormat"`
	// An object containing configuration information for the flow types supported.
	Flows OAuthFlows `oas3:"REQUIRED"`
	// OpenId Connect URL to discover OAuth2 configuration values.
	OpenIDConnectURL string `yaml:"openIdConnectUrl" oas3:"REQUIRED"`
}

type Server

type Server struct {
	ServerFields
	SpecificationExtensions
}

Server represents a Server.

func (Server) MarshalJSON

func (s Server) MarshalJSON() ([]byte, error)

func (Server) MarshalYAML

func (s Server) MarshalYAML() (interface{}, error)

func (*Server) UnmarshalJSON

func (s *Server) UnmarshalJSON(data []byte) error

func (*Server) UnmarshalYAML

func (s *Server) UnmarshalYAML(data []byte) error

type ServerFields

type ServerFields struct {
	// A URL to the target host.
	URL string
	// An optional string describing the host designated by the URL.
	Description string
	// A map between a variable name and its value.
	Variables map[string]ServerVariable
}

type ServerVariable

type ServerVariable struct {
	ServerVariableFields
	SpecificationExtensions
}

ServerVariable represents a Server Variable for server URL template substitution.

func (ServerVariable) MarshalJSON

func (v ServerVariable) MarshalJSON() ([]byte, error)

func (ServerVariable) MarshalYAML

func (v ServerVariable) MarshalYAML() (interface{}, error)

func (*ServerVariable) UnmarshalJSON

func (v *ServerVariable) UnmarshalJSON(data []byte) error

func (*ServerVariable) UnmarshalYAML

func (v *ServerVariable) UnmarshalYAML(data []byte) error

type ServerVariableFields

type ServerVariableFields struct {
	// An enumeration of string values to be used if the substitution options are from a
	// limited set.
	Enum []string
	// The default value to use for substitution, which shall be sent if an alternate
	// value is not supplied.
	Default string `oas3:"REQUIRED"`
	// An optional description for the server variable
	Description string
}

type SpecificationExtensions

type SpecificationExtensions map[string]interface{}

func (SpecificationExtensions) MarshalJSON

func (e SpecificationExtensions) MarshalJSON() ([]byte, error)

func (SpecificationExtensions) MarshalYAML

func (e SpecificationExtensions) MarshalYAML() (interface{}, error)

func (*SpecificationExtensions) UnmarshalJSON

func (e *SpecificationExtensions) UnmarshalJSON(data []byte) error

func (*SpecificationExtensions) UnmarshalYAML

func (e *SpecificationExtensions) UnmarshalYAML(data []byte) error

type Tag

type Tag struct {
	TagFields
	SpecificationExtensions
}

Tag adds metadata to a single tag that is used by the Operation Object.

func (Tag) MarshalJSON

func (t Tag) MarshalJSON() ([]byte, error)

func (Tag) MarshalYAML

func (t Tag) MarshalYAML() (interface{}, error)

func (*Tag) UnmarshalJSON

func (t *Tag) UnmarshalJSON(data []byte) error

func (*Tag) UnmarshalYAML

func (t *Tag) UnmarshalYAML(data []byte) error

type TagFields

type TagFields struct {
	// The name of the tag.
	Name string `oas3:"REQUIRED"`
	// A short description for the tag.
	Description string
	// Additional external documentation for this tag.
	ExternalDocs ExternalDocumentation `yaml:"externalDocs"`
}

type XML

type XML struct {
	XMLFields
	SpecificationExtensions
}

XML allows for more fine-tuned XML model definitions.

func (XML) MarshalJSON

func (x XML) MarshalJSON() ([]byte, error)

func (XML) MarshalYAML

func (x XML) MarshalYAML() (interface{}, error)

func (*XML) UnmarshalJSON

func (x *XML) UnmarshalJSON(data []byte) error

func (*XML) UnmarshalYAML

func (x *XML) UnmarshalYAML(data []byte) error

type XMLFields

type XMLFields struct {
	// Replaces the name of the element/attribute used for the described schema property.
	Name string
	// The URI of the namespace definition. Value MUST be in the form of an absolute URI.
	Namespace string
	// The prefix to be used for the Name.
	Prefix string
	// Declares whether the property definition translates to an attribute instead of an
	// element. Default value is false.
	Attribute bool
	// Signifies whether the array is wrapped, may be used only for an array definition.
	Wrapped bool
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL