Documentation ¶
Index ¶
- type Error
- type JSONObject
- type OAS
- func (o *OAS) AddDescription(description string) *OAS
- func (o *OAS) AddHeaderParam(name string) *OAS
- func (o *OAS) AddPrefix(prefix string) *OAS
- func (o *OAS) AddQueryParam(name string) *OAS
- func (o *OAS) AddResponse(body interface{}, code int) *OAS
- func (o *OAS) AddSummary(summary string) *OAS
- func (o *OAS) AddTags(tags ...string) *OAS
- func (o *OAS) Build(ref *openapi3.Reflector) *OAS
- func (o *OAS) Delete(body interface{}, code ...int) *OAS
- func (o *OAS) Get(body interface{}, code ...int) *OAS
- func (o *OAS) Patch(body interface{}, data interface{}, code ...int) *OAS
- func (o *OAS) Post(body interface{}, data interface{}, code ...int) *OAS
- func (o *OAS) Put(body interface{}, data interface{}, code ...int) *OAS
- func (o *OAS) ReplaceTags(tags ...string) *OAS
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Error ¶
type Error struct { Code string `json:"code,omitempty" yaml:"code,omitempty"` Msg string `json:"message,omitempty" yaml:"message,omitempty"` AdditionalData *JSONObject `json:"data,omitempty" yaml:"data,omitempty"` }
Error is data object for returning errors
func (*Error) Data ¶
func (e *Error) Data(data *JSONObject) *Error
Data sets the data property for Error
type JSONObject ¶
type JSONObject map[string]interface{}
JSONObject represents a map[string]interface{} shorthand
type OAS ¶
type OAS struct {
// contains filtered or unexported fields
}
OAS is the main structure for OpenAPI generation
func (*OAS) AddDescription ¶
AddDescription adds a description for the route
func (*OAS) AddHeaderParam ¶
AddHeaderParam adds query params to spec
func (*OAS) AddQueryParam ¶
AddQueryParam adds query params to spec
func (*OAS) AddResponse ¶
AddResponse adds an additional response to spec
func (*OAS) AddSummary ¶
AddSummary adds a summary for the route
func (*OAS) ReplaceTags ¶
ReplaceTags replaces oas tags
Click to show internal directories.
Click to hide internal directories.