Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Components ¶
type Components struct { Schemas orderedtypes.Map[string, Schema] `json:"schemas,omitempty" yaml:"schemas,omitempty"` Parameters orderedtypes.Map[string, Parameter] `json:"parameters,omitempty" yaml:"parameters,omitempty"` Responses orderedtypes.Map[string, Response] `json:"responses,omitempty" yaml:"responses,omitempty"` RequestBodies orderedtypes.Map[string, RequestBody] `json:"requestBodies,omitempty" yaml:"requestBodies,omitempty"` SecuritySchemes orderedtypes.Map[string, Security] `json:"securitySchemes,omitempty" yaml:"securitySchemes,omitempty"` }
type OpenAPI ¶
type OpenAPI struct { Version string `json:"version,omitempty" yaml:"version,omitempty"` Tags []Tag `json:"tags" yaml:"tags"` Info Info `json:"info,omitempty" yaml:"info,omitempty"` Paths orderedtypes.Map[string, Path] `json:"paths,omitempty" yaml:"paths,omitempty"` Components Components `json:"components,omitempty" yaml:"components,omitempty"` // contains filtered or unexported fields }
func (OpenAPI) GroupedPaths ¶
type Operation ¶
type Operation struct { Tags []string `json:"tags,omitempty" yaml:"tags,omitempty"` Deprecated bool `json:"deprecated,omitempty" yaml:"deprecated,omitempty"` Summary *string `json:"summary,omitempty" yaml:"summary,omitempty"` Description string `json:"description,omitempty" yaml:"description,omitempty"` RequestBody *RequestBody `json:"requestBody,omitempty" yaml:"requestBody,omitempty"` Parameters []Parameter `json:"parameters,omitempty" yaml:"parameters,omitempty"` Responses orderedtypes.Map[string, *Response] `json:"responses,omitempty" yaml:"responses,omitempty"` Security []orderedtypes.Map[string, []string] `json:"security,omitempty" yaml:"security,omitempty"` }
func (*Operation) DescriptionAsHTML ¶
func (Operation) HasParameters ¶
func (Operation) HasResponseInfo ¶
func (Operation) SortedResponses ¶
func (p Operation) SortedResponses() []ResponseAndStatus
type Parameter ¶
type Parameter struct { Name string `json:"name,omitempty" yaml:"name,omitempty"` In ParameterLocation `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"` Schema *Schema `json:"schema,omitempty" yaml:"schema,omitempty"` Example any `json:"example,omitempty" yaml:"example,omitempty"` Ref string `json:"$ref,omitempty" yaml:"$ref,omitempty"` ResolvedRefName string `json:"-" yaml:"-"` }
type ParameterLocation ¶
type ParameterLocation string
const ( ParameterQuery ParameterLocation = "query" ParameterHeader ParameterLocation = "header" ParameterPath ParameterLocation = "path" ParameterCookie ParameterLocation = "cookie" )
type Path ¶
type Path struct { Get *Operation `json:"get,omitempty" yaml:"get,omitempty"` Post *Operation `json:"post,omitempty" yaml:"post,omitempty"` Patch *Operation `json:"patch,omitempty" yaml:"patch,omitempty"` Put *Operation `json:"put,omitempty" yaml:"put,omitempty"` Delete *Operation `json:"delete,omitempty" yaml:"delete,omitempty"` }
type RequestBody ¶
type RequestBody struct { Content orderedtypes.Map[string, *Content] `json:"content,omitempty" yaml:"content,omitempty"` Ref string `json:"$ref,omitempty" yaml:"$ref,omitempty"` }
type ResponseAndStatus ¶
type Schema ¶
type Schema struct { Type any `json:"type,omitempty" yaml:"type,omitempty"` Items *Schema `json:"items,omitempty" yaml:"items,omitempty"` Required []string `json:"required,omitempty" yaml:"required,omitempty"` Properties *orderedtypes.Map[string, Schema] `json:"properties,omitempty" yaml:"properties,omitempty"` AdditionalProperties *Schema `json:"additionalProperties,omitempty" yaml:"additionalProperties,omitempty"` PatternProperties *orderedtypes.Map[string, Schema] `json:"patternProperties,omitempty" yaml:"patternProperties,omitempty"` Description string `json:"description,omitempty" yaml:"description,omitempty"` Ref string `json:"$ref,omitempty" yaml:"$ref,omitempty"` ResolvedRefName string `json:"-" yaml:"-"` Example any `json:"example,omitempty" yaml:"example,omitempty"` Examples []orderedtypes.Any `json:"examples,omitempty" yaml:"examples,omitempty"` AnyOf []Schema `json:"anyOf,omitempty" yaml:"anyOf,omitempty"` Enum []any `json:"enum,omitempty" yaml:"enum,omitempty"` }
func (*Schema) DescriptionAsHTML ¶
func (*Schema) GenerateExample ¶ added in v0.3.0
func (s *Schema) GenerateExample() orderedtypes.Any
type Security ¶
type Security struct { Type SecurityType `json:"type,omitempty" yaml:"type,omitempty"` Description string `json:"description,omitempty" yaml:"description,omitempty"` // applies to apiKey Name string `json:"name,omitempty" yaml:"name,omitempty"` In string `json:"in,omitempty" yaml:"in,omitempty"` // applies to http Scheme string `json:"scheme,omitempty" yaml:"scheme,omitempty"` BearerFormat string `json:"bearerFormat,omitempty" yaml:"bearerFormat,omitempty"` // applies to oauth2 Flows SecurityFlows `json:"flows,omitempty" yaml:"flows,omitempty"` // applies to openIdConnect OpenIdConnectURL string `json:"openIdConnectURL,omitempty" yaml:"openIdConnectURL,omitempty"` }
func (*Security) DescriptionAsHTML ¶
type SecurityFlow ¶
type SecurityFlow 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 *orderedtypes.Map[string, string] `json:"scopes,omitempty" yaml:"scopes,omitempty"` }
type SecurityFlows ¶
type SecurityFlows struct { Implicit *SecurityFlow `json:"implicit,omitempty" yaml:"implicit,omitempty"` Password *SecurityFlow `json:"password,omitempty" yaml:"password,omitempty"` ClientCredentials *SecurityFlow `json:"clientCredentials,omitempty" yaml:"clientCredentials,omitempty"` AuthorizationCode *SecurityFlow `json:"authorizationCode,omitempty" yaml:"authorizationCode,omitempty"` }
func (*SecurityFlows) Iter ¶
func (sf *SecurityFlows) Iter() iter.Seq2[string, *SecurityFlow]
type SecurityType ¶
type SecurityType string
const ( SecurityOAuth2 SecurityType = "oauth2" SecurityApiKey SecurityType = "apiKey" SecurityHttp SecurityType = "http" SecurityMutualTLS SecurityType = "mutualTLS" SecurityOpenIdConnect SecurityType = "openIdConnect" )
Click to show internal directories.
Click to hide internal directories.