Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormattedOpenAPI ¶
FormattedOpenAPI generates formatted openapi yaml.
func Generate ¶
func Generate(opts GenerateOption) error
Types ¶
type GenerateOption ¶
type GenerateOption struct {
Dir string
}
type WrapComponents ¶
type WrapComponents struct {
Schemas map[string]any `json:"schemas,omitempty" yaml:"schemas,omitempty"`
}
WrapComponents is a wrapper of openapi3.Components, used to generated formatted yaml.
type WrapInfo ¶
type WrapInfo struct { Title string `json:"title" yaml:"title"` Extensions map[string]any `json:",inline" yaml:",inline"` }
WrapInfo is a wrapper of openapi3.Info and removed field version, used to generated formatted yaml.
type WrapOpenAPI ¶
type WrapOpenAPI struct { OpenAPI string `json:"openapi" yaml:"openapi"` Info WrapInfo `json:"info" yaml:"info"` Components WrapComponents `json:"components,omitempty" yaml:"components,omitempty"` }
WrapOpenAPI is a wrapper of openapi3.T, used to generated formatted yaml.
Click to show internal directories.
Click to hide internal directories.