@@ -195,7 +195,7 @@ message Parameters {
195
195
// `HeaderParameter` a HTTP header parameter.
196
196
// See: https://swagger.io/specification/v2/#parameter-object
197
197
message HeaderParameter {
198
- // `Type` is a a supported HTTP header type.
198
+ // `Type` is a supported HTTP header type.
199
199
// See https://swagger.io/specification/v2/#parameterType.
200
200
enum Type {
201
201
UNKNOWN = 0 ;
@@ -443,6 +443,45 @@ message Schema {
443
443
string example = 6 ;
444
444
}
445
445
446
+ // `EnumSchema` is subset of fields from the OpenAPI v2 specification's Schema object.
447
+ // Only fields that are applicable to Enums are included
448
+ // See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#schemaObject
449
+ //
450
+ // Example:
451
+ //
452
+ // option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_enum) = {
453
+ // ...
454
+ // title: "MyEnum";
455
+ // description:"This is my nice enum";
456
+ // example: "ZERO";
457
+ // required: true;
458
+ // ...
459
+ // };
460
+ //
461
+ message EnumSchema {
462
+ // A short description of the schema.
463
+ string description = 1 ;
464
+ string default = 2 ;
465
+ // The title of the schema.
466
+ string title = 3 ;
467
+ bool required = 4 ;
468
+ bool read_only = 5 ;
469
+ // Additional external documentation for this schema.
470
+ ExternalDocumentation external_docs = 6 ;
471
+ string example = 7 ;
472
+ // Ref is used to define an external reference to include in the message.
473
+ // This could be a fully qualified proto message reference, and that type must
474
+ // be imported into the protofile. If no message is identified, the Ref will
475
+ // be used verbatim in the output.
476
+ // For example:
477
+ // `ref: ".google.protobuf.Timestamp"`.
478
+ string ref = 8 ;
479
+ // Custom properties that start with "x-" such as "x-foo" used to describe
480
+ // extra functionality that is not covered by the standard OpenAPI Specification.
481
+ // See: https://swagger.io/docs/specification/2-0/swagger-extensions/
482
+ map <string , google.protobuf.Value > extensions = 9 ;
483
+ }
484
+
446
485
// `JSONSchema` represents properties from JSON Schema taken, and as used, in
447
486
// the OpenAPI v2 spec.
448
487
//
0 commit comments