Documentation
¶
Index ¶
- func New[T any](store *store.Store, opts ...Option) *v3.Header
- type Header
- type Option
- func AllowEmptyValue() Option
- func AllowReserved() Option
- func Deprecated() Option
- func Description(s string) Option
- func Example(v any) Option
- func Explode() 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
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Header ¶
type Header interface {
Header() Option
}
Header may be implemented to set default header options on a type.
func (T) Header() header.Option
type Option ¶
Option configures an OpenAPI response header. May be returned from a type implementing the Header interface:
func (T) Header() Option
func AllowEmptyValue ¶
func AllowEmptyValue() Option
AllowEmptyValue allows sending an empty value for the header. Default: false.
func AllowReserved ¶
func AllowReserved() Option
AllowReserved allows reserved URI characters in the header value. Default: false.
func Deprecated ¶
func Deprecated() Option
Deprecated marks the header as deprecated. Default: false.
func Explode ¶
func Explode() Option
Explode controls whether arrays and objects generate separate header instances. Default: false (simple is the only valid style for headers).
func NamedExample ¶
NamedExample adds a named example to the header.
func NamedExampleRef ¶
NamedExampleRef adds a named example $ref to the header.
Click to show internal directories.
Click to hide internal directories.