Class: FieldConfiguration
options.JSONSchema.FieldConfiguration
'FieldConfiguration' provides additional field level properties used when generating the OpenAPI v2 file. These properties are not defined by OpenAPIv2, but they are used to control the generation.
Implements
Constructors
constructor
• new FieldConfiguration(properties?): FieldConfiguration
Constructs a new FieldConfiguration.
Parameters
| Name | Type | Description |
|---|---|---|
properties? | IFieldConfiguration | Properties to set |
Returns
Properties
pathParamName
• pathParamName: string
Alternative parameter name when used as path parameter. If set, this will be used as the complete parameter name when this field is used as a path parameter. Use this to avoid having auto generated path parameter names for overlapping paths.
Implementation of
IFieldConfiguration.pathParamName
Methods
toJSON
▸ toJSON(): Object
Converts this FieldConfiguration to JSON.
Returns
Object
JSON object
create
▸ create(properties?): FieldConfiguration
Creates a new FieldConfiguration instance using the specified properties.
Parameters
| Name | Type | Description |
|---|---|---|
properties? | IFieldConfiguration | Properties to set |
Returns
FieldConfiguration instance
decode
▸ decode(reader, length?): FieldConfiguration
Decodes a FieldConfiguration 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
FieldConfiguration
Throws
If the payload is not a reader or valid buffer
Throws
If required fields are missing
decodeDelimited
▸ decodeDelimited(reader): FieldConfiguration
Decodes a FieldConfiguration message from the specified reader or buffer, length delimited.
Parameters
| Name | Type | Description |
|---|---|---|
reader | Uint8Array | Reader | Reader or buffer to decode from |
Returns
FieldConfiguration
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 FieldConfiguration message. Does not implicitly grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration.verify|verify messages.
Parameters
| Name | Type | Description |
|---|---|---|
message | IFieldConfiguration | FieldConfiguration message or plain object to encode |
writer? | Writer | Writer to encode to |
Returns
Writer
Writer
encodeDelimited
▸ encodeDelimited(message, writer?): Writer
Encodes the specified FieldConfiguration message, length delimited. Does not implicitly grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration.verify|verify messages.
Parameters
| Name | Type | Description |
|---|---|---|
message | IFieldConfiguration | FieldConfiguration message or plain object to encode |
writer? | Writer | Writer to encode to |
Returns
Writer
Writer
fromObject
▸ fromObject(object): FieldConfiguration
Creates a FieldConfiguration message from a plain object. Also converts values to their respective internal types.
Parameters
| Name | Type | Description |
|---|---|---|
object | Object | Plain object |
Returns
FieldConfiguration
getTypeUrl
▸ getTypeUrl(typeUrlPrefix?): string
Gets the default type url for FieldConfiguration
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 FieldConfiguration message. Also converts values to other types if specified.
Parameters
| Name | Type | Description |
|---|---|---|
message | FieldConfiguration | FieldConfiguration |
options? | IConversionOptions | Conversion options |
Returns
Object
Plain object