Class: HeaderParameter
protoc_gen_openapiv2.options.HeaderParameter
HeaderParameter a HTTP header parameter.
See: https://swagger.io/specification/v2/#parameter-object
Properties
description
• description: string
Description is a short description of the header.
format
• format: string
Format The extending format for the previously mentioned type.
name
• name: string
Name is the header name.
required
• required: boolean
Required indicates if the header is optional
type
• type: Type
Type is the type of the object. The value MUST be one of "string", "number", "integer", or "boolean". The "array" type is not supported.
See: https://swagger.io/specification/v2/#parameterType.
Methods
toJSON
▸ toJSON(): Object
Converts this HeaderParameter to JSON.
Returns
Object
JSON object
create
▸ create(properties?): HeaderParameter & $Properties
Creates a new HeaderParameter instance using the specified properties.
Parameters
| Name | Type | Description |
|---|---|---|
properties? | $Properties | Properties to set |
Returns
HeaderParameter instance
▸ create(properties?): HeaderParameter
Parameters
| Name | Type |
|---|---|
properties? | $Properties |
Returns
decode
▸ decode(reader, length?): HeaderParameter & $Properties
Decodes a HeaderParameter message from the specified reader or buffer.
Parameters
| Name | Type | Description |
|---|---|---|
reader | Uint8Array | Reader | Reader or buffer to decode from |
length? | number | Message length if known beforehand |
Returns
HeaderParameter
Throws
If the payload is not a reader or valid buffer
Throws
If required fields are missing
decodeDelimited
▸ decodeDelimited(reader): HeaderParameter & $Properties
Decodes a HeaderParameter message from the specified reader or buffer, length delimited.
Parameters
| Name | Type | Description |
|---|---|---|
reader | Uint8Array | Reader | Reader or buffer to decode from |
Returns
HeaderParameter
Throws
If the payload is not a reader or valid buffer
Throws
If required fields are missing
encode
▸ encode(message, writer?): Writer
Encodes the specified HeaderParameter message. Does not implicitly grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.verify|verify messages.