Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithGenerator ¶
func WithGenerator(gen *openapi3gen.Generator) func(*Config)
func WithServerInfo ¶
func WithServers ¶
Types ¶
type Registry ¶
type Registry struct { Config *Config // contains filtered or unexported fields }
func NewRegistry ¶
func (*Registry) Add ¶
func (r *Registry) Add(method string, path string, req *request.Request, resp map[string]*response.Response)
Add method contains http method: GET, POST, PUT, PATCH, HEAD, DELETE path contains URL path such as /api/v1/xxx req contains request body, header, params, etc.. resp contains map of http status as key and response body as value, for example: 200:&response.Response{}
Multiple path with different method can be added.
Click to show internal directories.
Click to hide internal directories.