Skip to main content

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.

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​

▸ create(properties?): FieldConfiguration & $Properties

Creates a new FieldConfiguration instance using the specified properties.

Parameters​

NameTypeDescription
properties?$PropertiesProperties to set

Returns​

FieldConfiguration & $Properties

FieldConfiguration instance

▸ create(properties?): FieldConfiguration

Parameters​

NameType
properties?$Properties

Returns​

FieldConfiguration


decode​

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

Decodes a FieldConfiguration message from the specified reader or buffer.

Parameters​

NameTypeDescription
readerUint8Array | ReaderReader or buffer to decode from
length?numberMessage 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​

▸ decodeDelimited(reader): FieldConfiguration & $Properties

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

Parameters​

NameTypeDescription
readerUint8Array | ReaderReader 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​

▸ encode(message, writer?): Writer

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

Parameters​

NameTypeDescription
message$PropertiesFieldConfiguration message or plain object to encode
writer?WriterWriter 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​

NameTypeDescription
message$PropertiesFieldConfiguration message or plain object to encode
writer?WriterWriter 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​

NameTypeDescription
objectObjectPlain object

Returns​

FieldConfiguration

FieldConfiguration


toObject​

▸ toObject(message, options?): Object

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

Parameters​

NameTypeDescription
messageFieldConfigurationFieldConfiguration
options?IConversionOptionsConversion options

Returns​

Object

Plain object