Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Generator ¶
type Generator struct {
Options *Options
// contains filtered or unexported fields
}
type Operation ¶
type Operation struct {
Path string `json:"path"`
Verb string `json:"verb"`
Tags []string `json:"tags"`
Description string `json:"description"`
Parameters []*Parameter `json:"parameters,omitempty"`
Responses []*Response `json:"responses,omitempty"`
XOperationName string `json:"x-operation-name"`
RawData []byte `json:"-"`
}
type Parameter ¶
type Parameter struct {
Name string `json:"name"`
NameOrig string `json:"name_orig"`
In string `json:"in"`
Description string `json:"description"`
Required bool `json:"required"`
Type string `json:"type,omitempty"`
Ref string `json:"ref,omitempty"`
Items string `json:"items,omitempty"`
ItemsRef string `json:"itemsRef,omitempty"`
}
type RequestHelper ¶
type RequestHelper struct {
Endpoint string
Uri string
Method string
QueryValues url.Values
PathParam map[string]string
Headers map[string]string
ResponseTypes map[int]any
Body any
Response any
}
func NewRequestHelper ¶
func NewRequestHelper(method, endpoint, uri string) *RequestHelper
func (*RequestHelper) Header ¶
func (u *RequestHelper) Header(name string, value string)
func (*RequestHelper) Param ¶
func (u *RequestHelper) Param(name string, value any)
func (*RequestHelper) Path ¶
func (u *RequestHelper) Path(name string, value string)
func (*RequestHelper) ResponseType ¶ added in v1.0.4
func (u *RequestHelper) ResponseType(code int, body any)
Click to show internal directories.
Click to hide internal directories.