Versions in this module Expand all Collapse all v0 v0.4.0 Feb 25, 2024 v0.3.1 Feb 25, 2024 Changes in this version type Callback + func (o *Callback) WithPathItem(name string, v any) *Callback type Paths + func (o *Paths) WithPathItem(name string, v any) *Paths v0.2.2 Jul 24, 2023 Changes in this version type Extendable + func (o *Extendable[T]) WithExt(name string, value any) *Extendable[T] type Ref + func (o *Ref) WithDescription(v string) *Ref + func (o *Ref) WithRef(v string) *Ref + func (o *Ref) WithSummary(v string) *Ref type RefOrSpec + func (o *RefOrSpec[T]) GetSpec(c *Extendable[Components]) (*T, error) type Schema + func (o *Schema) WithExt(name string, value any) *Schema v0.2.1 Feb 23, 2023 v0.2.0 Aug 23, 2022 Changes in this version + const ArrayType + const Base16Encoding + const Base32Encoding + const Base64Encoding + const BinaryEncoding + const BooleanType + const DateFormat + const DateTimeFormat + const DoubleFormat + const DurationFormat + const EightBitEncoding + const EmailFormat + const ExtensionPrefix + const FloatFormat + const HostnameFormat + const IDNEmailFormat + const IDNHostnameFormat + const IPv4Format + const IPv6Format + const IRIFormat + const IRIReferenceFormat + const InCookie + const InHeader + const InPath + const InQuery + const Int32Format + const Int64Format + const IntegerType + const JsonPointerFormat + const NullType + const NumberType + const ObjectType + const PasswordFormat + const QuotedPrintableEncoding + const RegexFormat + const RelativeJsonPointerFormat + const SevenBitEncoding + const StringType + const TimeFormat + const TypeApiKey + const TypeHTTP + const TypeMutualTLS + const TypeOAuth2 + const TypeOpenIDConnect + const URIFormat + const URIReferenceFormat + const URITemplateFormat + const UUIDFormat + type BoolOrSchema struct + Allowed bool + Schema *RefOrSpec[Schema] + func NewBoolOrSchema(allowed bool, spec *RefOrSpec[Schema]) *BoolOrSchema + func (o *BoolOrSchema) MarshalJSON() ([]byte, error) + func (o *BoolOrSchema) UnmarshalJSON(data []byte) error + func (o *BoolOrSchema) UnmarshalYAML(node *yaml.Node) error + func (o BoolOrSchema) MarshalYAML() (any, error) + type Callback struct + Callback map[string]*RefOrSpec[Extendable[PathItem]] + func (o *Callback) MarshalJSON() ([]byte, error) + func (o *Callback) MarshalYAML() (any, error) + func (o *Callback) UnmarshalJSON(data []byte) error + func (o *Callback) UnmarshalYAML(node *yaml.Node) error + type Components struct + Callbacks map[string]*RefOrSpec[Extendable[Callback]] + Examples map[string]*RefOrSpec[Extendable[Example]] + Headers map[string]*RefOrSpec[Extendable[Header]] + Links map[string]*RefOrSpec[Extendable[Link]] + Parameters map[string]*RefOrSpec[Extendable[Parameter]] + Paths map[string]*RefOrSpec[Extendable[PathItem]] + RequestBodies map[string]*RefOrSpec[Extendable[RequestBody]] + Responses map[string]*RefOrSpec[Extendable[Response]] + Schemas map[string]*RefOrSpec[Schema] + SecuritySchemes map[string]*RefOrSpec[Extendable[SecurityScheme]] + func (o *Components) WithRefOrSpec(name string, v any) *Components + type Contact struct + Email string + Name string + URL string + type Discriminator struct + Mapping map[string]string + PropertyName string + func NewDiscriminator() *Discriminator + type Encoding struct + AllowReserved bool + ContentType string + Explode bool + Headers map[string]*RefOrSpec[Extendable[Header]] + Style string + type Example struct + Description string + ExternalValue string + Summary string + Value any + type Extendable struct + Extensions map[string]any + Spec *T + func NewComponents() *Extendable[Components] + func NewContact() *Extendable[Contact] + func NewEncoding() *Extendable[Encoding] + func NewExtendable(spec *T) *Extendable[T] + func NewExternalDocs() *Extendable[ExternalDocs] + func NewInfo() *Extendable[Info] + func NewLicense() *Extendable[License] + func NewMediaType() *Extendable[MediaType] + func NewOAuthFlow() *Extendable[OAuthFlow] + func NewOAuthFlows() *Extendable[OAuthFlows] + func NewOpenAPI() *Extendable[OpenAPI] + func NewOperation() *Extendable[Operation] + func NewPaths() *Extendable[Paths] + func NewResponses() *Extendable[Responses] + func NewServer() *Extendable[Server] + func NewServerVariable() *Extendable[ServerVariable] + func NewTag() *Extendable[Tag] + func NewXML() *Extendable[XML] + func (o *Extendable[T]) MarshalJSON() ([]byte, error) + func (o *Extendable[T]) MarshalYAML() (any, error) + func (o *Extendable[T]) UnmarshalJSON(data []byte) error + func (o *Extendable[T]) UnmarshalYAML(node *yaml.Node) error + type ExternalDocs struct + Description string + URL string + type Header struct + AllowEmptyValue bool + AllowReserved bool + Content map[string]*Extendable[MediaType] + Deprecated bool + Description string + Example any + Examples map[string]*RefOrSpec[Extendable[Example]] + Explode bool + Required bool + Schema *RefOrSpec[Schema] + Style string + type Info struct + Contact *Extendable[Contact] + Description string + License *Extendable[License] + Summary string + TermsOfService string + Title string + Version string + type JsonSchema struct + type JsonSchemaComposition struct + AllOf []*RefOrSpec[Schema] + AnyOf []*RefOrSpec[Schema] + Not *RefOrSpec[Schema] + OneOf []*RefOrSpec[Schema] + type JsonSchemaConditionals struct + DependentRequired map[string][]string + DependentSchemas map[string]*RefOrSpec[Schema] + Else *RefOrSpec[Schema] + If *RefOrSpec[Schema] + Then *RefOrSpec[Schema] + type JsonSchemaCore struct + Defs map[string]*RefOrSpec[Schema] + DynamicAnchor string + DynamicRef string + ID string + Schema string + Type SingleOrArray[string] + Vocabulary map[string]bool + type JsonSchemaGeneric struct + Comment string + Const string + Default any + Deprecated bool + Description string + Enum []any + Examples []any + ReadOnly bool + Title string + WriteOnly bool + type JsonSchemaMedia struct + ContentEncoding string + ContentMediaType string + ContentSchema *RefOrSpec[Schema] + type JsonSchemaTypeArray struct + Contains *RefOrSpec[Schema] + Items *BoolOrSchema + MaxContains *int + MaxItems *int + MinContains *int + MinItems *int + PrefixItems []*RefOrSpec[Schema] + UnevaluatedItems *BoolOrSchema + UniqueItems *bool + type JsonSchemaTypeNumber struct + ExclusiveMaximum *int + ExclusiveMinimum *int + Maximum *int + Minimum *int + MultipleOf *int + type JsonSchemaTypeObject struct + AdditionalProperties *BoolOrSchema + MaxProperties *int + MinProperties *int + PatternProperties map[string]*RefOrSpec[Schema] + Properties map[string]*RefOrSpec[Schema] + PropertyNames *RefOrSpec[Schema] + Required []string + UnevaluatedProperties *BoolOrSchema + type JsonSchemaTypeString struct + Format string + MaxLength *int + MinLength *int + Pattern string + type License struct + Identifier string + Name string + URL string + type Link struct + Description string + OperationId string + OperationRef string + Parameters map[string]any + RequestBody any + Server *Extendable[Server] + type MediaType struct + Encoding map[string]*Extendable[Encoding] + Example any + Examples map[string]*RefOrSpec[Extendable[Example]] + Schema *RefOrSpec[Schema] + type OAuthFlow struct + AuthorizationURL string + RefreshURL string + Scopes map[string]string + TokenURL string + type OAuthFlows struct + AuthorizationCode *Extendable[OAuthFlow] + ClientCredentials *Extendable[OAuthFlow] + Implicit *Extendable[OAuthFlow] + Password *Extendable[OAuthFlow] + type OpenAPI struct + Components *Extendable[Components] + ExternalDocs *Extendable[ExternalDocs] + Info *Extendable[Info] + JsonSchemaDialect string + OpenAPI string + Paths *Extendable[Paths] + Security []SecurityRequirement + Servers []*Extendable[Server] + Tags []*Extendable[Tag] + WebHooks map[string]*RefOrSpec[Extendable[PathItem]] + type Operation struct + Callbacks map[string]*RefOrSpec[Extendable[Callback]] + Deprecated bool + Description string + ExternalDocs *Extendable[ExternalDocs] + OperationID string + Parameters []*RefOrSpec[Extendable[Parameter]] + RequestBody *RefOrSpec[Extendable[RequestBody]] + Responses *Extendable[Responses] + Security []SecurityRequirement + Servers []*Extendable[Server] + Summary string + Tags []string + type Parameter struct + AllowEmptyValue bool + AllowReserved bool + Content map[string]*Extendable[MediaType] + Deprecated bool + Description string + Example any + Examples map[string]*RefOrSpec[Extendable[Example]] + Explode bool + In string + Name string + Required bool + Schema *RefOrSpec[Schema] + Style string + type PathItem struct + Delete *Extendable[Operation] + Description string + Get *Extendable[Operation] + Head *Extendable[Operation] + Options *Extendable[Operation] + Parameters []*RefOrSpec[Extendable[Parameter]] + Patch *Extendable[Operation] + Post *Extendable[Operation] + Put *Extendable[Operation] + Servers []*Extendable[Server] + Summary string + Trace *Extendable[Operation] + type Paths struct + Paths map[string]*RefOrSpec[Extendable[PathItem]] + func (o *Paths) MarshalJSON() ([]byte, error) + func (o *Paths) MarshalYAML() (any, error) + func (o *Paths) UnmarshalJSON(data []byte) error + func (o *Paths) UnmarshalYAML(node *yaml.Node) error + type Ref struct + Description string + Ref string + Summary string + func NewRef(ref string) *Ref + type RefOrSpec struct + Ref *Ref + Spec *T + func NewCallbackRef(ref *Ref) *RefOrSpec[Extendable[Callback]] + func NewCallbackSpec() *RefOrSpec[Extendable[Callback]] + func NewExampleRef(ref *Ref) *RefOrSpec[Extendable[Example]] + func NewExampleSpec() *RefOrSpec[Extendable[Example]] + func NewHeaderRef(ref *Ref) *RefOrSpec[Extendable[Header]] + func NewHeaderSpec() *RefOrSpec[Extendable[Header]] + func NewLinkRef(ref *Ref) *RefOrSpec[Extendable[Link]] + func NewLinkSpec() *RefOrSpec[Extendable[Link]] + func NewParameterRef(ref *Ref) *RefOrSpec[Extendable[Parameter]] + func NewParameterSpec() *RefOrSpec[Extendable[Parameter]] + func NewPathItemRef(ref *Ref) *RefOrSpec[Extendable[PathItem]] + func NewPathItemSpec() *RefOrSpec[Extendable[PathItem]] + func NewRefOrSpec(ref *Ref, spec *T) *RefOrSpec[T] + func NewRequestBodyRef(ref *Ref) *RefOrSpec[Extendable[RequestBody]] + func NewRequestBodySpec() *RefOrSpec[Extendable[RequestBody]] + func NewResponseRef(ref *Ref) *RefOrSpec[Extendable[Response]] + func NewResponseSpec() *RefOrSpec[Extendable[Response]] + func NewSchemaRef(ref *Ref) *RefOrSpec[Schema] + func NewSchemaSpec() *RefOrSpec[Schema] + func NewSecuritySchemeRef(ref *Ref) *RefOrSpec[Extendable[SecurityScheme]] + func NewSecuritySchemeSpec() *RefOrSpec[Extendable[SecurityScheme]] + func (o *RefOrSpec[T]) MarshalJSON() ([]byte, error) + func (o *RefOrSpec[T]) MarshalYAML() (any, error) + func (o *RefOrSpec[T]) UnmarshalJSON(data []byte) error + func (o *RefOrSpec[T]) UnmarshalYAML(node *yaml.Node) error + type RequestBody struct + Content map[string]*Extendable[MediaType] + Description string + Required bool + type Response struct + Content map[string]*Extendable[MediaType] + Description string + Headers map[string]*RefOrSpec[Extendable[Header]] + Links map[string]*RefOrSpec[Extendable[Link]] + type Responses struct + Default *RefOrSpec[Extendable[Response]] + Response map[string]*RefOrSpec[Extendable[Response]] + func (o *Responses) MarshalJSON() ([]byte, error) + func (o *Responses) MarshalYAML() (any, error) + func (o *Responses) UnmarshalJSON(data []byte) error + func (o *Responses) UnmarshalYAML(node *yaml.Node) error + type Schema struct + Discriminator *Discriminator + Example any + Extensions map[string]any + ExternalDocs *Extendable[ExternalDocs] + XML *Extendable[XML] + func (o *Schema) MarshalJSON() ([]byte, error) + func (o *Schema) MarshalYAML() (any, error) + func (o *Schema) UnmarshalJSON(data []byte) error + func (o *Schema) UnmarshalYAML(node *yaml.Node) error + type SecurityRequirement map[string][]string + func NewSecurityRequirement() SecurityRequirement + type SecurityScheme struct + BearerFormat string + Description string + Flows *Extendable[OAuthFlows] + In string + Name string + OpenIDConnectURL string + Scheme string + Type string + type Server struct + Description string + URL string + Variables map[string]*Extendable[ServerVariable] + type ServerVariable struct + Default string + Description string + Enum []string + type SingleOrArray []T + func NewSingleOrArray(v ...T) SingleOrArray[T] + func (o *SingleOrArray[T]) UnmarshalJSON(data []byte) error + func (o *SingleOrArray[T]) UnmarshalYAML(node *yaml.Node) error + func (o SingleOrArray[T]) MarshalJSON() ([]byte, error) + func (o SingleOrArray[T]) MarshalYAML() (any, error) + type Tag struct + Description string + ExternalDocs *Extendable[ExternalDocs] + Name string + type XML struct + Attribute bool + Name string + Namespace string + Prefix string + Wrapped bool