Versions in this module Expand all Collapse all v0 v0.98.1 Aug 27, 2022 Changes in this version + const FormatOfStringForUUIDOfRFC4122 + const ParameterInCookie + const ParameterInHeader + const ParameterInPath + const ParameterInQuery + const SerializationDeepObject + const SerializationForm + const SerializationLabel + const SerializationMatrix + const SerializationPipeDelimited + const SerializationSimple + const SerializationSpaceDelimited + const TypeArray + const TypeBoolean + const TypeInteger + const TypeNumber + const TypeObject + const TypeString + var DefaultReadFromURI = URIMapCache(ReadFromURIs(ReadFromHTTP(http.DefaultClient), ReadFromFile)) + var ErrOneOfConflict = errors.New("input matches more than one oneOf schemas") + var ErrSchemaInputInf = errors.New("floating point Inf is not allowed") + var ErrSchemaInputNaN = errors.New("floating point NaN is not allowed") + var ErrURINotSupported = errors.New("unsupported URI") + var IdentifierRegExp = regexp.MustCompile(identifierPattern) + var SchemaErrorDetailsDisabled = false + var SchemaFormatValidationDisabled = false + var SchemaStringFormats = make(map[string]Format, 4) + func BoolPtr(value bool) *bool + func DefaultRefNameResolver(ref string) string + func DefineIPv4Format() + func DefineIPv6Format() + func DefineStringFormat(name string, pattern string) + func DefineStringFormatCallback(name string, callback FormatCallback) + func Float64Ptr(value float64) *float64 + func Int64Ptr(value int64) *int64 + func ReadFromFile(loader *Loader, location *url.URL) ([]byte, error) + func RegisterArrayUniqueItemsChecker(fn SliceUniqueItemsChecker) + func Uint64Ptr(value uint64) *uint64 + func ValidateIdentifier(value string) error + type Callback map[string]*PathItem + func (callback Callback) Validate(ctx context.Context) error + type CallbackRef struct + Ref string + Value *Callback + func (value *CallbackRef) MarshalJSON() ([]byte, error) + func (value *CallbackRef) UnmarshalJSON(data []byte) error + func (value *CallbackRef) Validate(ctx context.Context) error + func (value CallbackRef) JSONLookup(token string) (interface{}, error) + type Callbacks map[string]*CallbackRef + func (c Callbacks) JSONLookup(token string) (interface{}, error) + type Components struct + Callbacks Callbacks + Examples Examples + Headers Headers + Links Links + Parameters ParametersMap + RequestBodies RequestBodies + Responses Responses + Schemas Schemas + SecuritySchemes SecuritySchemes + func NewComponents() Components + func (components *Components) MarshalJSON() ([]byte, error) + func (components *Components) UnmarshalJSON(data []byte) error + func (components *Components) Validate(ctx context.Context) (err error) + type Contact struct + Email string + Name string + URL string + func (contact *Contact) MarshalJSON() ([]byte, error) + func (contact *Contact) UnmarshalJSON(data []byte) error + func (contact *Contact) Validate(ctx context.Context) error + type Content map[string]*MediaType + func NewContent() Content + func NewContentWithFormDataSchema(schema *Schema) Content + func NewContentWithFormDataSchemaRef(schema *SchemaRef) Content + func NewContentWithJSONSchema(schema *Schema) Content + func NewContentWithJSONSchemaRef(schema *SchemaRef) Content + func NewContentWithSchema(schema *Schema, consumes []string) Content + func NewContentWithSchemaRef(schema *SchemaRef, consumes []string) Content + func (content Content) Get(mime string) *MediaType + func (content Content) Validate(ctx context.Context) error + type Discriminator struct + Mapping map[string]string + PropertyName string + func (discriminator *Discriminator) MarshalJSON() ([]byte, error) + func (discriminator *Discriminator) UnmarshalJSON(data []byte) error + func (discriminator *Discriminator) Validate(ctx context.Context) error + type Encoding struct + AllowReserved bool + ContentType string + Explode *bool + Headers Headers + Style string + func NewEncoding() *Encoding + func (encoding *Encoding) MarshalJSON() ([]byte, error) + func (encoding *Encoding) SerializationMethod() *SerializationMethod + func (encoding *Encoding) UnmarshalJSON(data []byte) error + func (encoding *Encoding) Validate(ctx context.Context) error + func (encoding *Encoding) WithHeader(name string, header *Header) *Encoding + func (encoding *Encoding) WithHeaderRef(name string, ref *HeaderRef) *Encoding + type Example struct + Description string + ExternalValue string + Summary string + Value interface{} + func NewExample(value interface{}) *Example + func (example *Example) MarshalJSON() ([]byte, error) + func (example *Example) UnmarshalJSON(data []byte) error + func (example *Example) Validate(ctx context.Context) error + type ExampleRef struct + Ref string + Value *Example + func (value *ExampleRef) MarshalJSON() ([]byte, error) + func (value *ExampleRef) UnmarshalJSON(data []byte) error + func (value *ExampleRef) Validate(ctx context.Context) error + func (value ExampleRef) JSONLookup(token string) (interface{}, error) + type Examples map[string]*ExampleRef + func (e Examples) JSONLookup(token string) (interface{}, error) + type ExtensionProps struct + Extensions map[string]interface{} + func (props *ExtensionProps) DecodeWith(decoder *jsoninfo.ObjectDecoder, value interface{}) error + func (props *ExtensionProps) EncodeWith(encoder *jsoninfo.ObjectEncoder, value interface{}) error + type ExternalDocs struct + Description string + URL string + func (e *ExternalDocs) MarshalJSON() ([]byte, error) + func (e *ExternalDocs) UnmarshalJSON(data []byte) error + func (e *ExternalDocs) Validate(ctx context.Context) error + type Format struct + type FormatCallback func(value string) error + type Header struct + func (header *Header) SerializationMethod() (*SerializationMethod, error) + func (header *Header) UnmarshalJSON(data []byte) error + func (header *Header) Validate(ctx context.Context) error + func (header Header) JSONLookup(token string) (interface{}, error) + type HeaderRef struct + Ref string + Value *Header + func (value *HeaderRef) MarshalJSON() ([]byte, error) + func (value *HeaderRef) UnmarshalJSON(data []byte) error + func (value *HeaderRef) Validate(ctx context.Context) error + func (value HeaderRef) JSONLookup(token string) (interface{}, error) + type Headers map[string]*HeaderRef + func (h Headers) JSONLookup(token string) (interface{}, error) + type Info struct + Contact *Contact + Description string + License *License + TermsOfService string + Title string + Version string + func (info *Info) MarshalJSON() ([]byte, error) + func (info *Info) UnmarshalJSON(data []byte) error + func (info *Info) Validate(ctx context.Context) error + type License struct + Name string + URL string + func (license *License) MarshalJSON() ([]byte, error) + func (license *License) UnmarshalJSON(data []byte) error + func (license *License) Validate(ctx context.Context) error + type Link struct + Description string + OperationID string + OperationRef string + Parameters map[string]interface{} + RequestBody interface{} + Server *Server + func (link *Link) MarshalJSON() ([]byte, error) + func (link *Link) UnmarshalJSON(data []byte) error + func (link *Link) Validate(ctx context.Context) error + type LinkRef struct + Ref string + Value *Link + func (value *LinkRef) MarshalJSON() ([]byte, error) + func (value *LinkRef) UnmarshalJSON(data []byte) error + func (value *LinkRef) Validate(ctx context.Context) error + type Links map[string]*LinkRef + func (links Links) JSONLookup(token string) (interface{}, error) + type Loader struct + Context context.Context + IsExternalRefsAllowed bool + ReadFromURIFunc ReadFromURIFunc + func NewLoader() *Loader + func (loader *Loader) LoadFromData(data []byte) (*T, error) + func (loader *Loader) LoadFromDataWithPath(data []byte, location *url.URL) (*T, error) + func (loader *Loader) LoadFromFile(location string) (*T, error) + func (loader *Loader) LoadFromURI(location *url.URL) (*T, error) + func (loader *Loader) ResolveRefsIn(doc *T, location *url.URL) (err error) + type MediaType struct + Encoding map[string]*Encoding + Example interface{} + Examples Examples + Schema *SchemaRef + func NewMediaType() *MediaType + func (mediaType *MediaType) MarshalJSON() ([]byte, error) + func (mediaType *MediaType) UnmarshalJSON(data []byte) error + func (mediaType *MediaType) Validate(ctx context.Context) error + func (mediaType *MediaType) WithEncoding(name string, enc *Encoding) *MediaType + func (mediaType *MediaType) WithExample(name string, value interface{}) *MediaType + func (mediaType *MediaType) WithSchema(schema *Schema) *MediaType + func (mediaType *MediaType) WithSchemaRef(schema *SchemaRef) *MediaType + func (mediaType MediaType) JSONLookup(token string) (interface{}, error) + type MultiError []error + func (me MultiError) As(target interface{}) bool + func (me MultiError) Error() string + func (me MultiError) Is(target error) bool + type OAuthFlow struct + AuthorizationURL string + RefreshURL string + Scopes map[string]string + TokenURL string + func (flow *OAuthFlow) MarshalJSON() ([]byte, error) + func (flow *OAuthFlow) UnmarshalJSON(data []byte) error + func (flow *OAuthFlow) Validate(ctx context.Context, typ oAuthFlowType) error + type OAuthFlows struct + AuthorizationCode *OAuthFlow + ClientCredentials *OAuthFlow + Implicit *OAuthFlow + Password *OAuthFlow + func (flows *OAuthFlows) MarshalJSON() ([]byte, error) + func (flows *OAuthFlows) UnmarshalJSON(data []byte) error + func (flows *OAuthFlows) Validate(ctx context.Context) error + type Operation struct + Callbacks Callbacks + Deprecated bool + Description string + ExternalDocs *ExternalDocs + OperationID string + Parameters Parameters + RequestBody *RequestBodyRef + Responses Responses + Security *SecurityRequirements + Servers *Servers + Summary string + Tags []string + func NewOperation() *Operation + func (operation *Operation) AddParameter(p *Parameter) + func (operation *Operation) AddResponse(status int, response *Response) + func (operation *Operation) MarshalJSON() ([]byte, error) + func (operation *Operation) UnmarshalJSON(data []byte) error + func (operation *Operation) Validate(ctx context.Context) error + func (operation Operation) JSONLookup(token string) (interface{}, error) + type Parameter struct + AllowEmptyValue bool + AllowReserved bool + Content Content + Deprecated bool + Description string + Example interface{} + Examples Examples + Explode *bool + In string + Name string + Required bool + Schema *SchemaRef + Style string + func NewCookieParameter(name string) *Parameter + func NewHeaderParameter(name string) *Parameter + func NewPathParameter(name string) *Parameter + func NewQueryParameter(name string) *Parameter + func (parameter *Parameter) MarshalJSON() ([]byte, error) + func (parameter *Parameter) SerializationMethod() (*SerializationMethod, error) + func (parameter *Parameter) UnmarshalJSON(data []byte) error + func (parameter *Parameter) Validate(ctx context.Context) error + func (parameter *Parameter) WithDescription(value string) *Parameter + func (parameter *Parameter) WithRequired(value bool) *Parameter + func (parameter *Parameter) WithSchema(value *Schema) *Parameter + func (parameter Parameter) JSONLookup(token string) (interface{}, error) + type ParameterRef struct + Ref string + Value *Parameter + func (value *ParameterRef) MarshalJSON() ([]byte, error) + func (value *ParameterRef) UnmarshalJSON(data []byte) error + func (value *ParameterRef) Validate(ctx context.Context) error + func (value ParameterRef) JSONLookup(token string) (interface{}, error) + type Parameters []*ParameterRef + func NewParameters() Parameters + func (p Parameters) JSONLookup(token string) (interface{}, error) + func (parameters Parameters) GetByInAndName(in string, name string) *Parameter + func (parameters Parameters) Validate(ctx context.Context) error + type ParametersMap map[string]*ParameterRef + func (p ParametersMap) JSONLookup(token string) (interface{}, error) + type PathItem struct + Connect *Operation + Delete *Operation + Description string + Get *Operation + Head *Operation + Options *Operation + Parameters Parameters + Patch *Operation + Post *Operation + Put *Operation + Ref string + Servers Servers + Summary string + Trace *Operation + func (pathItem *PathItem) GetOperation(method string) *Operation + func (pathItem *PathItem) MarshalJSON() ([]byte, error) + func (pathItem *PathItem) Operations() map[string]*Operation + func (pathItem *PathItem) SetOperation(method string, operation *Operation) + func (pathItem *PathItem) UnmarshalJSON(data []byte) error + func (pathItem *PathItem) Validate(ctx context.Context) error + type Paths map[string]*PathItem + func (paths Paths) Find(key string) *PathItem + func (paths Paths) Validate(ctx context.Context) error + type ReadFromURIFunc func(loader *Loader, url *url.URL) ([]byte, error) + func ReadFromHTTP(cl *http.Client) ReadFromURIFunc + func ReadFromURIs(readers ...ReadFromURIFunc) ReadFromURIFunc + func URIMapCache(reader ReadFromURIFunc) ReadFromURIFunc + type Ref struct + Ref string + type RefNameResolver func(string) string + type RequestBodies map[string]*RequestBodyRef + func (r RequestBodies) JSONLookup(token string) (interface{}, error) + type RequestBody struct + Content Content + Description string + Required bool + func NewRequestBody() *RequestBody + func (requestBody *RequestBody) GetMediaType(mediaType string) *MediaType + func (requestBody *RequestBody) MarshalJSON() ([]byte, error) + func (requestBody *RequestBody) UnmarshalJSON(data []byte) error + func (requestBody *RequestBody) Validate(ctx context.Context) error + func (requestBody *RequestBody) WithContent(content Content) *RequestBody + func (requestBody *RequestBody) WithDescription(value string) *RequestBody + func (requestBody *RequestBody) WithFormDataSchema(value *Schema) *RequestBody + func (requestBody *RequestBody) WithFormDataSchemaRef(value *SchemaRef) *RequestBody + func (requestBody *RequestBody) WithJSONSchema(value *Schema) *RequestBody + func (requestBody *RequestBody) WithJSONSchemaRef(value *SchemaRef) *RequestBody + func (requestBody *RequestBody) WithRequired(value bool) *RequestBody + func (requestBody *RequestBody) WithSchema(value *Schema, consumes []string) *RequestBody + func (requestBody *RequestBody) WithSchemaRef(value *SchemaRef, consumes []string) *RequestBody + type RequestBodyRef struct + Ref string + Value *RequestBody + func (value *RequestBodyRef) MarshalJSON() ([]byte, error) + func (value *RequestBodyRef) UnmarshalJSON(data []byte) error + func (value *RequestBodyRef) Validate(ctx context.Context) error + func (value RequestBodyRef) JSONLookup(token string) (interface{}, error) + type Response struct + Content Content + Description *string + Headers Headers + Links Links + func NewResponse() *Response + func (response *Response) MarshalJSON() ([]byte, error) + func (response *Response) UnmarshalJSON(data []byte) error + func (response *Response) Validate(ctx context.Context) error + func (response *Response) WithContent(content Content) *Response + func (response *Response) WithDescription(value string) *Response + func (response *Response) WithJSONSchema(schema *Schema) *Response + func (response *Response) WithJSONSchemaRef(schema *SchemaRef) *Response + type ResponseRef struct + Ref string + Value *Response + func (value *ResponseRef) MarshalJSON() ([]byte, error) + func (value *ResponseRef) UnmarshalJSON(data []byte) error + func (value *ResponseRef) Validate(ctx context.Context) error + func (value ResponseRef) JSONLookup(token string) (interface{}, error) + type Responses map[string]*ResponseRef + func NewResponses() Responses + func (responses Responses) Default() *ResponseRef + func (responses Responses) Get(status int) *ResponseRef + func (responses Responses) JSONLookup(token string) (interface{}, error) + func (responses Responses) Validate(ctx context.Context) error + type Schema struct + AdditionalProperties *SchemaRef + AdditionalPropertiesAllowed *bool + AllOf SchemaRefs + AllowEmptyValue bool + AnyOf SchemaRefs + Default interface{} + Deprecated bool + Description string + Discriminator *Discriminator + Enum []interface{} + Example interface{} + ExclusiveMax bool + ExclusiveMin bool + ExternalDocs *ExternalDocs + Format string + Items *SchemaRef + Max *float64 + MaxItems *uint64 + MaxLength *uint64 + MaxProps *uint64 + Min *float64 + MinItems uint64 + MinLength uint64 + MinProps uint64 + MultipleOf *float64 + Not *SchemaRef + Nullable bool + OneOf SchemaRefs + Pattern string + Properties Schemas + ReadOnly bool + Required []string + Title string + Type string + UniqueItems bool + WriteOnly bool + XML *XML + func NewAllOfSchema(schemas ...*Schema) *Schema + func NewAnyOfSchema(schemas ...*Schema) *Schema + func NewArraySchema() *Schema + func NewBoolSchema() *Schema + func NewBytesSchema() *Schema + func NewDateTimeSchema() *Schema + func NewFloat64Schema() *Schema + func NewInt32Schema() *Schema + func NewInt64Schema() *Schema + func NewIntegerSchema() *Schema + func NewObjectSchema() *Schema + func NewOneOfSchema(schemas ...*Schema) *Schema + func NewSchema() *Schema + func NewStringSchema() *Schema + func NewUUIDSchema() *Schema + func (schema *Schema) IsEmpty() bool + func (schema *Schema) IsMatching(value interface{}) bool + func (schema *Schema) IsMatchingJSONArray(value []interface{}) bool + func (schema *Schema) IsMatchingJSONBoolean(value bool) bool + func (schema *Schema) IsMatchingJSONNumber(value float64) bool + func (schema *Schema) IsMatchingJSONObject(value map[string]interface{}) bool + func (schema *Schema) IsMatchingJSONString(value string) bool + func (schema *Schema) MarshalJSON() ([]byte, error) + func (schema *Schema) NewRef() *SchemaRef + func (schema *Schema) UnmarshalJSON(data []byte) error + func (schema *Schema) Validate(ctx context.Context) error + func (schema *Schema) VisitJSON(value interface{}, opts ...SchemaValidationOption) error + func (schema *Schema) VisitJSONArray(value []interface{}) error + func (schema *Schema) VisitJSONBoolean(value bool) error + func (schema *Schema) VisitJSONNumber(value float64) error + func (schema *Schema) VisitJSONObject(value map[string]interface{}) error + func (schema *Schema) VisitJSONString(value string) error + func (schema *Schema) WithAdditionalProperties(v *Schema) *Schema + func (schema *Schema) WithAnyAdditionalProperties() *Schema + func (schema *Schema) WithDefault(defaultValue interface{}) *Schema + func (schema *Schema) WithEnum(values ...interface{}) *Schema + func (schema *Schema) WithExclusiveMax(value bool) *Schema + func (schema *Schema) WithExclusiveMin(value bool) *Schema + func (schema *Schema) WithFormat(value string) *Schema + func (schema *Schema) WithItems(value *Schema) *Schema + func (schema *Schema) WithLength(i int64) *Schema + func (schema *Schema) WithLengthDecodedBase64(i int64) *Schema + func (schema *Schema) WithMax(value float64) *Schema + func (schema *Schema) WithMaxItems(i int64) *Schema + func (schema *Schema) WithMaxLength(i int64) *Schema + func (schema *Schema) WithMaxLengthDecodedBase64(i int64) *Schema + func (schema *Schema) WithMaxProperties(i int64) *Schema + func (schema *Schema) WithMin(value float64) *Schema + func (schema *Schema) WithMinItems(i int64) *Schema + func (schema *Schema) WithMinLength(i int64) *Schema + func (schema *Schema) WithMinLengthDecodedBase64(i int64) *Schema + func (schema *Schema) WithMinProperties(i int64) *Schema + func (schema *Schema) WithNullable() *Schema + func (schema *Schema) WithPattern(pattern string) *Schema + func (schema *Schema) WithProperties(properties map[string]*Schema) *Schema + func (schema *Schema) WithProperty(name string, propertySchema *Schema) *Schema + func (schema *Schema) WithPropertyRef(name string, ref *SchemaRef) *Schema + func (schema *Schema) WithUniqueItems(unique bool) *Schema + func (schema Schema) JSONLookup(token string) (interface{}, error) + type SchemaError struct + Origin error + Reason string + Schema *Schema + SchemaField string + Value interface{} + func (err *SchemaError) Error() string + func (err *SchemaError) JSONPointer() []string + func (err SchemaError) Unwrap() error + type SchemaRef struct + Ref string + Value *Schema + func NewSchemaRef(ref string, value *Schema) *SchemaRef + func (value *SchemaRef) MarshalJSON() ([]byte, error) + func (value *SchemaRef) UnmarshalJSON(data []byte) error + func (value *SchemaRef) Validate(ctx context.Context) error + func (value SchemaRef) JSONLookup(token string) (interface{}, error) + type SchemaRefs []*SchemaRef + func (s SchemaRefs) JSONLookup(token string) (interface{}, error) + type SchemaValidationOption func(*schemaValidationSettings) + func DefaultsSet(f func()) SchemaValidationOption + func FailFast() SchemaValidationOption + func MultiErrors() SchemaValidationOption + func VisitAsRequest() SchemaValidationOption + func VisitAsResponse() SchemaValidationOption + type Schemas map[string]*SchemaRef + func (s Schemas) JSONLookup(token string) (interface{}, error) + type SecurityRequirement map[string][]string + func NewSecurityRequirement() SecurityRequirement + func (security *SecurityRequirement) Validate(ctx context.Context) error + func (security SecurityRequirement) Authenticate(provider string, scopes ...string) SecurityRequirement + type SecurityRequirements []SecurityRequirement + func NewSecurityRequirements() *SecurityRequirements + func (srs *SecurityRequirements) With(securityRequirement SecurityRequirement) *SecurityRequirements + func (srs SecurityRequirements) Validate(ctx context.Context) error + type SecurityScheme struct + BearerFormat string + Description string + Flows *OAuthFlows + In string + Name string + OpenIdConnectUrl string + Scheme string + Type string + func NewCSRFSecurityScheme() *SecurityScheme + func NewJWTSecurityScheme() *SecurityScheme + func NewOIDCSecurityScheme(oidcUrl string) *SecurityScheme + func NewSecurityScheme() *SecurityScheme + func (ss *SecurityScheme) MarshalJSON() ([]byte, error) + func (ss *SecurityScheme) UnmarshalJSON(data []byte) error + func (ss *SecurityScheme) Validate(ctx context.Context) error + func (ss *SecurityScheme) WithBearerFormat(value string) *SecurityScheme + func (ss *SecurityScheme) WithDescription(value string) *SecurityScheme + func (ss *SecurityScheme) WithIn(value string) *SecurityScheme + func (ss *SecurityScheme) WithName(value string) *SecurityScheme + func (ss *SecurityScheme) WithScheme(value string) *SecurityScheme + func (ss *SecurityScheme) WithType(value string) *SecurityScheme + type SecuritySchemeRef struct + Ref string + Value *SecurityScheme + func (value *SecuritySchemeRef) MarshalJSON() ([]byte, error) + func (value *SecuritySchemeRef) UnmarshalJSON(data []byte) error + func (value *SecuritySchemeRef) Validate(ctx context.Context) error + func (value SecuritySchemeRef) JSONLookup(token string) (interface{}, error) + type SecuritySchemes map[string]*SecuritySchemeRef + func (s SecuritySchemes) JSONLookup(token string) (interface{}, error) + type SerializationMethod struct + Explode bool + Style string + type Server struct + Description string + URL string + Variables map[string]*ServerVariable + func (server *Server) MarshalJSON() ([]byte, error) + func (server *Server) UnmarshalJSON(data []byte) error + func (server *Server) Validate(ctx context.Context) (err error) + func (server Server) MatchRawURL(input string) ([]string, string, bool) + func (server Server) ParameterNames() ([]string, error) + type ServerVariable struct + Default string + Description string + Enum []string + func (serverVariable *ServerVariable) MarshalJSON() ([]byte, error) + func (serverVariable *ServerVariable) UnmarshalJSON(data []byte) error + func (serverVariable *ServerVariable) Validate(ctx context.Context) error + type Servers []*Server + func (servers Servers) MatchURL(parsedURL *url.URL) (*Server, []string, string) + func (servers Servers) Validate(ctx context.Context) error + type SliceUniqueItemsChecker func(items []interface{}) bool + type T struct + Components Components + ExternalDocs *ExternalDocs + Info *Info + OpenAPI string + Paths Paths + Security SecurityRequirements + Servers Servers + Tags Tags + func (doc *T) AddOperation(path string, method string, operation *Operation) + func (doc *T) AddServer(server *Server) + func (doc *T) InternalizeRefs(ctx context.Context, refNameResolver func(ref string) string) + func (doc *T) MarshalJSON() ([]byte, error) + func (doc *T) UnmarshalJSON(data []byte) error + func (doc *T) Validate(ctx context.Context) error + type Tag struct + Description string + ExternalDocs *ExternalDocs + Name string + func (t *Tag) MarshalJSON() ([]byte, error) + func (t *Tag) UnmarshalJSON(data []byte) error + func (t *Tag) Validate(ctx context.Context) error + type Tags []*Tag + func (tags Tags) Get(name string) *Tag + func (tags Tags) Validate(ctx context.Context) error + type XML struct + Attribute bool + Name string + Namespace string + Prefix string + Wrapped bool + func (xml *XML) MarshalJSON() ([]byte, error) + func (xml *XML) UnmarshalJSON(data []byte) error + func (xml *XML) Validate(ctx context.Context) error