Documentation
¶
Overview ¶
Package respec provides a fluent API for adding OpenAPI metadata.
Index ¶
- type Builder
- func (b *Builder) Description(d string) *Builder
- func (b *Builder) GetDescription() string
- func (b *Builder) GetSecurity() []string
- func (b *Builder) GetSummary() string
- func (b *Builder) GetTags() []string
- func (b *Builder) Security(schemeName string) *Builder
- func (b *Builder) ServeHTTP(w http.ResponseWriter, r *http.Request)
- func (b *Builder) Summary(s string) *Builder
- func (b *Builder) Tag(tags ...string) *Builder
- type GroupBuilder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Builder ¶
type Builder struct {
// contains filtered or unexported fields
}
func GetByHandler ¶ added in v0.2.0
func Handler ¶ added in v0.2.1
func Handler(handler http.HandlerFunc) *Builder
Handler wraps an http.HandlerFunc to allow for endpoint-specific metadata.
func (*Builder) Description ¶
func (*Builder) GetDescription ¶
func (*Builder) GetSecurity ¶
func (*Builder) GetSummary ¶
type GroupBuilder ¶ added in v0.2.1
type GroupBuilder struct {
// contains filtered or unexported fields
}
func Meta ¶ added in v0.2.2
func Meta(router interface{}) *GroupBuilder
Meta provides a way to attach metadata to a router instance within a specific scope.
func NewGroupBuilder ¶ added in v0.2.2
func NewGroupBuilder() *GroupBuilder
NewGroupBuilder is exported for use by the analyzer.
func (*GroupBuilder) GetSecurity ¶ added in v0.2.2
func (b *GroupBuilder) GetSecurity() []string
func (*GroupBuilder) GetTags ¶ added in v0.2.2
func (b *GroupBuilder) GetTags() []string
func (*GroupBuilder) Security ¶ added in v0.2.1
func (b *GroupBuilder) Security(schemeName string) *GroupBuilder
func (*GroupBuilder) Tag ¶ added in v0.2.1
func (b *GroupBuilder) Tag(tags ...string) *GroupBuilder
Click to show internal directories.
Click to hide internal directories.