Skip to main content

Class: 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.

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.

Methods​

toJSON()​

toJSON(): object

Converts this FieldConfiguration to JSON.

Returns​

object

JSON object


create()​

Call Signature​

static create(properties?): FieldConfiguration & $Properties

Creates a new FieldConfiguration instance using the specified properties.

Parameters​
properties?​

$Properties

Properties to set

Returns​

FieldConfiguration & $Properties

FieldConfiguration instance

Call Signature​

static create(properties?): FieldConfiguration

Creates a new FieldConfiguration instance using the specified properties.

Parameters​
properties?​

$Properties

Properties to set

Returns​

FieldConfiguration

FieldConfiguration instance


decode()​

static decode(reader, length?): FieldConfiguration & $Properties

Decodes a FieldConfiguration message from the specified reader or buffer.

Parameters​

reader​

Uint8Array<ArrayBufferLike> | Reader

Reader or buffer to decode from

length?​

number

Message length if known beforehand

Returns​

FieldConfiguration & $Properties

FieldConfiguration

Throws​

If the payload is not a reader or valid buffer

Throws​

If required fields are missing


decodeDelimited()​

static decodeDelimited(reader): FieldConfiguration & $Properties

Decodes a FieldConfiguration message from the specified reader or buffer, length delimited.

Parameters​

reader​

Uint8Array<ArrayBufferLike> | Reader

Reader or buffer to decode from

Returns​

FieldConfiguration & $Properties

FieldConfiguration

Throws​

If the payload is not a reader or valid buffer

Throws​

If required fields are missing


encode()​

static encode(message, writer?): Writer

Encodes the specified FieldConfiguration message. Does not implicitly grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration.verify|verify messages.

Parameters​

message​

$Properties

FieldConfiguration message or plain object to encode

writer?​

Writer

Writer to encode to

Returns​

Writer

Writer


encodeDelimited()​

static 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​

message​

$Properties

FieldConfiguration message or plain object to encode

writer?​

Writer

Writer to encode to

Returns​

Writer

Writer


fromObject()​

static fromObject(object): FieldConfiguration

Creates a FieldConfiguration message from a plain object. Also converts values to their respective internal types.

Parameters​

object​

{[k: string]: any; }

Plain object

Returns​

FieldConfiguration

FieldConfiguration


toObject()​

static toObject(message, options?): object

Creates a plain object from a FieldConfiguration message. Also converts values to other types if specified.

Parameters​

message​

FieldConfiguration

FieldConfiguration

options?​

IConversionOptions

Conversion options

Returns​

object

Plain object