Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Info Info `json:"info"`
Servers []Server `json:"servers,omitempty"`
Security map[string]SecurityScheme `json:"security,omitempty"`
}
Config holds OpenAPI generation configuration.
type Contact ¶
type Contact struct {
Name string `json:"name,omitempty"`
URL string `json:"url,omitempty"`
Email string `json:"email,omitempty"`
}
Contact represents OpenAPI contact object.
type Generator ¶
type Generator struct {
// contains filtered or unexported fields
}
Generator generates OpenAPI specifications from TypedHTTP routers.
func NewGenerator ¶
NewGenerator creates a new OpenAPI generator.
func (*Generator) GenerateJSON ¶
GenerateJSON generates JSON representation of OpenAPI spec.
type Info ¶
type Info struct {
Title string `json:"title"`
Version string `json:"version"`
Description string `json:"description,omitempty"`
TermsOfService string `json:"terms_of_service,omitempty"`
Contact *Contact `json:"contact,omitempty"`
License *License `json:"license,omitempty"`
}
Info represents OpenAPI info object.
Click to show internal directories.
Click to hide internal directories.