Protorip

grpc.gateway.protoc_gen_openapiv3.options

Messages

Document is a file-level override applied to the top of the generated OpenAPI document. Only non-empty sub-fields replace the defaults the generator would otherwise synthesize from the proto file name.

Spec: https://spec.openapis.org/oas/v3.1.0#openapi-object

NameTagTypeLabelDescription
info1Infooptional

Provides metadata about the API. The metadata MAY be used by tooling as required.

servers2Serverrepeated

An array of Server Objects, which provide connectivity information to a target server. If the servers property is not provided, or is an empty array, the default value would be a Server Object with a url value of /.

external_docs3ExternalDocsoptional

Additional external documentation.

tags4Tagrepeated

A list of tags used by the document with additional metadata. Tags declared here are merged with the tags derived from proto services: an entry here whose name matches a service's tag replaces the default, and entries with new names are appended. This is the only way to attach a description (or external docs) to a tag referenced by a method-level openapiv3_operation.tags override, since those tags would otherwise appear in the document with no metadata.

extensions5map<string, google.protobuf.Value>map

Custom specification extensions rendered at the root of the OpenAPI document. Keys MUST start with "x-".

See: https://spec.openapis.org/oas/v3.1.0#specification-extensions

components6Componentsoptional

Reusable objects rendered under the document's components section.

See: https://spec.openapis.org/oas/v3.1.0#oasComponents

security7SecurityRequirementrepeated

A declaration of which security mechanisms can be used across the API. The list of values includes alternative security requirement objects that can be used. Only one of the security requirement objects needs to be satisfied to authorize a request. Individual operations can override this definition with openapiv3_operation.security.

See: https://spec.openapis.org/oas/v3.1.0#oasSecurity

Info mirrors the fields of the OpenAPI 3.1.0 Info object that users most often want to set from proto.

Spec: https://spec.openapis.org/oas/v3.1.0#info-object

NameTagTypeLabelDescription
title1stringoptional

The title of the API.

summary2stringoptional

A short summary of the API.

description3stringoptional

A description of the API. CommonMark syntax MAY be used for rich text representation.

terms_of_service4stringoptional

A URL to the Terms of Service for the API. This MUST be in the form of a URL.

contact5Contactoptional

The contact information for the exposed API.

license6Licenseoptional

The license information for the exposed API.

version7stringoptional

The version of the OpenAPI document (which is distinct from the OpenAPI Specification version or the API implementation version).

extensions8map<string, google.protobuf.Value>map

Custom specification extensions rendered on the Info object. Keys MUST start with "x-".

See: https://spec.openapis.org/oas/v3.1.0#specification-extensions

Contact information for the exposed API.

Spec: https://spec.openapis.org/oas/v3.1.0#contact-object

NameTagTypeLabelDescription
name1stringoptional

The identifying name of the contact person/organization.

url2stringoptional

The URL pointing to the contact information. This MUST be in the form of a URL.

email3stringoptional

The email address of the contact person/organization. This MUST be in the form of an email address.

License information for the exposed API. identifier and url are mutually exclusive in the OpenAPI 3.1.0 spec, so they are modeled as a oneof: setting one clears the other.

Spec: https://spec.openapis.org/oas/v3.1.0#license-object

NameTagTypeLabelDescription
name1stringoptional

The license name used for the API.

identifier2stringoptional

An SPDX expression for the API.

url3stringoptional

A URL to the license used for the API. This MUST be in the form of a URL.

Server represents an API server.

Spec: https://spec.openapis.org/oas/v3.1.0#server-object

NameTagTypeLabelDescription
url1stringoptional

A URL to the target host. This URL supports Server Variables and MAY be relative, to indicate that the host location is relative to the location where the OpenAPI document is being served.

description2stringoptional

An optional string describing the host designated by the URL. CommonMark syntax MAY be used for rich text representation.

Operation is a method-level override applied to the generated Operation object. Non-empty fields replace values the generator would otherwise derive from proto comments or defaults.

Spec: https://spec.openapis.org/oas/v3.1.0#operation-object

NameTagTypeLabelDescription
tags1stringrepeated

A list of tags for API documentation control. Tags can be used for logical grouping of operations by resources or any other qualifier.

summary2stringoptional

A short summary of what the operation does.

description3stringoptional

A verbose explanation of the operation behavior. CommonMark syntax MAY be used for rich text representation.

external_docs4ExternalDocsoptional

Additional external documentation for this operation.

operation_id5stringoptional

Unique string used to identify the operation. The id MUST be unique among all operations described in the API.

deprecated6booloptional

Declares this operation to be deprecated. Consumers SHOULD refrain from usage of the declared operation. Default value is false. Setting this to false does not un-deprecate a method that is marked deprecated in proto (option deprecated = true on the method, service, or file).

servers7Serverrepeated

An alternative servers array to service this operation. If a servers array is specified at the Path Item Object or OpenAPI Object level, it will be overridden by this value.

extensions8map<string, google.protobuf.Value>map

Custom specification extensions rendered on the Operation object. Keys MUST start with "x-".

See: https://spec.openapis.org/oas/v3.1.0#specification-extensions

security9SecurityRequirementrepeated

A declaration of which security mechanisms can be used for this operation. The list of values includes alternative security requirement objects that can be used. When set, this replaces the document-level security for this operation. To make security optional for this operation, add an empty security requirement (security: {}).

See: https://spec.openapis.org/oas/v3.1.0#operationSecurity

Schema is a message- or field-level override applied to the generated JSON Schema. Non-empty fields replace values the generator would otherwise derive from proto comments or the proto type.

Both openapiv3_schema (on MessageOptions) and openapiv3_field (on FieldOptions) use this message.

Spec: https://spec.openapis.org/oas/v3.1.0#schema-object Underlying dialect: https://json-schema.org/draft/2020-12/json-schema-core

NameTagTypeLabelDescription
title1stringoptional

A preferably short string describing the purpose of the instance described by the schema.

description2stringoptional

A string providing explanation about the purpose of the instance described by the schema.

deprecated3booloptional

Declares this schema to be deprecated. Consumers SHOULD refrain from usage of the declared schema. Default value is false. Setting this to false does not un-deprecate a schema that is marked deprecated in proto (option deprecated = true on the message, field, or file).

extensions4map<string, google.protobuf.Value>map

Custom specification extensions rendered on the Schema object. Keys MUST start with "x-". Setting this on a field-level annotation forces a schema body (like title), so a $ref-typed field carrying extensions is wrapped in allOf.

See: https://spec.openapis.org/oas/v3.1.0#specification-extensions

Tag adds metadata to a single tag that is used by the Operation Object. It is not mandatory to have a Tag Object per tag defined in the Operation Object instances.

Spec: https://spec.openapis.org/oas/v3.1.0#tag-object

NameTagTypeLabelDescription
name1stringoptional

The name of the tag.

description2stringoptional

A description for the tag. CommonMark syntax MAY be used for rich text representation.

external_docs3ExternalDocsoptional

Additional external documentation for this tag.

extensions4map<string, google.protobuf.Value>map

Custom specification extensions rendered on the Tag object. Keys MUST start with "x-".

See: https://spec.openapis.org/oas/v3.1.0#specification-extensions

SecurityScheme defines a security scheme that can be used by the operations.

Spec: https://spec.openapis.org/oas/v3.1.0#security-scheme-object

NameTagTypeLabelDescription
type1SecurityScheme.Typeoptional

The type of the security scheme. Required.

See: https://spec.openapis.org/oas/v3.1.0#securitySchemeType

description2stringoptional

A description for the security scheme. CommonMark syntax MAY be used for rich text representation.

See: https://spec.openapis.org/oas/v3.1.0#securitySchemeDescription

name3stringoptional

The name of the header, query or cookie parameter to be used. Required when type is TYPE_API_KEY.

See: https://spec.openapis.org/oas/v3.1.0#securitySchemeName

in4SecurityScheme.Inoptional

The location of the API key. Required when type is TYPE_API_KEY.

See: https://spec.openapis.org/oas/v3.1.0#securitySchemeIn

scheme5stringoptional

The name of the HTTP Authorization scheme to be used in the Authorization header as defined in RFC 7235, for example "basic" or "bearer". Required when type is TYPE_HTTP.

See: https://spec.openapis.org/oas/v3.1.0#securitySchemeScheme

bearer_format6stringoptional

A hint to the client to identify how the bearer token is formatted. Only used when type is TYPE_HTTP and scheme is "bearer".

See: https://spec.openapis.org/oas/v3.1.0#securitySchemeBearerFormat

flows7OAuthFlowsoptional

Configuration information for the flow types supported. Required when type is TYPE_OAUTH2.

See: https://spec.openapis.org/oas/v3.1.0#securitySchemeFlows

open_id_connect_url8stringoptional

OpenID Connect URL to discover OAuth2 configuration values. This MUST be in the form of a URL. Required when type is TYPE_OPEN_ID_CONNECT.

See: https://spec.openapis.org/oas/v3.1.0#securitySchemeOpenIdConnectUrl

OAuthFlows allows configuration of the supported OAuth flows.

Spec: https://spec.openapis.org/oas/v3.1.0#oauth-flows-object

NameTagTypeLabelDescription
implicit1OAuthFlowoptional

Configuration for the OAuth Implicit flow.

See: https://spec.openapis.org/oas/v3.1.0#oauthFlowsImplicit

password2OAuthFlowoptional

Configuration for the OAuth Resource Owner Password flow.

See: https://spec.openapis.org/oas/v3.1.0#oauthFlowsPassword

client_credentials3OAuthFlowoptional

Configuration for the OAuth Client Credentials flow.

See: https://spec.openapis.org/oas/v3.1.0#oauthFlowsClientCredentials

authorization_code4OAuthFlowoptional

Configuration for the OAuth Authorization Code flow.

See: https://spec.openapis.org/oas/v3.1.0#oauthFlowsAuthorizationCode

OAuthFlow is the configuration details for a supported OAuth flow.

Spec: https://spec.openapis.org/oas/v3.1.0#oauth-flow-object

NameTagTypeLabelDescription
authorization_url1stringoptional

The authorization URL to be used for this flow. Required for the implicit and authorization code flows.

See: https://spec.openapis.org/oas/v3.1.0#oauthFlowAuthorizationUrl

token_url2stringoptional

The token URL to be used for this flow. Required for the password, client credentials and authorization code flows.

See: https://spec.openapis.org/oas/v3.1.0#oauthFlowTokenUrl

refresh_url3stringoptional

The URL to be used for obtaining refresh tokens.

See: https://spec.openapis.org/oas/v3.1.0#oauthFlowRefreshUrl

scopes4map<string, string>map

The available scopes for the OAuth2 security scheme. A map between the scope name and a short description for it. The map MAY be empty.

See: https://spec.openapis.org/oas/v3.1.0#oauthFlowScopes

SecurityRequirement lists the security schemes required to execute an operation. When multiple schemes are listed, all of them must be satisfied. An empty security requirement allows anonymous access.

Spec: https://spec.openapis.org/oas/v3.1.0#security-requirement-object

NameTagTypeLabelDescription
schemes1map<string, SecurityRequirement.Scopes>map

Maps the name of a security scheme declared in Document.components.security_schemes to the scopes it requires.

See: https://spec.openapis.org/oas/v3.1.0#securityRequirementsName

Scopes lists the scopes required by a single security scheme.

NameTagTypeLabelDescription
scopes1stringrepeated

For TYPE_OAUTH2 and TYPE_OPEN_ID_CONNECT schemes, the scope names required for the execution. For other scheme types, a list of role names, which MAY be empty.

Enums

The type of the security scheme.

NameValueDescription
TYPE_UNSPECIFIED0

Not a valid security scheme type. Setting type is required.

TYPE_API_KEY1

An API key sent in a header, query parameter or cookie.

TYPE_HTTP2

HTTP authentication, for example basic or bearer.

TYPE_MUTUAL_TLS3

Mutual TLS.

TYPE_OAUTH24

OAuth2.

TYPE_OPEN_ID_CONNECT5

OpenID Connect Discovery.

The location of an API key.

NameValueDescription
IN_UNSPECIFIED0

Not set. Required when type is TYPE_API_KEY.

IN_QUERY1

The API key is sent as a query parameter.

IN_HEADER2

The API key is sent as a header.

Extensions