Documentation
¶
Index ¶
- func FilterSchema(schema string) string
- func FormatAnchor(schema string) string
- func RenderFromJSON(w Writer, r io.Reader, tmpl *Template) error
- func RenderFromYAML(w Writer, r io.Reader, tmpl *Template) error
- type API
- type APIError
- type Contact
- type Definition
- type Info
- type License
- type Methods
- type Operation
- type Parameter
- type Response
- type SchemaContext
- type SchemaObject
- type Tag
- type Template
- type Writer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FilterSchema ¶
func FormatAnchor ¶
Types ¶
type API ¶
type API struct {
Swagger string `json,yaml:"swagger"`
Info Info `json,yaml:"info"`
Host string `json,yaml:"host"`
BasePath string `json,yaml:"basePath"`
Schemes []string `json,yaml:"schemes"`
Consumes []string `json,yaml:"consumes"`
Produces []string `json,yaml:"produces"`
Paths map[string]Methods `json,yaml:"paths"`
Definitions map[string]Definition `json,yaml:"definitions"`
}
func DecodeJSON ¶
func DecodeYAML ¶
type Definition ¶
type Definition struct {
Type string `json,yaml:"type"`
Properties map[string]SchemaObject `json,yaml:"properties"`
}
type Operation ¶
type Operation struct {
API *API
Operation string
Path string
Tags []string `json,yaml:"tags"`
Description string `json,yaml:"description"`
OperationID string `json,yaml:"operationId"`
Summary string `json,yaml:"summary"`
Parameters []Parameter `json,yaml:"parameters"`
Responses map[string]Response `json,yaml:"responses"`
Definitions map[string]Definition `json,yaml:"definitions"`
}
type Parameter ¶
type Parameter struct {
Name string `json,yaml:"name"`
In string `json,yaml:"in"`
Description string `json,yaml:"description"`
Required bool `json,yaml:"required"`
Type string `json,yaml:"type"`
CollectionFormat string `json,yaml:"collectionFormat"`
Items map[string]any `json,yaml:"items"`
Schema SchemaObject `json,yaml:"schema"`
}
func FilterParameters ¶
type Response ¶
type Response struct {
Description string `json,yaml:"description"`
Schema SchemaObject `json,yaml:"schema"`
}
type SchemaContext ¶
type SchemaContext struct {
TopRef string
Definitions map[string]Definition
Definition Definition
}
func CollectSchema ¶
func CollectSchema(definitions map[string]Definition, schema string) SchemaContext
type SchemaObject ¶
Click to show internal directories.
Click to hide internal directories.