Class: Parameters
protoc_gen_openapiv2.options.Parameters
Parameters is a representation of OpenAPI v2 specification's parameters object.
Note: This technically breaks compatibility with the OpenAPI 2 definition structure as we only
allow header parameters to be set here since we do not want users specifying custom non-header
parameters beyond those inferred from the Protobuf schema.
See: https://swagger.io/specification/v2/#parameter-object
Implements
Constructors
constructor
• new Parameters(properties?): Parameters
Constructs a new Parameters.
Parameters
| Name | Type | Description |
|---|---|---|
properties? | IParameters | Properties to set |
Returns
Properties
headers
• headers: IHeaderParameter[]
Headers is one or more HTTP header parameter.
See: https://swagger.io/docs/specification/2-0/describing-parameters/#header-parameters
Implementation of
Methods
toJSON
▸ toJSON(): Object
Converts this Parameters to JSON.
Returns
Object
JSON object
create
▸ create(properties?): Parameters
Creates a new Parameters instance using the specified properties.
Parameters
| Name | Type | Description |
|---|---|---|
properties? | IParameters | Properties to set |
Returns
Parameters instance
decode
▸ decode(reader, length?): Parameters
Decodes a Parameters 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
Parameters
Throws
If the payload is not a reader or valid buffer
Throws
If required fields are missing
decodeDelimited
▸ decodeDelimited(reader): Parameters
Decodes a Parameters message from the specified reader or buffer, length delimited.
Parameters
| Name | Type | Description |
|---|---|---|
reader | Uint8Array | Reader | Reader or buffer to decode from |
Returns
Parameters
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 Parameters message. Does not implicitly grpc.gateway.protoc_gen_openapiv2.options.Parameters.verify|verify messages.
Parameters
| Name | Type | Description |
|---|---|---|
message | IParameters | Parameters message or plain object to encode |
writer? | Writer | Writer to encode to |
Returns
Writer
Writer
encodeDelimited
▸ encodeDelimited(message, writer?): Writer
Encodes the specified Parameters message, length delimited. Does not implicitly grpc.gateway.protoc_gen_openapiv2.options.Parameters.verify|verify messages.
Parameters
| Name | Type | Description |
|---|---|---|
message | IParameters | Parameters message or plain object to encode |
writer? | Writer | Writer to encode to |
Returns
Writer
Writer
fromObject
▸ fromObject(object): Parameters
Creates a Parameters message from a plain object. Also converts values to their respective internal types.
Parameters
| Name | Type | Description |
|---|---|---|
object | Object | Plain object |
Returns
Parameters
getTypeUrl
▸ getTypeUrl(typeUrlPrefix?): string
Gets the default type url for Parameters
Parameters
| Name | Type | Description |
|---|---|---|
typeUrlPrefix? | string | your custom typeUrlPrefix(default "type.googleapis.com") |
Returns
string
The default type url
toObject
▸ toObject(message, options?): Object
Creates a plain object from a Parameters message. Also converts values to other types if specified.
Parameters
| Name | Type | Description |
|---|---|---|
message | Parameters | Parameters |
options? | IConversionOptions | Conversion options |
Returns
Object
Plain object