Documentation
¶
Overview ¶
Headers, both within requests and within responses.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ContentImplementation ¶
type ContentImplementation struct {
Content map[string]media.Implementation
}
type ContentSpec ¶
func FromContentImplementation ¶
func FromContentImplementation(impl ContentImplementation) (ContentSpec, error)
type Header ¶
type Header interface {
// contains filtered or unexported methods
}
func FromImplementation ¶
func FromImplementation(impl Implementation) (Header, error)
type Implementation ¶
type Implementation struct {
Description *string
Required bool
Deprecated bool
SchemaSpec *SchemaImplementation
ContentSpec *ContentImplementation
}
User-provided metadata containing information on the implementation to be converted to OpenAPI spec.
type SchemaImplementation ¶
type SchemaSpec ¶
type SchemaSpec struct {
// Describes how the parameter value will be serialized depending on the type of the parameter value. Default values (based on value of in): for "query" - "form"; for "path" - "simple"; for "header" - "simple"; for "cookie" - "form".
Style string `json:"style"`
// When this is true, parameter values of type array or object generate separate parameters for each value of the array or key-value pair of the map. For other types of parameters this field has no effect. When style is "form", the default value is true. For all other styles, the default value is false. Note that despite false being the default for deepObject, the combination of false with deepObject is undefined.
Explode bool `json:"explode"`
Schema schema.Schema `json:"schema"`
Example *shared.Json `json:"example,omitempty"`
Examples *[]example.Example `json:"examples,omitempty"`
}
https://spec.openapis.org/oas/v3.0.1.html#schema-object
func FromSchemaImplementation ¶
func FromSchemaImplementation(impl SchemaImplementation) (SchemaSpec, error)
type Spec ¶
type Spec struct {
Description *string `json:"description"`
Required bool `json:"required"`
Deprecated bool `json:"deprecated"`
*SchemaSpec `json:"<renaming ignored>,omitempty" flatten:""`
*ContentSpec `json:"<renaming also ignored>,omitempty" flatten:""`
}
Click to show internal directories.
Click to hide internal directories.