Class: Tag
protoc_gen_openapiv2.options.Tag
Tag is a representation of OpenAPI v2 specification's Tag object.
See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#tagObject
Properties
description
• description: string
A short description for the tag. GFM syntax can be used for rich text representation.
extensions
• extensions: Object
Custom properties that start with "x-" such as "x-foo" used to describe extra functionality that is not covered by the standard OpenAPI Specification. See: https://swagger.io/docs/specification/2-0/swagger-extensions/
Index signature
▪ [k: string]: $Properties
externalDocs
• Optional externalDocs: null | $Properties
Additional external documentation for this tag.
name
• name: string
The name of the tag. Use it to allow override of the name of a global Tag object, then use that name to reference the tag throughout the OpenAPI file.
Methods
toJSON
▸ toJSON(): Object
Converts this Tag to JSON.
Returns
Object
JSON object
create
▸ create(properties?): Tag & $Shape
Creates a new Tag instance using the specified properties.
Parameters
| Name | Type | Description |
|---|---|---|
properties? | $Shape | Properties to set |
Returns
Tag instance
▸ create(properties?): Tag
Parameters
| Name | Type |
|---|---|
properties? | $Properties |
Returns
decode
▸ decode(reader, length?): Tag & $Shape
Decodes a Tag 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
Tag
Throws
If the payload is not a reader or valid buffer
Throws
If required fields are missing
decodeDelimited
▸ decodeDelimited(reader): Tag & $Shape
Decodes a Tag message from the specified reader or buffer, length delimited.
Parameters
| Name | Type | Description |
|---|---|---|
reader | Uint8Array | Reader | Reader or buffer to decode from |
Returns
Tag
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 Tag message. Does not implicitly grpc.gateway.protoc_gen_openapiv2.options.Tag.verify|verify messages.
Parameters
| Name | Type | Description |
|---|---|---|
message | $Properties | Tag message or plain object to encode |
writer? | Writer | Writer to encode to |
Returns
Writer
Writer
encodeDelimited
▸ encodeDelimited(message, writer?): Writer
Encodes the specified Tag message, length delimited. Does not implicitly grpc.gateway.protoc_gen_openapiv2.options.Tag.verify|verify messages.
Parameters
| Name | Type | Description |
|---|---|---|
message | $Properties | Tag message or plain object to encode |
writer? | Writer | Writer to encode to |
Returns
Writer
Writer
fromObject
▸ fromObject(object): Tag
Creates a Tag message from a plain object. Also converts values to their respective internal types.
Parameters
| Name | Type | Description |
|---|---|---|
object | Object | Plain object |
Returns
Tag
toObject
▸ toObject(message, options?): Object
Creates a plain object from a Tag message. Also converts values to other types if specified.
Parameters
| Name | Type | Description |
|---|---|---|
message | Tag | Tag |
options? | IConversionOptions | Conversion options |
Returns
Object
Plain object