Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Version for the swagger command Version string // Commit for the swagger command Commit string )
Functions ¶
This section is empty.
Types ¶
type ExpandSpec ¶
type ExpandSpec struct {
Compact bool `long:"compact" description:"when present, doesn't prettify the the json"`
Output flags.Filename `long:"output" short:"o" description:"the file to write to"`
}
ExpandSpec is a command that expands the $refs in a swagger document
func (*ExpandSpec) Execute ¶
func (c *ExpandSpec) Execute(args []string) error
Execute expands the spec
type FlattenSpec ¶
type FlattenSpec struct {
Compact bool `long:"compact" description:"when present, doesn't prettify the the json"`
Output flags.Filename `long:"output" short:"o" description:"the file to write to"`
}
FlattenSpec is a command that flattens a swagger document Which will expand the remote references in a spec and move inline schemas to definitions after flattening there are no complex inlined anymore
func (*FlattenSpec) Execute ¶
func (c *FlattenSpec) Execute(args []string) error
Execute expands the spec
type Generate ¶
type Generate struct {
Model *generate.Model `command:"model"`
Operation *generate.Operation `command:"operation"`
Support *generate.Support `command:"support"`
Server *generate.Server `command:"server"`
Spec *generate.SpecFile `command:"spec"`
Client *generate.Client `command:"client"`
}
Generate command to group all generator commands together
type PrintVersion ¶
type PrintVersion struct {
}
PrintVersion the command
func (*PrintVersion) Execute ¶
func (p *PrintVersion) Execute(args []string) error
Execute this command
type ServeCmd ¶
type ServeCmd struct {
BasePath string `long:"base-path" description:"the base path to serve the spec and UI at"`
Flavor string `` /* 129-byte string literal not displayed */
DocURL string `long:"doc-url" description:"override the url which takes a url query param to render the doc ui"`
NoOpen bool `long:"no-open" description:"when present won't open the the browser to show the url"`
NoUI bool `long:"no-ui" description:"when present, only the swagger spec will be served"`
Port int `long:"port" short:"p" description:"the port to serve this site" env:"PORT"`
Host string `long:"host" description:"the interface to serve this site, defaults to 0.0.0.0" env:"HOST"`
}
ServeCmd to serve a swagger spec with docs ui
type ValidateSpec ¶
type ValidateSpec struct {
}
ValidateSpec is a command that validates a swagger document against the swagger json schema
func (*ValidateSpec) Execute ¶
func (c *ValidateSpec) Execute(args []string) error
Execute validates the spec
Source Files
¶
Click to show internal directories.
Click to hide internal directories.