package
0.129.0
Repository: https://github.com/getkin/kin-openapi.git
Documentation: pkg.go.dev

# Functions

AllowExtensionsWithRef allows extensions (fields starting with 'x-') as siblings for $ref fields.
AllowExtraSiblingFields called as AllowExtraSiblingFields("description") makes Validate not return an error when said field appears next to a $ref.
BoolPtr is a helper for defining OpenAPI schemas.
DefaultRefResolver is a default implementation of refNameResolver for the InternalizeRefs function.
DefaultsSet executes the given callback (once) IFF schema validation set default values.
DefineIntegerFormatValidator defines a custom format validator for a given integer format.
DefineIPv4Format opts in ipv4 format validation on top of OAS 3 spec.
DefineIPv6Format opts in ipv6 format validation on top of OAS 3 spec.
DefineNumberFormatValidator defines a custom format validator for a given number format.
DefineStringFormat defines a regexp pattern for a given string format Deprecated: Use openapi3.DefineStringFormatValidator(name, NewRegexpFormatValidator(pattern)) instead.
DefineStringFormatCallback defines a callback function for a given string format Deprecated: Use openapi3.DefineStringFormatValidator(name, NewCallbackValidator(fn)) instead.
DefineStringFormatValidator defines a custom format validator for a given string format.
DisableExamplesValidation disables all example schema validation.
DisablePatternValidation setting makes Validate not return an error when validating patterns that are not supported by the Go regexp engine.
DisableReadOnlyValidation setting makes Validate not return an error when validating properties marked as read-only.
DisableSchemaDefaultsValidation disables schemas' default field validation.
DisableSchemaFormatValidation does the opposite of EnableSchemaFormatValidation.
DisableSchemaPatternValidation makes Validate not return an error when validating patterns that are not supported by the Go regexp engine.
DisableWriteOnlyValidation setting makes Validate not return an error when validating properties marked as write-only.
EnableExamplesValidation does the opposite of DisableExamplesValidation.
EnableFormatValidation setting makes Validate not return an error when validating documents that mention schema formats that are not defined by the OpenAPIv3 specification.
EnableSchemaDefaultsValidation does the opposite of DisableSchemaDefaultsValidation.
EnableSchemaFormatValidation makes Validate not return an error when validating documents that mention schema formats that are not defined by the OpenAPIv3 specification.
EnableSchemaPatternValidation does the opposite of DisableSchemaPatternValidation.
FailFast returns schema validation errors quicker.
Float64Ptr is a helper for defining OpenAPI schemas.
Int64Ptr is a helper for defining OpenAPI schemas.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
NewCallback builds a Callback object with path items in insertion order.
NewCallbackValidator creates a new FormatValidator that uses a callback function to validate the value.
NewCallbackWithCapacity builds a callback object of the given capacity.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
NewIPValidator creates a new FormatValidator that validates the value is an IP address.
No description provided by the author
NewLoader returns an empty Loader.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
NewPaths builds a paths object with path items in insertion order.
NewPathsWithCapacity builds a paths object of the given capacity.
No description provided by the author
NewRangeFormatValidator creates a new FormatValidator that validates the value is within a given range.
NewRegexpFormatValidator creates a new FormatValidator that uses a regular expression to validate the value.
No description provided by the author
No description provided by the author
NewResponses builds a responses object with response objects in insertion order.
NewResponsesWithCapacity builds a responses object of the given capacity.
No description provided by the author
NewSchemaRef simply builds a SchemaRef.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
ProhibitExtensionsWithRef causes the validation to return an error if extensions (fields starting with 'x-') are found as siblings for $ref fields.
ReadFromFile is a ReadFromURIFunc which reads local file URIs.
ReadFromHTTP returns a ReadFromURIFunc which uses the given http.Client to read the contents from a remote HTTP URI.
ReadFromURIs returns a ReadFromURIFunc which tries to read a URI using the given reader functions, in the same order.
ReferencesComponentInRootDocument returns if the given component reference references the same document or element as another component reference in the root document's '#/components/<type>'.
RegisterArrayUniqueItemsChecker is used to register a customized function used to check if JSON array have unique items.
SetRegexCompiler allows to override the regex implementation used to validate field "pattern".
SetSchemaErrorMessageCustomizer allows to override the schema error message.
SetSchemaRegexCompiler allows to override the regex implementation used to validate field "pattern".
Uint64Ptr is a helper for defining OpenAPI schemas.
URIMapCache returns a ReadFromURIFunc that caches the contents read from URI locations in a simple map.
ValidateIdentifier returns an error if the given component name does not match [IdentifierRegExp].
No description provided by the author
No description provided by the author
WithCallback adds Callback as an option to NewCallback.
WithName adds a name-keyed Response.
WithPath adds a named path item.
WithStatus adds a status code keyed ResponseRef.
WithValidationOptions allows adding validation options to a context object that can be used when validating any OpenAPI type.

# Constants

FormatOfStringByte is a regexp for base64-encoded characters, for example, "U3dhZ2dlciByb2Nrcw==".
FormatOfStringDate is a RFC3339 date format regexp, for example "2017-07-21".
FormatOfStringDateTime is a RFC3339 date-time format regexp, for example "2017-07-21T17:32:28Z".
FormatOfStringForEmail pattern catches only some suspiciously wrong-looking email addresses.
FormatOfStringForUUIDOfRFC4122 is an optional predefined format for UUID v1-v5 as specified by RFC4122.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Variables

DefaultReadFromURI returns a caching ReadFromURIFunc which can read remote HTTP URIs and local file URIs.
ErrOneOfConflict is the SchemaError Origin when data matches more than one oneOf schema.
ErrSchemaInputInf may be returned when validating a number.
ErrSchemaInputNaN may be returned when validating a number.
ErrURINotSupported indicates the ReadFromURIFunc does not know how to handle a given URI.
IdentifierRegExp verifies whether Component object key matches contains just 'identifierChars', according to OpenAPI v3.x.
IdentifierRegExp verifies whether Component object key matches contains just 'identifierChars', according to OpenAPI v3.x.
SchemaErrorDetailsDisabled disables printing of details about schema errors.
SchemaIntegerFormats is a map of custom integer format validators.
SchemaNumberFormats is a map of custom number format validators.
SchemaStringFormats is a map of custom string format validators.

# Structs

No description provided by the author
Callback is specified by OpenAPI/Swagger standard version 3.
CallbackRef represents either a Callback or a $ref to a Callback.
Components is specified by OpenAPI/Swagger standard version 3.
Contact is specified by OpenAPI/Swagger standard version 3.
Discriminator is specified by OpenAPI/Swagger standard version 3.
Encoding is specified by OpenAPI/Swagger 3.0 standard.
Example is specified by OpenAPI/Swagger 3.0 standard.
ExampleRef represents either a Example or a $ref to a Example.
ExternalDocs is specified by OpenAPI/Swagger standard version 3.
Header is specified by OpenAPI/Swagger 3.0 standard.
HeaderRef represents either a Header or a $ref to a Header.
Info is specified by OpenAPI/Swagger standard version 3.
License is specified by OpenAPI/Swagger standard version 3.
Link is specified by OpenAPI/Swagger standard version 3.
LinkRef represents either a Link or a $ref to a Link.
Loader helps deserialize an OpenAPIv3 document.
Location is a struct that contains the location of a field.
MediaType is specified by OpenAPI/Swagger 3.0 standard.
OAuthFlow is specified by OpenAPI/Swagger standard version 3.
OAuthFlows is specified by OpenAPI/Swagger standard version 3.
Operation represents "operation" specified by" OpenAPI/Swagger 3.0 standard.
Origin contains the origin of a collection.
Parameter is specified by OpenAPI/Swagger 3.0 standard.
ParameterRef represents either a Parameter or a $ref to a Parameter.
PathItem is specified by OpenAPI/Swagger standard version 3.
Paths is specified by OpenAPI/Swagger standard version 3.
Ref is specified by OpenAPI/Swagger 3.0 standard.
RequestBody is specified by OpenAPI/Swagger 3.0 standard.
RequestBodyRef represents either a RequestBody or a $ref to a RequestBody.
Response is specified by OpenAPI/Swagger 3.0 standard.
ResponseRef represents either a Response or a $ref to a Response.
Responses is specified by OpenAPI/Swagger 3.0 standard.
Schema is specified by OpenAPI/Swagger 3.0 standard.
SchemaError is an error that occurs during schema validation.
SchemaRef represents either a Schema or a $ref to a Schema.
SecurityScheme is specified by OpenAPI/Swagger standard version 3.
SecuritySchemeRef represents either a SecurityScheme or a $ref to a SecurityScheme.
SerializationMethod describes a serialization method of HTTP request's parameters and body.
Server is specified by OpenAPI/Swagger standard version 3.
ServerVariable is specified by OpenAPI/Swagger standard version 3.
T is the root of an OpenAPI v3 document See https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#openapi-object.
Tag is specified by OpenAPI/Swagger 3.0 standard.
ValidationOptions provides configuration for validating OpenAPI documents.
XML is specified by OpenAPI/Swagger standard version 3.

# Interfaces

No description provided by the author
No description provided by the author
No description provided by the author

# Type aliases

No description provided by the author
Content is specified by OpenAPI/Swagger 3.0 standard.
No description provided by the author
No description provided by the author
No description provided by the author
MultiError is a collection of errors, intended for when multiple issues need to be reported upstream.
NewCallbackOption describes options to NewCallback func.
NewPathsOption describes options to NewPaths func.
NewResponsesOption describes options to NewResponses func.
Parameters is specified by OpenAPI/Swagger 3.0 standard.
No description provided by the author
ReadFromURIFunc defines a function which reads the contents of a resource located at a URI.
RefNameResolver maps a component to an name that is used as it's internalized name.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
SchemaValidationOption describes options a user has when validating request / response bodies.
SecurityRequirement is specified by OpenAPI/Swagger standard version 3.
No description provided by the author
No description provided by the author
Servers is specified by OpenAPI/Swagger standard version 3.
SliceUniqueItemsChecker is an function used to check if an given slice have unique items.
StringMap is a map[string]string that ignores the origin in the underlying json representation.
Tags is specified by OpenAPI/Swagger 3.0 standard.
No description provided by the author
ValidationOption allows the modification of how the OpenAPI document is validated.