Skip to main content

Class: ExternalDocumentation

ExternalDocumentation is a representation of OpenAPI v2 specification's ExternalDocumentation object.

See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#externalDocumentationObject

Example:

option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { ... external_docs: { description: "More about gRPC-Gateway"; url: "https://github.com/grpc-ecosystem/grpc-gateway"; } ... };

Properties​

description​

description: string

A short description of the target documentation. GFM syntax can be used for rich text representation.


url​

url: string

The URL for the target documentation. Value MUST be in the format of a URL.

Methods​

toJSON()​

toJSON(): object

Converts this ExternalDocumentation to JSON.

Returns​

object

JSON object


create()​

Call Signature​

static create(properties?): ExternalDocumentation & $Properties

Creates a new ExternalDocumentation instance using the specified properties.

Parameters​
properties?​

$Properties

Properties to set

Returns​

ExternalDocumentation & $Properties

ExternalDocumentation instance

Call Signature​

static create(properties?): ExternalDocumentation

Creates a new ExternalDocumentation instance using the specified properties.

Parameters​
properties?​

$Properties

Properties to set

Returns​

ExternalDocumentation

ExternalDocumentation instance


decode()​

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

Decodes an ExternalDocumentation 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​

ExternalDocumentation & $Properties

ExternalDocumentation

Throws​

If the payload is not a reader or valid buffer

Throws​

If required fields are missing


decodeDelimited()​

static decodeDelimited(reader): ExternalDocumentation & $Properties

Decodes an ExternalDocumentation message from the specified reader or buffer, length delimited.

Parameters​

reader​

Uint8Array<ArrayBufferLike> | Reader

Reader or buffer to decode from

Returns​

ExternalDocumentation & $Properties

ExternalDocumentation

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 ExternalDocumentation message. Does not implicitly grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.verify|verify messages.

Parameters​

message​

$Properties

ExternalDocumentation message or plain object to encode

writer?​

Writer

Writer to encode to

Returns​

Writer

Writer


encodeDelimited()​

static encodeDelimited(message, writer?): Writer

Encodes the specified ExternalDocumentation message, length delimited. Does not implicitly grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.verify|verify messages.

Parameters​

message​

$Properties

ExternalDocumentation message or plain object to encode

writer?​

Writer

Writer to encode to

Returns​

Writer

Writer


fromObject()​

static fromObject(object): ExternalDocumentation

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

Parameters​

object​

{[k: string]: any; }

Plain object

Returns​

ExternalDocumentation

ExternalDocumentation


toObject()​

static toObject(message, options?): object

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

Parameters​

message​

ExternalDocumentation

ExternalDocumentation

options?​

IConversionOptions

Conversion options

Returns​

object

Plain object