Documentation ¶
Index ¶
- Variables
- func FindServerVariablesInURL(s string) []string
- func ParseRef(uri, kind string) (name string, err error)
- type AdditionalProperties
- type Callback
- type CallbackRef
- type Components
- type Contact
- type Discriminator
- type Encoding
- type Example
- type ExampleRef
- type Extensions
- type ExternalDocs
- type Header
- type HeaderRef
- type Info
- type License
- type Link
- type LinkRef
- type MediaType
- type OAuthFlow
- type OAuthFlows
- type ObjectUnmarshaler
- type OpenAPI3
- func (o *OpenAPI3) CopyInheritedItems()
- func (o *OpenAPI3) PostProcess(filename string) error
- func (o *OpenAPI3) ResolveAllOfs() error
- func (o *OpenAPI3) ResolveRefs(filename string) error
- func (o *OpenAPI3) UnmarshalJSON(in []byte) error
- func (o *OpenAPI3) UnmarshalYAML(unmarshal func(any) error) error
- func (o *OpenAPI3) Validate() error
- type Operation
- type Parameter
- type ParameterRef
- type Path
- type PathRef
- type Paths
- type RequestBody
- type RequestBodyRef
- type Response
- type ResponseRef
- type Responses
- type Schema
- type SchemaRef
- type SecurityRequirement
- type SecurityScheme
- type SecuritySchemeRef
- type Server
- type ServerVariable
- type Tag
Constants ¶
This section is empty.
Variables ¶
var ( // DebugOutput controls whether or not debug output will be written DebugOutput = false )
Functions ¶
func FindServerVariablesInURL ¶ added in v0.0.28
FindServerVariablesInURL uses a regular expression to parse out server variables of the form {...} in the given string. They may not overlap.
Types ¶
type AdditionalProperties ¶
type AdditionalProperties struct { Bool bool `json:"bool,omitempty" yaml:"bool,omitempty"` *SchemaRef }
AdditionalProperties is ridiculous, a bool or a schema
func (*AdditionalProperties) UnmarshalYAMLObject ¶
func (a *AdditionalProperties) UnmarshalYAMLObject(intf any) error
UnmarshalYAMLObject is called by the unmarshaller to deal with this horrible struct.
type Callback ¶
Callback is 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. The key value used to identify the callback object is an expression, evaluated at runtime, that identifies a URL to use for the callback operation.
type CallbackRef ¶
CallbackRef refers to a callback
type Components ¶
type Components struct { Schemas map[string]*SchemaRef `json:"schemas,omitempty" yaml:"schemas,omitempty"` Responses map[string]*ResponseRef `json:"responses,omitempty" yaml:"responses,omitempty"` Parameters map[string]*ParameterRef `json:"parameters,omitempty" yaml:"parameters,omitempty"` Examples map[string]*ExampleRef `json:"examples,omitempty" yaml:"examples,omitempty"` RequestBodies map[string]*RequestBodyRef `json:"requestBodies,omitempty" yaml:"requestBodies,omitempty"` Headers map[string]*HeaderRef `json:"headers,omitempty" yaml:"headers,omitempty"` SecuritySchemes map[string]*SecuritySchemeRef `json:"securitySchemes,omitempty" yaml:"securitySchemes,omitempty"` Links map[string]*LinkRef `json:"links,omitempty" yaml:"links,omitempty"` Callbacks map[string]*CallbackRef `json:"callbacks,omitempty" yaml:"callbacks,omitempty"` PathItems map[string]*PathRef `json:"pathItems,omitempty" yaml:"pathItems,omitempty"` Extensions `json:"extensions,omitempty" yaml:"extensions,omitempty"` }
Components specify referenceable reusable components
type Contact ¶
type Contact struct { Name *string `json:"name,omitempty" yaml:"name,omitempty"` URL *string `json:"url,omitempty" yaml:"url,omitempty"` Email *string `json:"email,omitempty" yaml:"email,omitempty"` Extensions `json:"extensions,omitempty" yaml:"extensions,omitempty"` }
Contact information for the exposed API.
type Discriminator ¶
type Discriminator struct { PropertyName string `json:"propertyName,omitempty" yaml:"propertyName,omitempty"` Mapping map[string]string `json:"mapping,omitempty" yaml:"mapping,omitempty"` }
Discriminator helps with decoding. When request bodies or response payloads may be one of a number of different schemas, a discriminator object can be used to aid in serialization, deserialization, and validation. The discriminator is a specific object in a schema which is used to inform the consumer of the specification of an alternative schema based on the value associated with it.
type Encoding ¶
type Encoding struct { ContentType *string `json:"contentType,omitempty" yaml:"contentType,omitempty"` Headers map[string]*Header `json:"headers,omitempty" yaml:"headers,omitempty"` Style *string `json:"style,omitempty" yaml:"style,omitempty"` Explode bool `json:"explode,omitempty" yaml:"explode,omitempty"` AllowReserved bool `json:"allowReserved,omitempty" yaml:"allowReserved,omitempty"` Extensions `json:"extensions,omitempty" yaml:"extensions,omitempty"` }
Encoding definition applied to a single schema object
type Example ¶
type Example struct { Summary *string `json:"summary,omitempty" yaml:"summary,omitempty"` Description *string `json:"description,omitempty" yaml:"description,omitempty"` // Value and ExternalValue are mutually exclusive Value interface{} `json:"value,omitempty" yaml:"value,omitempty"` ExternalValue string `json:"externalValue,omitempty" yaml:"externalValue,omitempty"` Extensions `json:"extensions,omitempty" yaml:"extensions,omitempty"` }
Example object
type ExampleRef ¶
ExampleRef refers to an example object
type Extensions ¶
Extensions are for x- extensions to the open api spec, they can be any json value
type ExternalDocs ¶
type ExternalDocs struct { Description *string `json:"description,omitempty" yaml:"description,omitempty"` URL string `json:"url,omitempty" yaml:"url,omitempty"` Extensions `json:"extensions,omitempty" yaml:"extensions,omitempty"` }
ExternalDocs points to external documentation
type Header ¶
type Header struct { Description *string `json:"description,omitempty" yaml:"description,omitempty"` Required bool `json:"required,omitempty" yaml:"required,omitempty"` Deprecated bool `json:"deprecated,omitempty" yaml:"deprecated,omitempty"` AllowEmptyValue bool `json:"allowEmptyValue,omitempty" yaml:"allowEmptyValue,omitempty"` Style *string `json:"style,omitempty" yaml:"style,omitempty"` Explode bool `json:"explode,omitempty" yaml:"explode,omitempty"` AllowReserved bool `json:"allowReserved,omitempty" yaml:"allowReserved,omitempty"` Schema *SchemaRef `json:"schema,omitempty" yaml:"schema,omitempty"` Example interface{} `json:"example,omitempty" yaml:"example,omitempty"` Examples map[string]*Example `json:"examples,omitempty" yaml:"examples,omitempty"` Content map[string]*MediaType `json:"content,omitempty" yaml:"content,omitempty"` Extensions `json:"extensions,omitempty" yaml:"extensions,omitempty"` }
Header object
type Info ¶
type Info struct { Title string `json:"title,omitempty" yaml:"title,omitempty"` Description *string `json:"description,omitempty" yaml:"description,omitempty"` TermsOfService *string `json:"termsOfService,omitempty" yaml:"termsOfService,omitempty"` Contact *Contact `json:"contact,omitempty" yaml:"contact,omitempty"` License *License `json:"license,omitempty" yaml:"license,omitempty"` Version string `json:"version,omitempty" yaml:"version,omitempty"` Extensions `json:"extensions,omitempty" yaml:"extensions,omitempty"` }
Info object 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.
type License ¶
type License struct { Name string `json:"name,omitempty" yaml:"name,omitempty"` URL *string `json:"url,omitempty" yaml:"url,omitempty"` Extensions `json:"extensions,omitempty" yaml:"extensions,omitempty"` }
License information for the exposed API.
type Link ¶
type Link struct { // The following two fields are mutually exclusive OperationRef *string `json:"operationRef,omitempty" yaml:"operationRef,omitempty"` OperationID *string `json:"operationId,omitempty" yaml:"operationId,omitempty"` Parameters map[string]interface{} `json:"parameters,omitempty" yaml:"parameters,omitempty"` RequestBody interface{} `json:"requestBody,omitempty" yaml:"requestBody,omitempty"` Description *string `json:"description,omitempty" yaml:"description,omitempty"` Server *Server `json:"server,omitempty" yaml:"server,omitempty"` }
The Link object represents a possible design-time link for a response. The presence of a link does not guarantee the caller's ability to successfully invoke it, rather it provides a known relationship and traversal mechanism between responses and other operations. Unlike dynamic links (i.e. links provided in the response payload), the OAS linking mechanism does not require link information in the runtime response. For computing links, and providing instructions to execute them, a runtime expression is used for accessing values in an operation and using them as parameters while invoking the linked operation.
type MediaType ¶
type MediaType struct { Schema SchemaRef `json:"schema,omitempty" yaml:"schema,omitempty"` Encoding map[string]*Encoding `json:"encoding,omitempty" yaml:"encoding,omitempty"` Example interface{} `json:"example,omitempty" yaml:"example,omitempty"` Examples map[string]*Example `json:"examples,omitempty" yaml:"examples,omitempty"` Extensions `json:"extensions,omitempty" yaml:"extensions,omitempty"` }
MediaType provides schemas and examples for the media type identified by its key
type OAuthFlow ¶
type OAuthFlow struct { AuthorizationURL string `json:"authorizationUrl,omitempty" yaml:"authorizationUrl,omitempty"` TokenURL string `json:"tokenUrl,omitempty" yaml:"tokenUrl,omitempty"` RefreshURL *string `json:"refreshUrl,omitempty" yaml:"refreshUrl,omitempty"` Scopes map[string]string `json:"scopes,omitempty" yaml:"scopes,omitempty"` Extensions `json:"extensions,omitempty" yaml:"extensions,omitempty"` }
OAuthFlow configuration details
type OAuthFlows ¶
type OAuthFlows struct { Implicit *OAuthFlow `json:"implicit,omitempty" yaml:"implicit,omitempty"` Password *OAuthFlow `json:"password,omitempty" yaml:"password,omitempty"` ClientCredentials *OAuthFlow `json:"clientCredentials,omitempty" yaml:"clientCredentials,omitempty"` AuthorizationCode *OAuthFlow `json:"authorizationCode,omitempty" yaml:"authorizationCode,omitempty"` Extensions `json:"extensions,omitempty" yaml:"extensions,omitempty"` }
OAuthFlows allows configuration of supported oauthflows
type ObjectUnmarshaler ¶
ObjectUnmarshaler is used as a last ditch resort for particularly horrifying structs.
type OpenAPI3 ¶
type OpenAPI3 struct { OpenAPI string `json:"openapi,omitempty" yaml:"openapi,omitempty"` Info Info `json:"info,omitempty" yaml:"info,omitempty"` Servers []Server `json:"servers,omitempty" yaml:"servers,omitempty"` Paths Paths `json:"paths,omitempty" yaml:"paths,omitempty"` Components *Components `json:"components,omitempty" yaml:"components,omitempty"` Security []SecurityRequirement `json:"security,omitempty" yaml:"security,omitempty"` Tags []Tag `json:"tags,omitempty" yaml:"tags,omitempty"` ExternalDocs *ExternalDocs `json:"externalDocs,omitempty" yaml:"externalDocs,omitempty"` Extensions `json:"extensions,omitempty" yaml:"extensions,omitempty"` }
OpenAPI3 is the root of the OpenAPI Document
func LoadJSONReader ¶
LoadJSONReader loads the open api spec from a json reader
Optionally post-process by validating, resolving references, etc.
func LoadYAMLReader ¶
LoadYAMLReader loads the open api spec from a yaml reader
Optionally post-process by validating, resolving references, etc.
func (*OpenAPI3) CopyInheritedItems ¶
func (o *OpenAPI3) CopyInheritedItems()
CopyInheritedItems effectively pushes higher-level elements down into child elements where specified by the spec.
This should be called after Validate & ResolveRefs
Each element is considered, a duplicating element in the child overrides the parent. - OpenAPI3.Paths.Parameters -> OpenAPI3.Paths.Operations.(GET|POST).Parameters
func (*OpenAPI3) PostProcess ¶
PostProcess the loaded openapi3 document
func (*OpenAPI3) ResolveAllOfs ¶
ResolveAllOfs combines any object that declares it is an 'allOf' into a single object.
func (*OpenAPI3) ResolveRefs ¶
ResolveRefs finds all the $ref's in the spec and attempts to set them to real values.
In order to do so we use a simple recursive DFS and resolve as we go, because this must be an acyclic graph we also fail gracefully on cycles.
func (*OpenAPI3) UnmarshalJSON ¶
UnmarshalJSON completely overrides the typical recursive json decoder behavior with its own ideas about how to unmarshal in order to handle some idiosynchracies in the spec.
func (*OpenAPI3) UnmarshalYAML ¶
UnmarshalYAML completely overrides the typical recursive yaml decoder behavior with its own ideas about how to unmarshal in order to handle some idiosynchracies in the spec.
type Operation ¶
type Operation struct { Tags []string `json:"tags,omitempty" yaml:"tags,omitempty"` Summary *string `json:"summary,omitempty" yaml:"summary,omitempty"` Description *string `json:"description,omitempty" yaml:"description,omitempty"` ExternalDocs *ExternalDocs `json:"externalDocs,omitempty" yaml:"externalDocs,omitempty"` OperationID string `json:"operationId,omitempty" yaml:"operationId,omitempty"` Parameters []*ParameterRef `json:"parameters,omitempty" yaml:"parameters,omitempty"` RequestBody *RequestBodyRef `json:"requestBody,omitempty" yaml:"requestBody,omitempty"` Responses Responses `json:"responses,omitempty" yaml:"responses,omitempty"` Callbacks map[string]*CallbackRef `json:"callbacks,omitempty" yaml:"callbacks,omitempty"` Deprecated bool `json:"deprecated,omitempty" yaml:"deprecated,omitempty"` Security []SecurityRequirement `json:"security,omitempty" yaml:"security,omitempty"` Servers []Server `json:"servers,omitempty" yaml:"servers,omitempty"` Extensions `json:"extensions,omitempty" yaml:"extensions,omitempty"` }
Operation on a url
type Parameter ¶
type Parameter struct { Name string `json:"name,omitempty" yaml:"name,omitempty"` In string `json:"in,omitempty" yaml:"in,omitempty"` Description *string `json:"description,omitempty" yaml:"description,omitempty"` Required bool `json:"required,omitempty" yaml:"required,omitempty"` Deprecated bool `json:"deprecated,omitempty" yaml:"deprecated,omitempty"` AllowEmptyValue bool `json:"allowEmptyValue,omitempty" yaml:"allowEmptyValue,omitempty"` Style *string `json:"style,omitempty" yaml:"style,omitempty"` Explode bool `json:"explode,omitempty" yaml:"explode,omitempty"` AllowReserved bool `json:"allowReserved,omitempty" yaml:"allowReserved,omitempty"` Schema SchemaRef `json:"schema,omitempty" yaml:"schema,omitempty"` Example interface{} `json:"example,omitempty" yaml:"example,omitempty"` Examples map[string]*Example `json:"examples,omitempty" yaml:"examples,omitempty"` Content map[string]*MediaType `json:"content,omitempty" yaml:"content,omitempty"` Extensions `json:"extensions,omitempty" yaml:"extensions,omitempty"` }
Parameter for an operation
type ParameterRef ¶
ParameterRef refers to a parameter
func (*ParameterRef) Validate ¶
func (p *ParameterRef) Validate(pathTemplates []string) error
Validate param ref
type Path ¶
type Path struct { Summary *string `json:"summary,omitempty" yaml:"summary,omitempty"` Description *string `json:"description,omitempty" yaml:"description,omitempty"` Get *Operation `json:"get,omitempty" yaml:"get,omitempty"` Put *Operation `json:"put,omitempty" yaml:"put,omitempty"` Post *Operation `json:"post,omitempty" yaml:"post,omitempty"` Delete *Operation `json:"delete,omitempty" yaml:"delete,omitempty"` Options *Operation `json:"options,omitempty" yaml:"options,omitempty"` Head *Operation `json:"head,omitempty" yaml:"head,omitempty"` Patch *Operation `json:"patch,omitempty" yaml:"patch,omitempty"` Trace *Operation `json:"trace,omitempty" yaml:"trace,omitempty"` Servers []Server `json:"servers,omitempty" yaml:"servers,omitempty"` Parameters []*ParameterRef `json:"parameters,omitempty" yaml:"parameters,omitempty"` Extensions `json:"extensions,omitempty" yaml:"extensions,omitempty"` }
Path describes the operations available on a single path. A Path Item MAY be empty, due to ACL constraints. The path itself is still exposed to the documentation viewer but they will not know which operations and parameters are available.
func (*Path) Operations ¶
Operations returns the non-nil operations for this Path in a map to make it easier to handle them generically.
type Paths ¶
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. The Paths MAY be empty, due to ACL constraints.
Technically Paths can have extensions as per the spec, but we make a choice not to conform in order to be able to avoid an object graph that is also against the spec: OpenAPI3.Paths.Paths["/url"]
type RequestBody ¶
type RequestBody struct { Description *string `json:"description,omitempty" yaml:"description,omitempty"` Content map[string]*MediaType `json:"content,omitempty" yaml:"content,omitempty"` Required bool `json:"required,omitempty" yaml:"required,omitempty"` }
RequestBody for an operation
type RequestBodyRef ¶
type RequestBodyRef struct { Ref string `json:"$ref,omitempty" yaml:"$ref,omitempty"` *RequestBody }
RequestBodyRef refers to a request body
func (*RequestBodyRef) Validate ¶
func (r *RequestBodyRef) Validate() error
Validate request body ref
type Response ¶
type Response struct { Description string `json:"description,omitempty" yaml:"description,omitempty"` Headers map[string]*HeaderRef `json:"headers,omitempty" yaml:"headers,omitempty"` Content map[string]*MediaType `json:"content,omitempty" yaml:"content,omitempty"` Links map[string]*Link `json:"links,omitempty" yaml:"links,omitempty"` Extensions `json:"extensions,omitempty" yaml:"extensions,omitempty"` }
Response is a single response from an operation
type ResponseRef ¶
ResponseRef response reference
type Responses ¶
type Responses map[string]*ResponseRef
Responses contain possible responses from an Operation In order to preserve the data structure we do not allow any extensions on Responses
type Schema ¶
type Schema struct { Title *string `json:"title,omitempty" yaml:"title,omitempty"` Description *string `json:"description,omitempty" yaml:"description,omitempty"` Default interface{} `json:"default,omitempty" yaml:"default,omitempty"` Type string `json:"type,omitempty" yaml:"type,omitempty"` Nullable bool `json:"nullable,omitempty" yaml:"nullable,omitempty"` ReadOnly bool `json:"readOnly,omitempty" yaml:"readOnly,omitempty"` WriteOnly bool `json:"writeOnly,omitempty" yaml:"writeOnly,omitempty"` Deprecated bool `json:"deprecated,omitempty" yaml:"deprecated,omitempty"` Example interface{} `json:"example,omitempty" yaml:"example,omitempty"` ExternalDocs *ExternalDocs `json:"externalDocs,omitempty" yaml:"externalDocs,omitempty"` MultipleOf *float64 `json:"multipleOf,omitempty" yaml:"multipleOf,omitempty"` Maximum *float64 `json:"maximum,omitempty" yaml:"maximum,omitempty"` ExclusiveMaximum bool `json:"exclusiveMaximum,omitempty" yaml:"exclusiveMaximum,omitempty"` Minimum *float64 `json:"minimum,omitempty" yaml:"minimum,omitempty"` ExclusiveMinimum bool `json:"exclusiveMinimum,omitempty" yaml:"exclusiveMinimum,omitempty"` MaxLength *int `json:"maxLength,omitempty" yaml:"maxLength,omitempty"` MinLength *int `json:"minLength,omitempty" yaml:"minLength,omitempty"` Format *string `json:"format,omitempty" yaml:"format,omitempty"` Pattern *string `json:"pattern,omitempty" yaml:"pattern,omitempty"` Items *SchemaRef `json:"items,omitempty" yaml:"items,omitempty"` MaxItems *int `json:"maxItems,omitempty" yaml:"maxItems,omitempty"` MinItems *int `json:"minItems,omitempty" yaml:"minItems,omitempty"` UniqueItems *bool `json:"uniqueItems,omitempty" yaml:"uniqueItems,omitempty"` Required []string `json:"required,omitempty" yaml:"required,omitempty"` Enum []interface{} `json:"enum,omitempty" yaml:"enum,omitempty"` MaxProperties *int `json:"maxProperties,omitempty" yaml:"maxProperties,omitempty"` MinProperties *int `json:"minProperties,omitempty" yaml:"minProperties,omitempty"` Properties map[string]*SchemaRef `json:"properties,omitempty" yaml:"properties,omitempty"` AdditionalProperties *AdditionalProperties `json:"additionalProperties,omitempty" yaml:"additionalProperties,omitempty"` AllOf []*SchemaRef `json:"allOf,omitempty" yaml:"allOf,omitempty"` AnyOf []*SchemaRef `json:"anyOf,omitempty" yaml:"anyOf,omitempty"` OneOf []*SchemaRef `json:"oneOf,omitempty" yaml:"oneOf,omitempty"` Not *SchemaRef `json:"not,omitempty" yaml:"not,omitempty"` Discriminator *Discriminator `json:"discriminator,omitempty" yaml:"discriminator,omitempty"` Extensions `json:"extensions,omitempty" yaml:"extensions,omitempty"` }
Schema Object allows the definition of input and output data types. These types can be objects, but also primitives and arrays. This object is an extended subset of the JSON Schema Specification Wright Draft 00. For more information about the properties, see JSON Schema Core and JSON Schema Validation. Unless stated otherwise, the property definitions follow the JSON Schema.
func (*Schema) IsRequired ¶
IsRequired is a helper to see if a property is required
type SecurityRequirement ¶
SecurityRequirement lists the schemes to execute this operation. The name used for each property MUST correspond to a security scheme declared in the Security Schemes under the Components Object.
Security Requirement Objects that contain multiple schemes require that all schemes MUST be satisfied for a request to be authorized. This enables support for scenarios where multiple query parameters or HTTP headers are required to convey security information.
When a list of Security Requirement Objects is defined on the Open API object or Operation Object, only one of Security Requirement Objects in the list needs to be satisfied to authorize the request.
func (*SecurityRequirement) Validate ¶
func (s *SecurityRequirement) Validate() error
Validate security requirements
type SecurityScheme ¶
type SecurityScheme struct { Type string `json:"type,omitempty" yaml:"type,omitempty"` Description *string `json:"description,omitempty" yaml:"description,omitempty"` Name string `json:"name,omitempty" yaml:"name,omitempty"` In string `json:"in,omitempty" yaml:"in,omitempty"` Scheme string `json:"scheme,omitempty" yaml:"scheme,omitempty"` BearerFormat *string `json:"bearerFormat,omitempty" yaml:"bearerFormat,omitempty"` Flows OAuthFlows `json:"flows,omitempty" yaml:"flows,omitempty"` OpenIDConnectURL string `json:"openIdConnectUrl,omitempty" yaml:"openIdConnectUrl,omitempty"` }
SecurityScheme that can be used by the operations. Supported schemes are HTTP authentication, an API key (either as a header or as a query parameter), OAuth2's common flows (implicit, password, application and access code) as defined in RFC6749, and OpenID Connect Discovery.
type SecuritySchemeRef ¶
type SecuritySchemeRef struct { Ref string `json:"$ref,omitempty" yaml:"$ref,omitempty"` *SecurityScheme }
SecuritySchemeRef refers to a security scheme
type Server ¶
type Server struct { URL string `json:"url,omitempty" yaml:"url,omitempty"` Description *string `json:"description,omitempty" yaml:"description,omitempty"` Variables map[string]*ServerVariable `json:"variables,omitempty" yaml:"variables,omitempty"` Extensions `json:"extensions,omitempty" yaml:"extensions,omitempty"` }
Server represents a server of this API
type ServerVariable ¶
type ServerVariable struct { Enum []string `json:"enum,omitempty" yaml:"enum,omitempty"` Default string `json:"default,omitempty" yaml:"default,omitempty"` Description *string `json:"description,omitempty" yaml:"description,omitempty"` Extensions `json:"extensions,omitempty" yaml:"extensions,omitempty"` }
ServerVariable for server URL template substitution
func (*ServerVariable) Validate ¶
func (s *ServerVariable) Validate() error
Validate server variable
type Tag ¶
type Tag struct { Name string `json:"name,omitempty" yaml:"name,omitempty"` Description *string `json:"description,omitempty" yaml:"description,omitempty"` ExternalDocs *ExternalDocs `json:"externalDocs,omitempty" yaml:"externalDocs,omitempty"` }
Tag adds metadata to a single tag that is used by the Operation Object. It is not mandatory to have a Tag Object per tag defined in the Operation Object instances.