Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Components ¶
type Components struct { Schemas GenericObject `yaml:"schemas" json:"schemas"` Parameters GenericObject `yaml:"parameters" json:"parameters"` Responses GenericObject `yaml:"responses" json:"responses"` Examples GenericObject `yaml:"examples" json:"examples"` RequestBodies GenericObject `yaml:"requestBodies" json:"requestBodies"` Headers GenericObject `yaml:"headers" json:"headers"` SecuritySchemes GenericObject `yaml:"securitySchemes" json:"securitySchemes"` Link GenericObject `yaml:"links" json:"links"` Callbacks GenericObject `yaml:"callbacks" json:"callbacks"` PathItems GenericObject `yaml:"pathItems" json:"pathItems"` }
Components holds a set of reusable objects for different aspects of the OAS.
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"` }
Contact structure is generated from "#/$defs/contact".
type DocumentedPath ¶
DocumentedPath holds information about documented path with method
func (DocumentedPath) String ¶ added in v0.0.2
func (d DocumentedPath) String() string
String returns method and path joined by '_'
type ExternalDocumentation ¶
type ExternalDocumentation struct { Description *string `json:"description,omitempty" yaml:"description,omitempty"` URL string `json:"url" yaml:"url"` }
ExternalDocumentation structure is generated from "#/$defs/external-documentation".
type GenericObject ¶
GenericObject represets the generic yaml or json object where key is always string and value can be anything
type Info ¶
type Info struct { Title string `json:"title" yaml:"title"` Summary *string `json:"summary,omitempty" yaml:"summary,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" yaml:"version"` }
Info provides metadata about the API.
type License ¶
type License struct { Name string `json:"name" yaml:"name"` Identifier *string `json:"identifier,omitempty" yaml:"identifier,omitempty"` URL *string `json:"url,omitempty" yaml:"url,omitempty"` }
License structure is generated from "#/$defs/license".
type Server ¶
type Server struct { URL string `json:"url" yaml:"url"` Description *string `json:"description,omitempty" yaml:"description,omitempty"` Variables map[string]ServerVariable `json:"variables,omitempty" yaml:"variables,omitempty"` }
Server structure is generated from "#/$defs/server".
type ServerVariable ¶
type ServerVariable struct { Enum []string `json:"enum,omitempty" yaml:"enum,omitempty"` Default string `json:"default" yaml:"default"` Description *string `json:"description,omitempty" yaml:"description,omitempty"` }
ServerVariable structure is generated from "#/$defs/server-variable".
type Spec ¶
type Spec struct { OpenAPI string `yaml:"openapi" json:"openapi"` Info Info `yaml:"info" json:"info"` Paths GenericObject `yaml:"paths" json:"paths"` Servers []Server `yaml:"servers" json:"servers"` Tags []Tag `yaml:"tags" json:"tags"` TagsGroup []TagGroup `yaml:"x-tagGroups" json:"x-tagGroups"` Components Components `yaml:"components" json:"components"` }
Spec represents the OpenAPI spec definition
func (Spec) DocumentedPaths ¶
func (s Spec) DocumentedPaths() []DocumentedPath
DocumentedPaths returns the list of path in the spec
type Tag ¶
type Tag struct { Name string `json:"name" yaml:"name"` Description string `json:"description,omitempty" yaml:"description,omitempty"` ExternalDocs *ExternalDocumentation `json:"externalDocs,omitempty" yaml:"externalDocs,omitempty"` }
Tag structure is generated from "#/$defs/tag".