Documentation ¶
Index ¶
- type Annotation
- func Deprecated() Annotation
- func Description(description string) Annotation
- func EmptyResponse(status int) Annotation
- func FileResponse(status int, contentType string) Annotation
- func HtmlResponse(status int) Annotation
- func ID(id string) Annotation
- func Request[T any]() Annotation
- func Response[T any](status int) Annotation
- func Summary(summary string) Annotation
- func Tags(tags ...string) Annotation
- type Annotations
- type OpenAPI
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Annotation ¶
type Annotation func(openapi.OperationContext)
func Deprecated ¶
func Deprecated() Annotation
func Description ¶
func Description(description string) Annotation
func EmptyResponse ¶
func EmptyResponse(status int) Annotation
func FileResponse ¶
func FileResponse(status int, contentType string) Annotation
func HtmlResponse ¶
func HtmlResponse(status int) Annotation
func ID ¶
func ID(id string) Annotation
func Request ¶
func Request[T any]() Annotation
func Response ¶
func Response[T any](status int) Annotation
func Summary ¶
func Summary(summary string) Annotation
func Tags ¶
func Tags(tags ...string) Annotation
type Annotations ¶
type Annotations []Annotation
func Annotate ¶
func Annotate( annotations ...Annotation, ) Annotations
Annotate a route with metadata for the OpenAPI spec.
func (*Annotations) Apply ¶
func (annotations *Annotations) Apply(oc *openapi.OperationContext)
type OpenAPI ¶
type OpenAPI struct {
// contains filtered or unexported fields
}
func (*OpenAPI) Add ¶
func (openapi *OpenAPI) Add(method string, path string, annotations Annotations) error
Adds a new operation to the OpenAPI spec
func (*OpenAPI) JsonSpecRoute ¶
func (*OpenAPI) MarshalJSON ¶
Click to show internal directories.
Click to hide internal directories.