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.

Implements

Constructors

constructor

new FieldConfiguration(properties?): FieldConfiguration

Constructs a new FieldConfiguration.

Parameters

NameTypeDescription
properties?IFieldConfigurationProperties to set

Returns

FieldConfiguration

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

NameTypeDescription
properties?IFieldConfigurationProperties to set

Returns

FieldConfiguration

FieldConfiguration instance


decode

decode(reader, length?): FieldConfiguration

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

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

NameTypeDescription
readerUint8Array | ReaderReader or buffer to decode from

Returns

FieldConfiguration

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
messageIFieldConfigurationFieldConfiguration 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
messageIFieldConfigurationFieldConfiguration 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


getTypeUrl

getTypeUrl(typeUrlPrefix?): string

Gets the default type url for FieldConfiguration

Parameters

NameTypeDescription
typeUrlPrefix?stringyour 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

NameTypeDescription
messageFieldConfigurationFieldConfiguration
options?IConversionOptionsConversion options

Returns

Object

Plain object