From b3a8280ae5e75ae37194f9b7ad0e297fde8c5efc Mon Sep 17 00:00:00 2001 From: Chris Reeves Date: Mon, 14 Nov 2022 16:10:32 +0000 Subject: [PATCH] docs: add openapi references to new parameters protos Co-Authored-By: Johan Brandhorst-Satzkorn --- protoc-gen-openapiv2/options/openapiv2.proto | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/protoc-gen-openapiv2/options/openapiv2.proto b/protoc-gen-openapiv2/options/openapiv2.proto index 23f5f5d8c4c..460a545336a 100644 --- a/protoc-gen-openapiv2/options/openapiv2.proto +++ b/protoc-gen-openapiv2/options/openapiv2.proto @@ -176,18 +176,24 @@ message Operation { // See: https://swagger.io/docs/specification/2-0/swagger-extensions/ map extensions = 13; // Custom parameters such as HTTP request headers. + // See: https://swagger.io/docs/specification/2-0/describing-parameters/ + // and https://swagger.io/specification/v2/#parameter-object. Parameters parameters = 14; } // `Parameters` is a representation of OpenAPI v2 specification's parameters object. +// See: https://swagger.io/specification/v2/#parameter-object message Parameters { // `Headers` is one or more HTTP header parameter. + // See: https://swagger.io/docs/specification/2-0/describing-parameters/#header-parameters repeated HeaderParameter headers = 1; } // `HeaderParameter` a HTTP header parameter. +// See: https://swagger.io/specification/v2/#parameter-object message HeaderParameter { - // `Type` is a a supported HTTP type. + // `Type` is a a supported HTTP header type. + // See https://swagger.io/specification/v2/#parameterType. enum Type { UNKNOWN = 0; STRING = 1; @@ -201,6 +207,7 @@ message HeaderParameter { // `Description` is a short description of the header. string description = 2; // `Type` is the type of the object. The value MUST be one of "string", "number", "integer", or "boolean". The "array" type is not supported. + // See: https://swagger.io/specification/v2/#parameterType. Type type = 3; // `Format` The extending format for the previously mentioned type. string format = 4; @@ -208,7 +215,7 @@ message HeaderParameter { bool required = 5; // field 6 is reserved for 'items', but in OpenAPI-specific way. reserved 6; - // field 7 is reserved `Collection Format` Determines the format of the array if type array is used. + // field 7 is reserved `Collection Format`. Determines the format of the array if type array is used. reserved 7; }