Documentation
¶
Index ¶
- Constants
- func New[T any](in, name string, store *store.Store, opts ...Option) *v3.Parameter
- type Option
- func AllowEmptyValue() Option
- func AllowReserved() Option
- func Deprecated() Option
- func Description(s string) Option
- func Example(v any) Option
- func Explode(v bool) Option
- func NamedExample(name string, value any, opts ...example.Option) Option
- func NamedExampleRef(name, ref string) Option
- func Options(opts ...Option) Option
- func Reference(name string) Option
- func Required(v bool) Option
- func Style(s string) Option
- type Parameter
Constants ¶
View Source
const ( // InPath identifies a path parameter. InPath = "path" // InQuery identifies a query parameter. InQuery = "query" // InHeader identifies a header parameter. InHeader = "header" // InCookie identifies a cookie parameter. InCookie = "cookie" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Option ¶
Option configures an OpenAPI parameter. May be returned from a type implementing the Parameter interface:
func (T) Parameter() Option
func AllowEmptyValue ¶
func AllowEmptyValue() Option
AllowEmptyValue allows sending an empty value for the parameter. Default: false.
func AllowReserved ¶
func AllowReserved() Option
AllowReserved allows reserved URI characters in query parameter values. Default: false.
func Deprecated ¶
func Deprecated() Option
Deprecated marks the parameter as deprecated. Default: false.
func Explode ¶
Explode controls whether arrays and objects generate separate parameter instances. Default: true for form style, false for all others.
func NamedExample ¶
NamedExample adds a named example to the parameter.
func NamedExampleRef ¶
NamedExampleRef adds a named example $ref to the parameter.
Click to show internal directories.
Click to hide internal directories.