diff --git a/examples/internal/clients/abe/BUILD.bazel b/examples/internal/clients/abe/BUILD.bazel index 9c1bfc9ce2b..6e5d6d94535 100644 --- a/examples/internal/clients/abe/BUILD.bazel +++ b/examples/internal/clients/abe/BUILD.bazel @@ -15,6 +15,7 @@ go_library( "model_examplepb_a_bit_of_everything.go", "model_examplepb_a_bit_of_everything_repeated.go", "model_examplepb_body.go", + "model_examplepb_book.go", "model_examplepb_numeric_enum.go", "model_examplepb_update_v2_request.go", "model_message_path_enum_nested_path_enum.go", diff --git a/examples/internal/clients/abe/api/swagger.yaml b/examples/internal/clients/abe/api/swagger.yaml index 1f876e2452e..1bde4a0ec43 100644 --- a/examples/internal/clients/abe/api/swagger.yaml +++ b/examples/internal/clients/abe/api/swagger.yaml @@ -708,6 +708,249 @@ paths: schema: $ref: "#/definitions/ABitOfEverythingNested" x-exportParamName: "Body" + - name: "uuid" + in: "query" + required: false + type: "string" + x-exportParamName: "Uuid" + x-optionalDataType: "String" + - name: "float_value" + in: "query" + description: "Float value field" + required: true + type: "number" + default: 0.2 + format: "float" + x-exportParamName: "FloatValue" + - name: "double_value" + in: "query" + required: false + type: "number" + format: "double" + x-exportParamName: "DoubleValue" + x-optionalDataType: "Float64" + - name: "int64_value" + in: "query" + required: false + type: "string" + format: "int64" + x-exportParamName: "Int64Value" + x-optionalDataType: "String" + - name: "uint64_value" + in: "query" + required: false + type: "string" + format: "uint64" + x-exportParamName: "Uint64Value" + x-optionalDataType: "String" + - name: "int32_value" + in: "query" + required: false + type: "integer" + format: "int32" + x-exportParamName: "Int32Value" + x-optionalDataType: "Int32" + - name: "fixed64_value" + in: "query" + required: false + type: "string" + format: "uint64" + x-exportParamName: "Fixed64Value" + x-optionalDataType: "String" + - name: "fixed32_value" + in: "query" + required: false + type: "integer" + format: "int64" + x-exportParamName: "Fixed32Value" + x-optionalDataType: "Int64" + - name: "bool_value" + in: "query" + required: false + type: "boolean" + format: "boolean" + x-exportParamName: "BoolValue" + x-optionalDataType: "Bool" + - name: "bytes_value" + in: "query" + required: false + type: "string" + format: "byte" + x-exportParamName: "BytesValue" + x-optionalDataType: "String" + - name: "uint32_value" + in: "query" + required: false + type: "integer" + format: "int64" + x-exportParamName: "Uint32Value" + x-optionalDataType: "Int64" + - name: "enum_value" + in: "query" + description: " - ZERO: ZERO means 0\n - ONE: ONE means 1" + required: false + type: "string" + default: "ZERO" + enum: + - "ZERO" + - "ONE" + x-exportParamName: "EnumValue" + x-optionalDataType: "String" + - name: "path_enum_value" + in: "query" + required: false + type: "string" + default: "ABC" + enum: + - "ABC" + - "DEF" + x-exportParamName: "PathEnumValue" + x-optionalDataType: "String" + - name: "nested_path_enum_value" + in: "query" + required: false + type: "string" + default: "GHI" + enum: + - "GHI" + - "JKL" + x-exportParamName: "NestedPathEnumValue" + x-optionalDataType: "String" + - name: "sfixed32_value" + in: "query" + required: false + type: "integer" + format: "int32" + x-exportParamName: "Sfixed32Value" + x-optionalDataType: "Int32" + - name: "sfixed64_value" + in: "query" + required: false + type: "string" + format: "int64" + x-exportParamName: "Sfixed64Value" + x-optionalDataType: "String" + - name: "sint32_value" + in: "query" + required: false + type: "integer" + format: "int32" + x-exportParamName: "Sint32Value" + x-optionalDataType: "Int32" + - name: "sint64_value" + in: "query" + required: false + type: "string" + format: "int64" + x-exportParamName: "Sint64Value" + x-optionalDataType: "String" + - name: "repeated_string_value" + in: "query" + required: false + type: "array" + items: + type: "string" + collectionFormat: "multi" + x-exportParamName: "RepeatedStringValue" + - name: "oneof_string" + in: "query" + required: false + type: "string" + x-exportParamName: "OneofString" + x-optionalDataType: "String" + - name: "nonConventionalNameValue" + in: "query" + required: false + type: "string" + x-exportParamName: "NonConventionalNameValue" + x-optionalDataType: "String" + - name: "timestamp_value" + in: "query" + required: false + type: "string" + format: "date-time" + x-exportParamName: "TimestampValue" + x-optionalDataType: "Time" + - name: "repeated_enum_value" + in: "query" + description: "repeated enum value. it is comma-separated in query.\n\n - ZERO:\ + \ ZERO means 0\n - ONE: ONE means 1" + required: false + type: "array" + items: + type: "string" + enum: + - "ZERO" + - "ONE" + collectionFormat: "multi" + x-exportParamName: "RepeatedEnumValue" + - name: "repeated_enum_annotation" + in: "query" + description: "Repeated numeric enum title. Repeated numeric enum description.\n\ + \n - ZERO: ZERO means 0\n - ONE: ONE means 1" + required: false + type: "array" + items: + type: "string" + enum: + - "ZERO" + - "ONE" + collectionFormat: "multi" + x-exportParamName: "RepeatedEnumAnnotation" + - name: "enum_value_annotation" + in: "query" + description: "Numeric enum title. Numeric enum description.\n\n - ZERO: ZERO\ + \ means 0\n - ONE: ONE means 1" + required: false + type: "string" + default: "ZERO" + enum: + - "ZERO" + - "ONE" + x-exportParamName: "EnumValueAnnotation" + x-optionalDataType: "String" + - name: "repeated_string_annotation" + in: "query" + description: "Repeated string title. Repeated string description." + required: false + type: "array" + items: + type: "string" + collectionFormat: "multi" + x-exportParamName: "RepeatedStringAnnotation" + - name: "nested_annotation.name" + in: "query" + description: "name is nested field." + required: false + type: "string" + x-exportParamName: "NestedAnnotationName" + x-optionalDataType: "String" + - name: "nested_annotation.amount" + in: "query" + required: false + type: "integer" + format: "int64" + x-exportParamName: "NestedAnnotationAmount" + x-optionalDataType: "Int64" + - name: "nested_annotation.ok" + in: "query" + description: "DeepEnum description.\n\n - FALSE: FALSE is false.\n - TRUE:\ + \ TRUE is true." + required: false + type: "string" + default: "FALSE" + enum: + - "FALSE" + - "TRUE" + x-exportParamName: "NestedAnnotationOk" + x-optionalDataType: "String" + - name: "int64_override_type" + in: "query" + required: false + type: "integer" + format: "int64" + x-exportParamName: "Int64OverrideType" + x-optionalDataType: "Int64" responses: 200: description: "A successful response." @@ -1527,6 +1770,57 @@ paths: description: "An unexpected error response" schema: $ref: "#/definitions/runtimeError" + /v1/{parent=publishers/*}/books: + post: + tags: + - "ABitOfEverythingService" + summary: "Create a book." + operationId: "ABitOfEverythingService_CreateBook" + parameters: + - name: "parent" + in: "path" + description: "The publisher in which to create the book.\n\nFormat: `publishers/{publisher}`\n\ + \nExample: `publishers/1257894000000000000`" + required: true + type: "string" + x-exportParamName: "Parent" + - in: "body" + name: "body" + description: "The book to create." + required: true + schema: + $ref: "#/definitions/examplepbBook" + x-exportParamName: "Body" + - name: "book_id" + in: "query" + description: "The ID to use for the book.\n\nThis must start with an alphanumeric\ + \ character." + required: false + type: "string" + x-exportParamName: "BookId" + x-optionalDataType: "String" + responses: + 200: + description: "A successful response." + schema: + $ref: "#/definitions/examplepbBook" + 403: + description: "Returned when the user does not have permission to access\ + \ the resource." + schema: {} + 404: + description: "Returned when the resource does not exist." + schema: + type: "string" + format: "string" + 418: + description: "I'm a teapot." + schema: + $ref: "#/definitions/examplepbNumericEnum" + default: + description: "An unexpected error response" + schema: + $ref: "#/definitions/runtimeError" /v2/example/a_bit_of_everything/{abe.uuid}: put: tags: @@ -1544,6 +1838,15 @@ paths: schema: $ref: "#/definitions/examplepbABitOfEverything" x-exportParamName: "Body" + - name: "update_mask.paths" + in: "query" + description: "The set of field mask paths." + required: false + type: "array" + items: + type: "string" + collectionFormat: "multi" + x-exportParamName: "UpdateMaskPaths" responses: 200: description: "A successful response." @@ -1581,6 +1884,15 @@ paths: schema: $ref: "#/definitions/examplepbABitOfEverything" x-exportParamName: "Body" + - name: "update_mask.paths" + in: "query" + description: "The set of field mask paths." + required: false + type: "array" + items: + type: "string" + collectionFormat: "multi" + x-exportParamName: "UpdateMaskPaths" responses: 200: description: "A successful response." @@ -2240,6 +2552,28 @@ definitions: properties: name: type: "string" + examplepbBook: + type: "object" + properties: + name: + type: "string" + description: "The resource name of the book.\n\nFormat: `publishers/{publisher}/books/{book}`\n\ + \nExample: `publishers/1257894000000000000/books/my-book`" + id: + type: "string" + description: "Output only. The book's ID." + readOnly: true + create_time: + type: "string" + format: "date-time" + description: "Output only. Creation time of the book." + readOnly: true + description: "An example resource type from AIP-123 used to test the behavior\ + \ described in\nthe CreateBookRequest message.\n\nSee: https://google.aip.dev/123" + example: + create_time: "2000-01-23T04:56:07.000+00:00" + name: "name" + id: "id" examplepbNumericEnum: type: "string" description: "NumericEnum is one or zero.\n\n - ZERO: ZERO means 0\n - ONE: ONE\ diff --git a/examples/internal/clients/abe/api_a_bit_of_everything_service.go b/examples/internal/clients/abe/api_a_bit_of_everything_service.go index 0281b8d591f..91b52e7bbe9 100644 --- a/examples/internal/clients/abe/api_a_bit_of_everything_service.go +++ b/examples/internal/clients/abe/api_a_bit_of_everything_service.go @@ -791,10 +791,74 @@ ABitOfEverythingServiceApiService * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param stringValue * @param body + * @param floatValue Float value field + * @param optional nil or *ABitOfEverythingServiceCheckPostQueryParamsOpts - Optional Parameters: + * @param "Uuid" (optional.String) - + * @param "DoubleValue" (optional.Float64) - + * @param "Int64Value" (optional.String) - + * @param "Uint64Value" (optional.String) - + * @param "Int32Value" (optional.Int32) - + * @param "Fixed64Value" (optional.String) - + * @param "Fixed32Value" (optional.Int64) - + * @param "BoolValue" (optional.Bool) - + * @param "BytesValue" (optional.String) - + * @param "Uint32Value" (optional.Int64) - + * @param "EnumValue" (optional.String) - - ZERO: ZERO means 0 - ONE: ONE means 1 + * @param "PathEnumValue" (optional.String) - + * @param "NestedPathEnumValue" (optional.String) - + * @param "Sfixed32Value" (optional.Int32) - + * @param "Sfixed64Value" (optional.String) - + * @param "Sint32Value" (optional.Int32) - + * @param "Sint64Value" (optional.String) - + * @param "RepeatedStringValue" (optional.Interface of []string) - + * @param "OneofString" (optional.String) - + * @param "NonConventionalNameValue" (optional.String) - + * @param "TimestampValue" (optional.Time) - + * @param "RepeatedEnumValue" (optional.Interface of []string) - repeated enum value. it is comma-separated in query. - ZERO: ZERO means 0 - ONE: ONE means 1 + * @param "RepeatedEnumAnnotation" (optional.Interface of []string) - Repeated numeric enum title. Repeated numeric enum description. - ZERO: ZERO means 0 - ONE: ONE means 1 + * @param "EnumValueAnnotation" (optional.String) - Numeric enum title. Numeric enum description. - ZERO: ZERO means 0 - ONE: ONE means 1 + * @param "RepeatedStringAnnotation" (optional.Interface of []string) - Repeated string title. Repeated string description. + * @param "NestedAnnotationName" (optional.String) - name is nested field. + * @param "NestedAnnotationAmount" (optional.Int64) - + * @param "NestedAnnotationOk" (optional.String) - DeepEnum description. - FALSE: FALSE is false. - TRUE: TRUE is true. + * @param "Int64OverrideType" (optional.Int64) - @return ExamplepbABitOfEverything */ -func (a *ABitOfEverythingServiceApiService) ABitOfEverythingServiceCheckPostQueryParams(ctx context.Context, stringValue string, body ABitOfEverythingNested) (ExamplepbABitOfEverything, *http.Response, error) { + +type ABitOfEverythingServiceCheckPostQueryParamsOpts struct { + Uuid optional.String + DoubleValue optional.Float64 + Int64Value optional.String + Uint64Value optional.String + Int32Value optional.Int32 + Fixed64Value optional.String + Fixed32Value optional.Int64 + BoolValue optional.Bool + BytesValue optional.String + Uint32Value optional.Int64 + EnumValue optional.String + PathEnumValue optional.String + NestedPathEnumValue optional.String + Sfixed32Value optional.Int32 + Sfixed64Value optional.String + Sint32Value optional.Int32 + Sint64Value optional.String + RepeatedStringValue optional.Interface + OneofString optional.String + NonConventionalNameValue optional.String + TimestampValue optional.Time + RepeatedEnumValue optional.Interface + RepeatedEnumAnnotation optional.Interface + EnumValueAnnotation optional.String + RepeatedStringAnnotation optional.Interface + NestedAnnotationName optional.String + NestedAnnotationAmount optional.Int64 + NestedAnnotationOk optional.String + Int64OverrideType optional.Int64 +} + +func (a *ABitOfEverythingServiceApiService) ABitOfEverythingServiceCheckPostQueryParams(ctx context.Context, stringValue string, body ABitOfEverythingNested, floatValue float32, localVarOptionals *ABitOfEverythingServiceCheckPostQueryParamsOpts) (ExamplepbABitOfEverything, *http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Post") localVarPostBody interface{} @@ -811,6 +875,94 @@ func (a *ABitOfEverythingServiceApiService) ABitOfEverythingServiceCheckPostQuer localVarQueryParams := url.Values{} localVarFormParams := url.Values{} + if localVarOptionals != nil && localVarOptionals.Uuid.IsSet() { + localVarQueryParams.Add("uuid", parameterToString(localVarOptionals.Uuid.Value(), "")) + } + localVarQueryParams.Add("float_value", parameterToString(floatValue, "")) + if localVarOptionals != nil && localVarOptionals.DoubleValue.IsSet() { + localVarQueryParams.Add("double_value", parameterToString(localVarOptionals.DoubleValue.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.Int64Value.IsSet() { + localVarQueryParams.Add("int64_value", parameterToString(localVarOptionals.Int64Value.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.Uint64Value.IsSet() { + localVarQueryParams.Add("uint64_value", parameterToString(localVarOptionals.Uint64Value.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.Int32Value.IsSet() { + localVarQueryParams.Add("int32_value", parameterToString(localVarOptionals.Int32Value.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.Fixed64Value.IsSet() { + localVarQueryParams.Add("fixed64_value", parameterToString(localVarOptionals.Fixed64Value.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.Fixed32Value.IsSet() { + localVarQueryParams.Add("fixed32_value", parameterToString(localVarOptionals.Fixed32Value.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.BoolValue.IsSet() { + localVarQueryParams.Add("bool_value", parameterToString(localVarOptionals.BoolValue.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.BytesValue.IsSet() { + localVarQueryParams.Add("bytes_value", parameterToString(localVarOptionals.BytesValue.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.Uint32Value.IsSet() { + localVarQueryParams.Add("uint32_value", parameterToString(localVarOptionals.Uint32Value.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.EnumValue.IsSet() { + localVarQueryParams.Add("enum_value", parameterToString(localVarOptionals.EnumValue.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.PathEnumValue.IsSet() { + localVarQueryParams.Add("path_enum_value", parameterToString(localVarOptionals.PathEnumValue.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.NestedPathEnumValue.IsSet() { + localVarQueryParams.Add("nested_path_enum_value", parameterToString(localVarOptionals.NestedPathEnumValue.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.Sfixed32Value.IsSet() { + localVarQueryParams.Add("sfixed32_value", parameterToString(localVarOptionals.Sfixed32Value.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.Sfixed64Value.IsSet() { + localVarQueryParams.Add("sfixed64_value", parameterToString(localVarOptionals.Sfixed64Value.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.Sint32Value.IsSet() { + localVarQueryParams.Add("sint32_value", parameterToString(localVarOptionals.Sint32Value.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.Sint64Value.IsSet() { + localVarQueryParams.Add("sint64_value", parameterToString(localVarOptionals.Sint64Value.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.RepeatedStringValue.IsSet() { + localVarQueryParams.Add("repeated_string_value", parameterToString(localVarOptionals.RepeatedStringValue.Value(), "multi")) + } + if localVarOptionals != nil && localVarOptionals.OneofString.IsSet() { + localVarQueryParams.Add("oneof_string", parameterToString(localVarOptionals.OneofString.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.NonConventionalNameValue.IsSet() { + localVarQueryParams.Add("nonConventionalNameValue", parameterToString(localVarOptionals.NonConventionalNameValue.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.TimestampValue.IsSet() { + localVarQueryParams.Add("timestamp_value", parameterToString(localVarOptionals.TimestampValue.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.RepeatedEnumValue.IsSet() { + localVarQueryParams.Add("repeated_enum_value", parameterToString(localVarOptionals.RepeatedEnumValue.Value(), "multi")) + } + if localVarOptionals != nil && localVarOptionals.RepeatedEnumAnnotation.IsSet() { + localVarQueryParams.Add("repeated_enum_annotation", parameterToString(localVarOptionals.RepeatedEnumAnnotation.Value(), "multi")) + } + if localVarOptionals != nil && localVarOptionals.EnumValueAnnotation.IsSet() { + localVarQueryParams.Add("enum_value_annotation", parameterToString(localVarOptionals.EnumValueAnnotation.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.RepeatedStringAnnotation.IsSet() { + localVarQueryParams.Add("repeated_string_annotation", parameterToString(localVarOptionals.RepeatedStringAnnotation.Value(), "multi")) + } + if localVarOptionals != nil && localVarOptionals.NestedAnnotationName.IsSet() { + localVarQueryParams.Add("nested_annotation.name", parameterToString(localVarOptionals.NestedAnnotationName.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.NestedAnnotationAmount.IsSet() { + localVarQueryParams.Add("nested_annotation.amount", parameterToString(localVarOptionals.NestedAnnotationAmount.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.NestedAnnotationOk.IsSet() { + localVarQueryParams.Add("nested_annotation.ok", parameterToString(localVarOptionals.NestedAnnotationOk.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.Int64OverrideType.IsSet() { + localVarQueryParams.Add("int64_override_type", parameterToString(localVarOptionals.Int64OverrideType.Value(), "")) + } // to determine the Content-Type header localVarHttpContentTypes := []string{"application/json", "application/x-foo-mime"} @@ -1262,6 +1414,164 @@ func (a *ABitOfEverythingServiceApiService) ABitOfEverythingServiceCreateBody(ct return localVarReturnValue, localVarHttpResponse, nil } +/* +ABitOfEverythingServiceApiService Create a book. + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param parent The publisher in which to create the book. Format: `publishers/{publisher}` Example: `publishers/1257894000000000000` + * @param body The book to create. + * @param optional nil or *ABitOfEverythingServiceCreateBookOpts - Optional Parameters: + * @param "BookId" (optional.String) - The ID to use for the book. This must start with an alphanumeric character. + +@return ExamplepbBook +*/ + +type ABitOfEverythingServiceCreateBookOpts struct { + BookId optional.String +} + +func (a *ABitOfEverythingServiceApiService) ABitOfEverythingServiceCreateBook(ctx context.Context, parent string, body ExamplepbBook, localVarOptionals *ABitOfEverythingServiceCreateBookOpts) (ExamplepbBook, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue ExamplepbBook + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/v1/{parent=publishers/*}/books" + localVarPath = strings.Replace(localVarPath, "{"+"parent"+"}", fmt.Sprintf("%v", parent), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if localVarOptionals != nil && localVarOptionals.BookId.IsSet() { + localVarQueryParams.Add("book_id", parameterToString(localVarOptionals.BookId.Value(), "")) + } + // to determine the Content-Type header + localVarHttpContentTypes := []string{"application/json", "application/x-foo-mime"} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json", "application/x-foo-mime"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + // body params + localVarPostBody = &body + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["X-API-Key"] = key + + } + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { + return localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 200 { + var v ExamplepbBook + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + if localVarHttpResponse.StatusCode == 403 { + var v interface{} + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + if localVarHttpResponse.StatusCode == 404 { + var v string + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + if localVarHttpResponse.StatusCode == 418 { + var v ExamplepbNumericEnum + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + if localVarHttpResponse.StatusCode == 0 { + var v RuntimeError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + /* ABitOfEverythingServiceApiService * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @@ -3100,10 +3410,17 @@ ABitOfEverythingServiceApiService * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param abeUuid * @param body + * @param optional nil or *ABitOfEverythingServiceUpdateV2Opts - Optional Parameters: + * @param "UpdateMaskPaths" (optional.Interface of []string) - The set of field mask paths. @return interface{} */ -func (a *ABitOfEverythingServiceApiService) ABitOfEverythingServiceUpdateV2(ctx context.Context, abeUuid string, body ExamplepbABitOfEverything) (interface{}, *http.Response, error) { + +type ABitOfEverythingServiceUpdateV2Opts struct { + UpdateMaskPaths optional.Interface +} + +func (a *ABitOfEverythingServiceApiService) ABitOfEverythingServiceUpdateV2(ctx context.Context, abeUuid string, body ExamplepbABitOfEverything, localVarOptionals *ABitOfEverythingServiceUpdateV2Opts) (interface{}, *http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Put") localVarPostBody interface{} @@ -3120,6 +3437,9 @@ func (a *ABitOfEverythingServiceApiService) ABitOfEverythingServiceUpdateV2(ctx localVarQueryParams := url.Values{} localVarFormParams := url.Values{} + if localVarOptionals != nil && localVarOptionals.UpdateMaskPaths.IsSet() { + localVarQueryParams.Add("update_mask.paths", parameterToString(localVarOptionals.UpdateMaskPaths.Value(), "multi")) + } // to determine the Content-Type header localVarHttpContentTypes := []string{"application/json", "application/x-foo-mime"} @@ -3248,10 +3568,17 @@ ABitOfEverythingServiceApiService * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param abeUuid * @param body + * @param optional nil or *ABitOfEverythingServiceUpdateV22Opts - Optional Parameters: + * @param "UpdateMaskPaths" (optional.Interface of []string) - The set of field mask paths. @return interface{} */ -func (a *ABitOfEverythingServiceApiService) ABitOfEverythingServiceUpdateV22(ctx context.Context, abeUuid string, body ExamplepbABitOfEverything) (interface{}, *http.Response, error) { + +type ABitOfEverythingServiceUpdateV22Opts struct { + UpdateMaskPaths optional.Interface +} + +func (a *ABitOfEverythingServiceApiService) ABitOfEverythingServiceUpdateV22(ctx context.Context, abeUuid string, body ExamplepbABitOfEverything, localVarOptionals *ABitOfEverythingServiceUpdateV22Opts) (interface{}, *http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Patch") localVarPostBody interface{} @@ -3268,6 +3595,9 @@ func (a *ABitOfEverythingServiceApiService) ABitOfEverythingServiceUpdateV22(ctx localVarQueryParams := url.Values{} localVarFormParams := url.Values{} + if localVarOptionals != nil && localVarOptionals.UpdateMaskPaths.IsSet() { + localVarQueryParams.Add("update_mask.paths", parameterToString(localVarOptionals.UpdateMaskPaths.Value(), "multi")) + } // to determine the Content-Type header localVarHttpContentTypes := []string{"application/json", "application/x-foo-mime"} diff --git a/examples/internal/clients/abe/model_examplepb_book.go b/examples/internal/clients/abe/model_examplepb_book.go new file mode 100644 index 00000000000..90eb140f963 --- /dev/null +++ b/examples/internal/clients/abe/model_examplepb_book.go @@ -0,0 +1,25 @@ +/* + * A Bit of Everything + * + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * API version: 1.0 + * Contact: none@example.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package abe + +import ( + "time" +) + +// An example resource type from AIP-123 used to test the behavior described in the CreateBookRequest message. See: https://google.aip.dev/123 +type ExamplepbBook struct { + // The resource name of the book. Format: `publishers/{publisher}/books/{book}` Example: `publishers/1257894000000000000/books/my-book` + Name string `json:"name,omitempty"` + // Output only. The book's ID. + Id string `json:"id,omitempty"` + // Output only. Creation time of the book. + CreateTime time.Time `json:"create_time,omitempty"` +} diff --git a/examples/internal/proto/examplepb/a_bit_of_everything.pb.go b/examples/internal/proto/examplepb/a_bit_of_everything.pb.go index fbbf60c135d..421cbfb6153 100644 --- a/examples/internal/proto/examplepb/a_bit_of_everything.pb.go +++ b/examples/internal/proto/examplepb/a_bit_of_everything.pb.go @@ -802,6 +802,141 @@ func (m *UpdateV2Request) GetUpdateMask() *field_mask.FieldMask { return nil } +// An example resource type from AIP-123 used to test the behavior described in +// the CreateBookRequest message. +// +// See: https://google.aip.dev/123 +type Book struct { + // The resource name of the book. + // + // Format: `publishers/{publisher}/books/{book}` + // + // Example: `publishers/1257894000000000000/books/my-book` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Output only. The book's ID. + Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` + // Output only. Creation time of the book. + CreateTime *timestamp.Timestamp `protobuf:"bytes,3,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Book) Reset() { *m = Book{} } +func (m *Book) String() string { return proto.CompactTextString(m) } +func (*Book) ProtoMessage() {} +func (*Book) Descriptor() ([]byte, []int) { + return fileDescriptor_e6ccf6cab3ab66ab, []int{5} +} + +func (m *Book) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Book.Unmarshal(m, b) +} +func (m *Book) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Book.Marshal(b, m, deterministic) +} +func (m *Book) XXX_Merge(src proto.Message) { + xxx_messageInfo_Book.Merge(m, src) +} +func (m *Book) XXX_Size() int { + return xxx_messageInfo_Book.Size(m) +} +func (m *Book) XXX_DiscardUnknown() { + xxx_messageInfo_Book.DiscardUnknown(m) +} + +var xxx_messageInfo_Book proto.InternalMessageInfo + +func (m *Book) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *Book) GetId() string { + if m != nil { + return m.Id + } + return "" +} + +func (m *Book) GetCreateTime() *timestamp.Timestamp { + if m != nil { + return m.CreateTime + } + return nil +} + +// A standard Create message from AIP-133 with a user-specified ID. +// The user-specified ID (the `book_id` field in this example) must become a +// query parameter in the OpenAPI spec. +// +// See: https://google.aip.dev/133#user-specified-ids +type CreateBookRequest struct { + // The publisher in which to create the book. + // + // Format: `publishers/{publisher}` + // + // Example: `publishers/1257894000000000000` + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // The book to create. + Book *Book `protobuf:"bytes,2,opt,name=book,proto3" json:"book,omitempty"` + // The ID to use for the book. + // + // This must start with an alphanumeric character. + BookId string `protobuf:"bytes,3,opt,name=book_id,json=bookId,proto3" json:"book_id,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CreateBookRequest) Reset() { *m = CreateBookRequest{} } +func (m *CreateBookRequest) String() string { return proto.CompactTextString(m) } +func (*CreateBookRequest) ProtoMessage() {} +func (*CreateBookRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_e6ccf6cab3ab66ab, []int{6} +} + +func (m *CreateBookRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_CreateBookRequest.Unmarshal(m, b) +} +func (m *CreateBookRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_CreateBookRequest.Marshal(b, m, deterministic) +} +func (m *CreateBookRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_CreateBookRequest.Merge(m, src) +} +func (m *CreateBookRequest) XXX_Size() int { + return xxx_messageInfo_CreateBookRequest.Size(m) +} +func (m *CreateBookRequest) XXX_DiscardUnknown() { + xxx_messageInfo_CreateBookRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_CreateBookRequest proto.InternalMessageInfo + +func (m *CreateBookRequest) GetParent() string { + if m != nil { + return m.Parent + } + return "" +} + +func (m *CreateBookRequest) GetBook() *Book { + if m != nil { + return m.Book + } + return nil +} + +func (m *CreateBookRequest) GetBookId() string { + if m != nil { + return m.BookId + } + return "" +} + func init() { proto.RegisterEnum("grpc.gateway.examples.internal.examplepb.NumericEnum", NumericEnum_name, NumericEnum_value) proto.RegisterEnum("grpc.gateway.examples.internal.examplepb.ABitOfEverything_Nested_DeepEnum", ABitOfEverything_Nested_DeepEnum_name, ABitOfEverything_Nested_DeepEnum_value) @@ -814,6 +949,8 @@ func init() { proto.RegisterType((*Body)(nil), "grpc.gateway.examples.internal.examplepb.Body") proto.RegisterType((*MessageWithBody)(nil), "grpc.gateway.examples.internal.examplepb.MessageWithBody") proto.RegisterType((*UpdateV2Request)(nil), "grpc.gateway.examples.internal.examplepb.UpdateV2Request") + proto.RegisterType((*Book)(nil), "grpc.gateway.examples.internal.examplepb.Book") + proto.RegisterType((*CreateBookRequest)(nil), "grpc.gateway.examples.internal.examplepb.CreateBookRequest") } func init() { @@ -821,239 +958,246 @@ func init() { } var fileDescriptor_e6ccf6cab3ab66ab = []byte{ - // 3698 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x5a, 0x4b, 0x6c, 0x1b, 0x49, - 0x7a, 0x56, 0xb1, 0xa9, 0x57, 0xc9, 0x92, 0xa8, 0x92, 0x65, 0xcb, 0xb4, 0x66, 0x5c, 0xc3, 0xf1, - 0xce, 0xb6, 0xb9, 0x26, 0x5b, 0x6a, 0xc9, 0x33, 0x36, 0x67, 0x77, 0x67, 0x48, 0x49, 0xf6, 0xc8, - 0xf6, 0xc8, 0x76, 0x5b, 0xe3, 0x9d, 0xf1, 0x62, 0x56, 0x29, 0x92, 0x45, 0xb1, 0x2d, 0xf6, 0x63, - 0xbb, 0xab, 0x65, 0xd1, 0x0a, 0x91, 0x49, 0x90, 0x60, 0x83, 0x24, 0x40, 0x02, 0xe6, 0x85, 0x64, - 0x32, 0xb7, 0xe4, 0x12, 0xec, 0x21, 0x97, 0x9c, 0xf6, 0x90, 0x53, 0xb0, 0x87, 0xdc, 0x26, 0xc0, - 0x5e, 0x72, 0x0a, 0x12, 0xe4, 0x10, 0xe4, 0x16, 0x60, 0x80, 0x1c, 0x16, 0x08, 0xaa, 0xba, 0x9b, - 0xec, 0xe6, 0xc3, 0x92, 0x46, 0x5e, 0xcc, 0xfa, 0x60, 0x75, 0x55, 0xfd, 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0x64, 0xa0, 0x4d, 0xf9, 0x73, 0x3e, 0xc9, 0x15, 0x38, - 0xa5, 0x9b, 0xec, 0xed, 0xb5, 0x80, 0x62, 0x14, 0x03, 0x59, 0xd2, 0xa0, 0x98, 0xea, 0xc8, 0xf0, - 0xa2, 0x14, 0x63, 0x18, 0xc8, 0x49, 0x6d, 0xca, 0x8b, 0x90, 0xf8, 0x32, 0x56, 0xd5, 0x80, 0x62, - 0x1c, 0x03, 0x79, 0x54, 0xc8, 0x58, 0x55, 0x7d, 0x82, 0x37, 0xe1, 0x74, 0x4d, 0x3f, 0xa4, 0xd5, - 0x8e, 0x90, 0x09, 0x0c, 0xe4, 0x31, 0xed, 0x5c, 0x30, 0x19, 0x27, 0xea, 0xc8, 0x99, 0xc4, 0x40, - 0x1e, 0x0f, 0x88, 0x42, 0x49, 0xaf, 0x41, 0x58, 0xb6, 0xac, 0x46, 0x40, 0x01, 0x31, 0x90, 0x27, - 0xb4, 0x49, 0x3e, 0xd3, 0x01, 0xeb, 0x32, 0x47, 0x37, 0xf7, 0x02, 0x82, 0x29, 0xee, 0x09, 0xda, - 0x94, 0x3f, 0xd7, 0x01, 0x5b, 0x6e, 0x32, 0xea, 0x06, 0x14, 0xaf, 0x61, 0x20, 0x9f, 0xd3, 0xa0, - 0x98, 0x8a, 0x19, 0xdc, 0x81, 0x31, 0x8d, 0x81, 0x3c, 0xed, 0x1b, 0x1c, 0xa2, 0xd8, 0x81, 0x90, - 0xbf, 0x99, 0x01, 0xc1, 0x0c, 0x06, 0xf2, 0x8c, 0x7a, 0xe3, 0xe4, 0x2e, 0xb0, 0xed, 0x19, 0xd4, - 0xd1, 0x2b, 0x9b, 0xa6, 0x67, 0x68, 0x93, 0x5c, 0x90, 0x2f, 0xf5, 0x13, 0x38, 0xdb, 0x79, 0xe9, - 0x03, 0xd1, 0xaf, 0x0b, 0xd1, 0x2b, 0xc7, 0x89, 0x0e, 0x83, 0x46, 0xfe, 0x21, 0x61, 0x75, 0x21, - 0x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0x4e, 0xa6, 0xbb, 0x8c, 0x97, 0xef, 0x07, 0xbc, 0x6f, - 0xab, 0x59, 0x8e, 0x21, 0xdc, 0xb0, 0x7c, 0x05, 0x4e, 0x47, 0x0f, 0x66, 0xa4, 0xf7, 0xa2, 0xab, - 0x7c, 0x6d, 0xe8, 0x55, 0x57, 0x2f, 0xa9, 0xb3, 0x05, 0x2f, 0x7e, 0xd8, 0x0d, 0x9b, 0xd1, 0x60, - 0x70, 0xda, 0x20, 0xf0, 0xe2, 0x32, 0x44, 0x87, 0xb9, 0xe8, 0x0c, 0x7f, 0x5b, 0xd0, 0x68, 0x5a, - 0x2a, 0x13, 0xe7, 0x85, 0x0c, 0x2f, 0xf6, 0x2c, 0x96, 0xc9, 0x8b, 0x5c, 0x43, 0x77, 0x19, 0x9a, - 0x56, 0xa7, 0xe0, 0x68, 0x5a, 0xb2, 0x4c, 0x0a, 0x13, 0x18, 0x3c, 0x9d, 0xec, 0xb8, 0x63, 0x79, - 0x4c, 0xc4, 0xb3, 0xd5, 0xff, 0x0f, 0x00, 0x00, 0xff, 0xff, 0x52, 0x68, 0xc9, 0xfa, 0x00, 0x2f, - 0x00, 0x00, + // 3824 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x5a, 0x4d, 0x6c, 0x1b, 0x49, + 0x76, 0x56, 0xb1, 0xf5, 0x5b, 0xb2, 0x2c, 0xa9, 0x64, 0xd9, 0x32, 0xad, 0x19, 0xd7, 0xb4, 0xbd, + 0x3b, 0x6d, 0xae, 0x49, 0x4a, 0x2d, 0x79, 0xc6, 0xa6, 0x77, 0x76, 0x86, 0x94, 0x64, 0x8f, 0x6c, + 0x8f, 0x6c, 0xb7, 0x3d, 0xde, 0x19, 0x2f, 0x66, 0x95, 0x22, 0x59, 0x12, 0xdb, 0x62, 0x77, 0xf5, + 0x76, 0x57, 0xcb, 0xa2, 0x15, 0x22, 0x93, 0x20, 0xc9, 0x2e, 0x92, 0x00, 0x09, 0x94, 0x3f, 0x24, + 0x93, 0xb9, 0x25, 0x40, 0x10, 0xec, 0x21, 0x97, 0x9c, 0xf6, 0x90, 0x53, 0xb0, 0x87, 0xdc, 0x26, + 0xc0, 0xde, 0x83, 0x04, 0x39, 0x04, 0xb9, 0x05, 0x18, 0x20, 0x87, 0x05, 0x82, 0xaa, 0xee, 0x26, + 0xbb, 0xf9, 0x63, 0x49, 0x96, 0x17, 0xb3, 0x3e, 0x58, 0xac, 0xaa, 0xf7, 0xf3, 0xbd, 0x57, 0xaf, + 0xea, 0xbd, 0x57, 0x24, 0xbc, 0x49, 0xf7, 0x88, 0xe5, 0xd4, 0xa9, 0x97, 0x37, 0x6d, 0x4e, 0x5d, + 0x9b, 0xd4, 0xf3, 0x8e, 0xcb, 0x38, 0xcb, 0x87, 0xf3, 0x4e, 0x39, 0x4f, 0x36, 0xcb, 0x26, 0xdf, + 0x64, 0x5b, 0x9b, 0x74, 0x97, 0xba, 0x0d, 0x5e, 0x33, 0xed, 0xed, 0x9c, 0xa4, 0x41, 0xda, 0xb6, + 0xeb, 0x54, 0x72, 0xdb, 0x84, 0xd3, 0xe7, 0xa4, 0x91, 0x8b, 0x24, 0xe5, 0x22, 0x49, 0xb9, 0x96, + 0x8c, 0xf4, 0xfc, 0x36, 0x63, 0xdb, 0x75, 0x9a, 0x27, 0x8e, 0x99, 0x27, 0xb6, 0xcd, 0x38, 0xe1, + 0x26, 0xb3, 0xbd, 0x40, 0x4e, 0x1a, 0x87, 0xab, 0x72, 0x54, 0xf6, 0xb7, 0xf2, 0x5b, 0x26, 0xad, + 0x57, 0x37, 0x2d, 0xe2, 0xed, 0x84, 0x14, 0x17, 0x3a, 0x29, 0xa8, 0xe5, 0xf0, 0x46, 0xb8, 0xf8, + 0x66, 0xe7, 0x62, 0xd5, 0x77, 0xa5, 0xfc, 0x7e, 0xeb, 0xcf, 0x5d, 0xe2, 0x38, 0xd4, 0x8d, 0xd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 0x84, 0x6f, 0xee, 0x92, 0xba, 0x4f, 0xe7, 0x14, 0x0c, 0xb4, 0x54, + 0xe9, 0xca, 0x41, 0xf1, 0xdb, 0xfa, 0xf4, 0x2d, 0x31, 0x8f, 0xe5, 0x3c, 0x96, 0xe1, 0x5a, 0x50, + 0x16, 0x72, 0xfa, 0x57, 0x20, 0xce, 0x60, 0x40, 0x39, 0x78, 0x22, 0x3e, 0xa3, 0xb7, 0xe0, 0xa9, + 0x2a, 0xf3, 0xcb, 0x75, 0x1a, 0x0a, 0x1b, 0xc4, 0x40, 0x03, 0xc6, 0x78, 0x30, 0x17, 0x90, 0x5c, + 0x84, 0xe3, 0xa6, 0xcd, 0xdf, 0x59, 0x0e, 0x29, 0x86, 0x30, 0xd0, 0x14, 0x03, 0xca, 0xa9, 0x96, + 0x0c, 0x3f, 0x4e, 0x31, 0x8c, 0x81, 0x36, 0x68, 0x8c, 0xfb, 0x31, 0x92, 0x40, 0xc6, 0x92, 0x1e, + 0x52, 0x8c, 0x60, 0xa0, 0x0d, 0x49, 0x19, 0x4b, 0x7a, 0x40, 0x70, 0x09, 0x4e, 0x6c, 0x99, 0x7b, + 0xb4, 0xda, 0x12, 0x32, 0x8a, 0x81, 0x36, 0x6c, 0x9c, 0x0a, 0x27, 0x93, 0x44, 0x2d, 0x39, 0x63, + 0x18, 0x68, 0x23, 0x21, 0x51, 0x24, 0xe9, 0x0d, 0x08, 0xcb, 0x8c, 0xd5, 0x43, 0x0a, 0x88, 0x81, + 0x36, 0x6a, 0x8c, 0x89, 0x99, 0x16, 0x58, 0x8f, 0xbb, 0xa6, 0xbd, 0x1d, 0x12, 0x8c, 0x8b, 0x48, + 0x30, 0xc6, 0x83, 0xb9, 0x16, 0xd8, 0x72, 0x83, 0x53, 0x2f, 0xa4, 0x78, 0x03, 0x03, 0xed, 0x94, + 0x01, 0xe5, 0x54, 0xc2, 0xe0, 0x16, 0x8c, 0x09, 0x0c, 0xb4, 0x89, 0xc0, 0xe0, 0x08,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62, 0xf5, 0xc3, 0x01, 0x03, 0x4a, 0x62, 0x39, 0x42, 0x97, 0xe0, + 0xa9, 0x80, 0x35, 0xd0, 0x35, 0x37, 0x2b, 0x02, 0xf3, 0xc3, 0x01, 0x23, 0x10, 0x18, 0x28, 0x41, + 0x14, 0x8e, 0x59, 0xc4, 0x09, 0x71, 0x9c, 0x95, 0x17, 0xcb, 0x87, 0x27, 0xb8, 0x58, 0x3e, 0x22, + 0x8e, 0xc4, 0xbd, 0x66, 0x73, 0xb7, 0x61, 0x8c, 0x5a, 0xe1, 0x10, 0xfd, 0x36, 0x80, 0x33, 0x96, + 0xc8, 0x46, 0x1d, 0x96, 0x9f, 0x93, 0x1a, 0x1f, 0x9e, 0x4c, 0xa3, 0x93, 0x70, 0x59, 0xa0, 0x7a, + 0xda, 0xea, 0x9c, 0x8f, 0x63, 0x08, 0x03, 0x33, 0xc0, 0x30, 0xf7, 0x9a, 0x30, 0x04, 0x61, 0xd9, + 0x8d, 0x21, 0x36, 0x8f, 0x0a, 0x70, 0xce, 0x66, 0xf6, 0x0a, 0xb3, 0x77, 0xa9, 0x2d, 0x72, 0x18, + 0xa9, 0x6f, 0x10, 0x2b, 0xb8, 0x16, 0xe7, 0xd2, 0xf2, 0xe2, 0xe8, 0xbb, 0x8e, 0x56, 0xe0, 0x64, + 0x2b, 0x51, 0x86, 0xd0, 0x2f, 0xc8, 0x70, 0x48, 0x77, 0x85, 0xc3, 0xe3, 0x88, 0xce, 0x38, 0xdd, + 0x62, 0x09, 0x84, 0x50, 0xd8, 0x0a, 0xb3, 0xf8, 0x91, 0x9c, 0xc7, 0xca, 0xab, 0xdf, 0x27, 0xd3, + 0x91, 0xc4, 0xf6, 0xf1, 0xfb, 0x27, 0x00, 0xe7, 0x92, 0x7a, 0xda, 0x79, 0x7b, 0x0e, 0x9f, 0x40, + 0x59, 0x69, 0xf5, 0xa0, 0x58, 0xcc, 0x5c, 0x30, 0x42, 0xd9, 0xd8, 0x0e, 0x96, 0xb0,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 0x45, 0xf9, 0xbe, 0x2b, 0xfa, 0xb6, 0x2d, 0xe6, + 0x5a, 0x32, 0x0c, 0xcb, 0x17, 0xe1, 0x44, 0x7c, 0x63, 0x06, 0x3a, 0x1f, 0xba, 0xca, 0x57, 0xfa, + 0x3e, 0x75, 0x75, 0x92, 0xba, 0xeb, 0xf0, 0xdc, 0x47, 0xed, 0x6b, 0x33, 0x7e, 0x19, 0x1c, 0xf7, + 0x12, 0x78, 0x71, 0x01, 0xa2, 0xbd, 0x6c, 0x7c, 0x46, 0x9c, 0x16, 0x34, 0x94, 0x56, 0xca, 0xc4, + 0x7d, 0xa1, 0xc1, 0x73, 0x1d, 0x8b, 0x65, 0xf2, 0x22, 0x5b, 0x37, 0x3d, 0x8e, 0x26, 0xf4, 0x71, + 0x38, 0x94, 0x56, 0x98, 0x4d, 0x61, 0x0a, 0x83, 0xa7, 0x63, 0xad, 0x70, 0x2c, 0x0f, 0xcb, 0xfb, + 0x6c, 0xe9, 0xff, 0x03, 0x00, 0x00, 0xff, 0xff, 0x32, 0x1a, 0x05, 0x73, 0x9f, 0x30, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1073,6 +1217,8 @@ type ABitOfEverythingServiceClient interface { // This API creates a new ABitOfEverything Create(ctx context.Context, in *ABitOfEverything, opts ...grpc.CallOption) (*ABitOfEverything, error) CreateBody(ctx context.Context, in *ABitOfEverything, opts ...grpc.CallOption) (*ABitOfEverything, error) + // Create a book. + CreateBook(ctx context.Context, in *CreateBookRequest, opts ...grpc.CallOption) (*Book, error) Lookup(ctx context.Context, in *sub2.IdMessage, opts ...grpc.CallOption) (*ABitOfEverything, error) Update(ctx context.Context, in *ABitOfEverything, opts ...grpc.CallOption) (*empty.Empty, error) UpdateV2(ctx context.Context, in *UpdateV2Request, opts ...grpc.CallOption) (*empty.Empty, error) @@ -1127,6 +1273,15 @@ func (c *aBitOfEverythingServiceClient) CreateBody(ctx context.Context, in *ABit return out, nil } +func (c *aBitOfEverythingServiceClient) CreateBook(ctx context.Context, in *CreateBookRequest, opts ...grpc.CallOption) (*Book, error) { + out := new(Book) + err := c.cc.Invoke(ctx, "/grpc.gateway.examples.internal.examplepb.ABitOfEverythingService/CreateBook", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *aBitOfEverythingServiceClient) Lookup(ctx context.Context, in *sub2.IdMessage, opts ...grpc.CallOption) (*ABitOfEverything, error) { out := new(ABitOfEverything) err := c.cc.Invoke(ctx, "/grpc.gateway.examples.internal.examplepb.ABitOfEverythingService/Lookup", in, out, opts...) @@ -1305,6 +1460,8 @@ type ABitOfEverythingServiceServer interface { // This API creates a new ABitOfEverything Create(context.Context, *ABitOfEverything) (*ABitOfEverything, error) CreateBody(context.Context, *ABitOfEverything) (*ABitOfEverything, error) + // Create a book. + CreateBook(context.Context, *CreateBookRequest) (*Book, error) Lookup(context.Context, *sub2.IdMessage) (*ABitOfEverything, error) Update(context.Context, *ABitOfEverything) (*empty.Empty, error) UpdateV2(context.Context, *UpdateV2Request) (*empty.Empty, error) @@ -1343,6 +1500,9 @@ func (*UnimplementedABitOfEverythingServiceServer) Create(ctx context.Context, r func (*UnimplementedABitOfEverythingServiceServer) CreateBody(ctx context.Context, req *ABitOfEverything) (*ABitOfEverything, error) { return nil, status.Errorf(codes.Unimplemented, "method CreateBody not implemented") } +func (*UnimplementedABitOfEverythingServiceServer) CreateBook(ctx context.Context, req *CreateBookRequest) (*Book, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateBook not implemented") +} func (*UnimplementedABitOfEverythingServiceServer) Lookup(ctx context.Context, req *sub2.IdMessage) (*ABitOfEverything, error) { return nil, status.Errorf(codes.Unimplemented, "method Lookup not implemented") } @@ -1441,6 +1601,24 @@ func _ABitOfEverythingService_CreateBody_Handler(srv interface{}, ctx context.Co return interceptor(ctx, in, info, handler) } +func _ABitOfEverythingService_CreateBook_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateBookRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ABitOfEverythingServiceServer).CreateBook(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/grpc.gateway.examples.internal.examplepb.ABitOfEverythingService/CreateBook", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ABitOfEverythingServiceServer).CreateBook(ctx, req.(*CreateBookRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _ABitOfEverythingService_Lookup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(sub2.IdMessage) if err := dec(in); err != nil { @@ -1795,6 +1973,10 @@ var _ABitOfEverythingService_serviceDesc = grpc.ServiceDesc{ MethodName: "CreateBody", Handler: _ABitOfEverythingService_CreateBody_Handler, }, + { + MethodName: "CreateBook", + Handler: _ABitOfEverythingService_CreateBook_Handler, + }, { MethodName: "Lookup", Handler: _ABitOfEverythingService_Lookup_Handler, diff --git a/examples/internal/proto/examplepb/a_bit_of_everything.pb.gw.go b/examples/internal/proto/examplepb/a_bit_of_everything.pb.gw.go index b601977c90a..cf6c7bcbe45 100644 --- a/examples/internal/proto/examplepb/a_bit_of_everything.pb.gw.go +++ b/examples/internal/proto/examplepb/a_bit_of_everything.pb.gw.go @@ -555,6 +555,94 @@ func local_request_ABitOfEverythingService_CreateBody_0(ctx context.Context, mar } +var ( + filter_ABitOfEverythingService_CreateBook_0 = &utilities.DoubleArray{Encoding: map[string]int{"book": 0, "parent": 1}, Base: []int{1, 1, 2, 0, 0}, Check: []int{0, 1, 1, 2, 3}} +) + +func request_ABitOfEverythingService_CreateBook_0(ctx context.Context, marshaler runtime.Marshaler, client ABitOfEverythingServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq CreateBookRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Book); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["parent"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "parent") + } + + protoReq.Parent, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "parent", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_ABitOfEverythingService_CreateBook_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.CreateBook(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_ABitOfEverythingService_CreateBook_0(ctx context.Context, marshaler runtime.Marshaler, server ABitOfEverythingServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq CreateBookRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Book); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["parent"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "parent") + } + + protoReq.Parent, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "parent", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_ABitOfEverythingService_CreateBook_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.CreateBook(ctx, &protoReq) + return msg, metadata, err + +} + func request_ABitOfEverythingService_Lookup_0(ctx context.Context, marshaler runtime.Marshaler, client ABitOfEverythingServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq sub2.IdMessage var metadata runtime.ServerMetadata @@ -2279,6 +2367,26 @@ func RegisterABitOfEverythingServiceHandlerServer(ctx context.Context, mux *runt }) + mux.Handle("POST", pattern_ABitOfEverythingService_CreateBook_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_ABitOfEverythingService_CreateBook_0(rctx, inboundMarshaler, server, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_ABitOfEverythingService_CreateBook_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("GET", pattern_ABitOfEverythingService_Lookup_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -2829,6 +2937,26 @@ func RegisterABitOfEverythingServiceHandlerClient(ctx context.Context, mux *runt }) + mux.Handle("POST", pattern_ABitOfEverythingService_CreateBook_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_ABitOfEverythingService_CreateBook_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_ABitOfEverythingService_CreateBook_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("GET", pattern_ABitOfEverythingService_Lookup_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -3277,6 +3405,8 @@ var ( pattern_ABitOfEverythingService_CreateBody_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "example", "a_bit_of_everything"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_ABitOfEverythingService_CreateBook_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 2, 5, 2, 2, 3}, []string{"v1", "publishers", "parent", "books"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_ABitOfEverythingService_Lookup_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"v1", "example", "a_bit_of_everything", "uuid"}, "", runtime.AssumeColonVerbOpt(true))) pattern_ABitOfEverythingService_Update_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"v1", "example", "a_bit_of_everything", "uuid"}, "", runtime.AssumeColonVerbOpt(true))) @@ -3327,6 +3457,8 @@ var ( forward_ABitOfEverythingService_CreateBody_0 = runtime.ForwardResponseMessage + forward_ABitOfEverythingService_CreateBook_0 = runtime.ForwardResponseMessage + forward_ABitOfEverythingService_Lookup_0 = runtime.ForwardResponseMessage forward_ABitOfEverythingService_Update_0 = runtime.ForwardResponseMessage diff --git a/examples/internal/proto/examplepb/a_bit_of_everything.proto b/examples/internal/proto/examplepb/a_bit_of_everything.proto index d4684b63a87..6fdb2ff86c3 100644 --- a/examples/internal/proto/examplepb/a_bit_of_everything.proto +++ b/examples/internal/proto/examplepb/a_bit_of_everything.proto @@ -322,6 +322,47 @@ message UpdateV2Request { google.protobuf.FieldMask update_mask = 2; } +// An example resource type from AIP-123 used to test the behavior described in +// the CreateBookRequest message. +// +// See: https://google.aip.dev/123 +message Book { + // The resource name of the book. + // + // Format: `publishers/{publisher}/books/{book}` + // + // Example: `publishers/1257894000000000000/books/my-book` + string name = 1; + + // Output only. The book's ID. + string id = 2; + + // Output only. Creation time of the book. + google.protobuf.Timestamp create_time = 3; +} + +// A standard Create message from AIP-133 with a user-specified ID. +// The user-specified ID (the `book_id` field in this example) must become a +// query parameter in the OpenAPI spec. +// +// See: https://google.aip.dev/133#user-specified-ids +message CreateBookRequest { + // The publisher in which to create the book. + // + // Format: `publishers/{publisher}` + // + // Example: `publishers/1257894000000000000` + string parent = 1; + + // The book to create. + Book book = 2; + + // The ID to use for the book. + // + // This must start with an alphanumeric character. + string book_id = 3; +} + // ABitOfEverything service is used to validate that APIs with complicated // proto messages and URL templates are still processed correctly. service ABitOfEverythingService { @@ -348,6 +389,13 @@ service ABitOfEverythingService { body: "*" }; } + // Create a book. + rpc CreateBook(CreateBookRequest) returns (Book) { + option (google.api.http) = { + post: "/v1/{parent=publishers/*}/books" + body: "book" + }; + } rpc Lookup(sub2.IdMessage) returns (ABitOfEverything) { option (google.api.http) = { get: "/v1/example/a_bit_of_everything/{uuid}" diff --git a/examples/internal/proto/examplepb/a_bit_of_everything.swagger.json b/examples/internal/proto/examplepb/a_bit_of_everything.swagger.json index 2fdc89a5deb..c135ba82c7c 100644 --- a/examples/internal/proto/examplepb/a_bit_of_everything.swagger.json +++ b/examples/internal/proto/examplepb/a_bit_of_everything.swagger.json @@ -824,6 +824,261 @@ "schema": { "$ref": "#/definitions/ABitOfEverythingNested" } + }, + { + "name": "uuid", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "float_value", + "description": "Float value field", + "in": "query", + "required": true, + "type": "number", + "format": "float", + "default": "0.2" + }, + { + "name": "double_value", + "in": "query", + "required": false, + "type": "number", + "format": "double" + }, + { + "name": "int64_value", + "in": "query", + "required": false, + "type": "string", + "format": "int64" + }, + { + "name": "uint64_value", + "in": "query", + "required": false, + "type": "string", + "format": "uint64" + }, + { + "name": "int32_value", + "in": "query", + "required": false, + "type": "integer", + "format": "int32" + }, + { + "name": "fixed64_value", + "in": "query", + "required": false, + "type": "string", + "format": "uint64" + }, + { + "name": "fixed32_value", + "in": "query", + "required": false, + "type": "integer", + "format": "int64" + }, + { + "name": "bool_value", + "in": "query", + "required": false, + "type": "boolean", + "format": "boolean" + }, + { + "name": "bytes_value", + "in": "query", + "required": false, + "type": "string", + "format": "byte" + }, + { + "name": "uint32_value", + "in": "query", + "required": false, + "type": "integer", + "format": "int64" + }, + { + "name": "enum_value", + "description": " - ZERO: ZERO means 0\n - ONE: ONE means 1", + "in": "query", + "required": false, + "type": "string", + "enum": [ + "ZERO", + "ONE" + ], + "default": "ZERO" + }, + { + "name": "path_enum_value", + "in": "query", + "required": false, + "type": "string", + "enum": [ + "ABC", + "DEF" + ], + "default": "ABC" + }, + { + "name": "nested_path_enum_value", + "in": "query", + "required": false, + "type": "string", + "enum": [ + "GHI", + "JKL" + ], + "default": "GHI" + }, + { + "name": "sfixed32_value", + "in": "query", + "required": false, + "type": "integer", + "format": "int32" + }, + { + "name": "sfixed64_value", + "in": "query", + "required": false, + "type": "string", + "format": "int64" + }, + { + "name": "sint32_value", + "in": "query", + "required": false, + "type": "integer", + "format": "int32" + }, + { + "name": "sint64_value", + "in": "query", + "required": false, + "type": "string", + "format": "int64" + }, + { + "name": "repeated_string_value", + "in": "query", + "required": false, + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "multi" + }, + { + "name": "oneof_string", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "nonConventionalNameValue", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "timestamp_value", + "in": "query", + "required": false, + "type": "string", + "format": "date-time" + }, + { + "name": "repeated_enum_value", + "description": "repeated enum value. it is comma-separated in query.\n\n - ZERO: ZERO means 0\n - ONE: ONE means 1", + "in": "query", + "required": false, + "type": "array", + "items": { + "type": "string", + "enum": [ + "ZERO", + "ONE" + ] + }, + "collectionFormat": "multi" + }, + { + "name": "repeated_enum_annotation", + "description": "Repeated numeric enum title. Repeated numeric enum description.\n\n - ZERO: ZERO means 0\n - ONE: ONE means 1", + "in": "query", + "required": false, + "type": "array", + "items": { + "type": "string", + "enum": [ + "ZERO", + "ONE" + ] + }, + "collectionFormat": "multi" + }, + { + "name": "enum_value_annotation", + "description": "Numeric enum title. Numeric enum description.\n\n - ZERO: ZERO means 0\n - ONE: ONE means 1", + "in": "query", + "required": false, + "type": "string", + "enum": [ + "ZERO", + "ONE" + ], + "default": "ZERO" + }, + { + "name": "repeated_string_annotation", + "description": "Repeated string title. Repeated string description.", + "in": "query", + "required": false, + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "multi" + }, + { + "name": "nested_annotation.name", + "description": "name is nested field.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "nested_annotation.amount", + "in": "query", + "required": false, + "type": "integer", + "format": "int64" + }, + { + "name": "nested_annotation.ok", + "description": "DeepEnum description.\n\n - FALSE: FALSE is false.\n - TRUE: TRUE is true.", + "in": "query", + "required": false, + "type": "string", + "enum": [ + "FALSE", + "TRUE" + ], + "default": "FALSE" + }, + { + "name": "int64_override_type", + "in": "query", + "required": false, + "type": "integer", + "format": "int64" } ], "tags": [ @@ -1801,6 +2056,71 @@ ] } }, + "/v1/{parent=publishers/*}/books": { + "post": { + "summary": "Create a book.", + "operationId": "ABitOfEverythingService_CreateBook", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/examplepbBook" + } + }, + "403": { + "description": "Returned when the user does not have permission to access the resource.", + "schema": {} + }, + "404": { + "description": "Returned when the resource does not exist.", + "schema": { + "type": "string", + "format": "string" + } + }, + "418": { + "description": "I'm a teapot.", + "schema": { + "$ref": "#/definitions/examplepbNumericEnum" + } + }, + "default": { + "description": "An unexpected error response", + "schema": { + "$ref": "#/definitions/runtimeError" + } + } + }, + "parameters": [ + { + "name": "parent", + "description": "The publisher in which to create the book.\n\nFormat: `publishers/{publisher}`\n\nExample: `publishers/1257894000000000000`", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "body", + "description": "The book to create.", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/examplepbBook" + } + }, + { + "name": "book_id", + "description": "The ID to use for the book.\n\nThis must start with an alphanumeric character.", + "in": "query", + "required": false, + "type": "string" + } + ], + "tags": [ + "ABitOfEverythingService" + ] + } + }, "/v2/example/a_bit_of_everything/{abe.uuid}": { "put": { "operationId": "ABitOfEverythingService_UpdateV2", @@ -1849,6 +2169,17 @@ "schema": { "$ref": "#/definitions/examplepbABitOfEverything" } + }, + { + "name": "update_mask.paths", + "description": "The set of field mask paths.", + "in": "query", + "required": false, + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "multi" } ], "tags": [ @@ -1902,6 +2233,17 @@ "schema": { "$ref": "#/definitions/examplepbABitOfEverything" } + }, + { + "name": "update_mask.paths", + "description": "The set of field mask paths.", + "in": "query", + "required": false, + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "multi" } ], "tags": [ @@ -2776,6 +3118,27 @@ } } }, + "examplepbBook": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The resource name of the book.\n\nFormat: `publishers/{publisher}/books/{book}`\n\nExample: `publishers/1257894000000000000/books/my-book`" + }, + "id": { + "type": "string", + "description": "Output only. The book's ID.", + "readOnly": true + }, + "create_time": { + "type": "string", + "format": "date-time", + "description": "Output only. Creation time of the book.", + "readOnly": true + } + }, + "description": "An example resource type from AIP-123 used to test the behavior described in\nthe CreateBookRequest message.\n\nSee: https://google.aip.dev/123" + }, "examplepbNumericEnum": { "type": "string", "enum": [ diff --git a/examples/internal/server/a_bit_of_everything.go b/examples/internal/server/a_bit_of_everything.go index e20ebdea9a1..382c68479a2 100644 --- a/examples/internal/server/a_bit_of_everything.go +++ b/examples/internal/server/a_bit_of_everything.go @@ -65,6 +65,10 @@ func (s *_ABitOfEverythingServer) CreateBody(ctx context.Context, msg *examples. return s.Create(ctx, msg) } +func (s *_ABitOfEverythingServer) CreateBook(ctx context.Context, req *examples.CreateBookRequest) (*examples.Book, error) { + return &examples.Book{}, nil +} + func (s *_ABitOfEverythingServer) BulkCreate(stream examples.StreamService_BulkCreateServer) error { ctx := stream.Context() diff --git a/protoc-gen-swagger/genswagger/template.go b/protoc-gen-swagger/genswagger/template.go index 23a052e745d..9463457407a 100644 --- a/protoc-gen-swagger/genswagger/template.go +++ b/protoc-gen-swagger/genswagger/template.go @@ -64,7 +64,7 @@ var wktSchemas = map[string]schemaCore{ Format: "double", }, ".google.protobuf.BoolValue": schemaCore{ - Type: "boolean", + Type: "boolean", }, ".google.protobuf.Empty": schemaCore{}, ".google.protobuf.Struct": schemaCore{ @@ -108,9 +108,9 @@ func getEnumDefault(enum *descriptor.Enum) string { } // messageToQueryParameters converts a message to a list of swagger query parameters. -func messageToQueryParameters(message *descriptor.Message, reg *descriptor.Registry, pathParams []descriptor.Parameter) (params []swaggerParameterObject, err error) { +func messageToQueryParameters(message *descriptor.Message, reg *descriptor.Registry, pathParams []descriptor.Parameter, body *descriptor.Body) (params []swaggerParameterObject, err error) { for _, field := range message.Fields { - p, err := queryParams(message, field, "", reg, pathParams) + p, err := queryParams(message, field, "", reg, pathParams, body) if err != nil { return nil, err } @@ -120,8 +120,8 @@ func messageToQueryParameters(message *descriptor.Message, reg *descriptor.Regis } // queryParams converts a field to a list of swagger query parameters recursively through the use of nestedQueryParams. -func queryParams(message *descriptor.Message, field *descriptor.Field, prefix string, reg *descriptor.Registry, pathParams []descriptor.Parameter) (params []swaggerParameterObject, err error) { - return nestedQueryParams(message, field, prefix, reg, pathParams, map[string]bool{}) +func queryParams(message *descriptor.Message, field *descriptor.Field, prefix string, reg *descriptor.Registry, pathParams []descriptor.Parameter, body *descriptor.Body) (params []swaggerParameterObject, err error) { + return nestedQueryParams(message, field, prefix, reg, pathParams, body, map[string]bool{}) } // nestedQueryParams converts a field to a list of swagger query parameters recursively. @@ -130,13 +130,24 @@ func queryParams(message *descriptor.Message, field *descriptor.Field, prefix st // touched map[string]bool // If a cycle is discovered, an error is returned, as cyclical data structures aren't allowed // in query parameters. -func nestedQueryParams(message *descriptor.Message, field *descriptor.Field, prefix string, reg *descriptor.Registry, pathParams []descriptor.Parameter, touchedIn map[string]bool) (params []swaggerParameterObject, err error) { +func nestedQueryParams(message *descriptor.Message, field *descriptor.Field, prefix string, reg *descriptor.Registry, pathParams []descriptor.Parameter, body *descriptor.Body, touchedIn map[string]bool) (params []swaggerParameterObject, err error) { // make sure the parameter is not already listed as a path parameter for _, pathParam := range pathParams { if pathParam.Target == field { return nil, nil } } + // make sure the parameter is not already listed as a body parameter + if body != nil { + if body.FieldPath == nil { + return nil, nil + } + for _, fieldPath := range body.FieldPath { + if fieldPath.Target == field { + return nil, nil + } + } + } schema := schemaOfField(field, reg, nil) fieldType := field.GetTypeName() if message.File != nil { @@ -248,7 +259,7 @@ func nestedQueryParams(message *descriptor.Message, field *descriptor.Field, pre } else { fieldName = field.GetName() } - p, err := nestedQueryParams(msg, nestedField, prefix+fieldName+".", reg, pathParams, touchedOut) + p, err := nestedQueryParams(msg, nestedField, prefix+fieldName+".", reg, pathParams, body, touchedOut) if err != nil { return nil, err } @@ -898,9 +909,15 @@ func renderServices(services []*descriptor.Service, paths swaggerPathsObject, re Required: true, Schema: &schema, }) + // add the parameters to the query string + queryParams, err := messageToQueryParameters(meth.RequestType, reg, b.PathParams, b.Body) + if err != nil { + return err + } + parameters = append(parameters, queryParams...) } else if b.HTTPMethod == "GET" || b.HTTPMethod == "DELETE" { // add the parameters to the query string - queryParams, err := messageToQueryParameters(meth.RequestType, reg, b.PathParams) + queryParams, err := messageToQueryParameters(meth.RequestType, reg, b.PathParams, b.Body) if err != nil { return err } diff --git a/protoc-gen-swagger/genswagger/template_test.go b/protoc-gen-swagger/genswagger/template_test.go index 356fd05a618..cf4fe573566 100644 --- a/protoc-gen-swagger/genswagger/template_test.go +++ b/protoc-gen-swagger/genswagger/template_test.go @@ -213,7 +213,7 @@ func TestMessageToQueryParametersWithEnumAsInt(t *testing.T) { if err != nil { t.Fatalf("failed to lookup message: %s", err) } - params, err := messageToQueryParameters(message, reg, []descriptor.Parameter{}) + params, err := messageToQueryParameters(message, reg, []descriptor.Parameter{}, nil) if err != nil { t.Fatalf("failed to convert message to query parameters: %s", err) } @@ -393,7 +393,7 @@ func TestMessageToQueryParameters(t *testing.T) { if err != nil { t.Fatalf("failed to lookup message: %s", err) } - params, err := messageToQueryParameters(message, reg, []descriptor.Parameter{}) + params, err := messageToQueryParameters(message, reg, []descriptor.Parameter{}, nil) if err != nil { t.Fatalf("failed to convert message to query parameters: %s", err) } @@ -513,7 +513,7 @@ func TestMessageToQueryParametersNoRecursive(t *testing.T) { t.Fatalf("failed to lookup message: %s", err) } - _, err = messageToQueryParameters(message, reg, []descriptor.Parameter{}) + _, err = messageToQueryParameters(message, reg, []descriptor.Parameter{}, nil) if err != nil { t.Fatalf("No recursion error should be thrown: %s", err) } @@ -530,70 +530,70 @@ func TestMessageToQueryParametersRecursive(t *testing.T) { } tests := []test{ - // First test: - // Here we test that a message that references it self through a field will return an error. - // Example proto: - // message DirectRecursiveMessage { - // DirectRecursiveMessage nested = 1; - // } + // First test: + // Here we test that a message that references it self through a field will return an error. + // Example proto: + // message DirectRecursiveMessage { + // DirectRecursiveMessage nested = 1; + // } { MsgDescs: []*protodescriptor.DescriptorProto{ &protodescriptor.DescriptorProto{ Name: proto.String("DirectRecursiveMessage"), Field: []*protodescriptor.FieldDescriptorProto{ - { - Name: proto.String("nested"), - Label: protodescriptor.FieldDescriptorProto_LABEL_OPTIONAL.Enum(), - Type: protodescriptor.FieldDescriptorProto_TYPE_MESSAGE.Enum(), - TypeName: proto.String(".example.DirectRecursiveMessage"), - Number: proto.Int32(1), + { + Name: proto.String("nested"), + Label: protodescriptor.FieldDescriptorProto_LABEL_OPTIONAL.Enum(), + Type: protodescriptor.FieldDescriptorProto_TYPE_MESSAGE.Enum(), + TypeName: proto.String(".example.DirectRecursiveMessage"), + Number: proto.Int32(1), }, }, }, }, Message: "DirectRecursiveMessage", }, - // Second test: - // Here we test that a cycle through multiple messages is detected and that an error is returned. - // Sample: - // message Root { NodeMessage nested = 1; } - // message NodeMessage { CycleMessage nested = 1; } - // message CycleMessage { Root nested = 1; } + // Second test: + // Here we test that a cycle through multiple messages is detected and that an error is returned. + // Sample: + // message Root { NodeMessage nested = 1; } + // message NodeMessage { CycleMessage nested = 1; } + // message CycleMessage { Root nested = 1; } { MsgDescs: []*protodescriptor.DescriptorProto{ &protodescriptor.DescriptorProto{ Name: proto.String("RootMessage"), Field: []*protodescriptor.FieldDescriptorProto{ - { - Name: proto.String("nested"), - Label: protodescriptor.FieldDescriptorProto_LABEL_OPTIONAL.Enum(), - Type: protodescriptor.FieldDescriptorProto_TYPE_MESSAGE.Enum(), - TypeName: proto.String(".example.NodeMessage"), - Number: proto.Int32(1), + { + Name: proto.String("nested"), + Label: protodescriptor.FieldDescriptorProto_LABEL_OPTIONAL.Enum(), + Type: protodescriptor.FieldDescriptorProto_TYPE_MESSAGE.Enum(), + TypeName: proto.String(".example.NodeMessage"), + Number: proto.Int32(1), }, }, }, &protodescriptor.DescriptorProto{ Name: proto.String("NodeMessage"), Field: []*protodescriptor.FieldDescriptorProto{ - { - Name: proto.String("nested"), - Label: protodescriptor.FieldDescriptorProto_LABEL_OPTIONAL.Enum(), - Type: protodescriptor.FieldDescriptorProto_TYPE_MESSAGE.Enum(), - TypeName: proto.String(".example.CycleMessage"), - Number: proto.Int32(1), + { + Name: proto.String("nested"), + Label: protodescriptor.FieldDescriptorProto_LABEL_OPTIONAL.Enum(), + Type: protodescriptor.FieldDescriptorProto_TYPE_MESSAGE.Enum(), + TypeName: proto.String(".example.CycleMessage"), + Number: proto.Int32(1), }, }, }, &protodescriptor.DescriptorProto{ Name: proto.String("CycleMessage"), Field: []*protodescriptor.FieldDescriptorProto{ - { - Name: proto.String("nested"), - Label: protodescriptor.FieldDescriptorProto_LABEL_OPTIONAL.Enum(), - Type: protodescriptor.FieldDescriptorProto_TYPE_MESSAGE.Enum(), - TypeName: proto.String(".example.RootMessage"), - Number: proto.Int32(1), + { + Name: proto.String("nested"), + Label: protodescriptor.FieldDescriptorProto_LABEL_OPTIONAL.Enum(), + Type: protodescriptor.FieldDescriptorProto_TYPE_MESSAGE.Enum(), + TypeName: proto.String(".example.RootMessage"), + Number: proto.Int32(1), }, }, }, @@ -631,7 +631,7 @@ func TestMessageToQueryParametersRecursive(t *testing.T) { if err != nil { t.Fatalf("failed to lookup message: %s", err) } - _, err = messageToQueryParameters(message, reg, []descriptor.Parameter{}) + _, err = messageToQueryParameters(message, reg, []descriptor.Parameter{}, nil) if err == nil { t.Fatalf("It should not be allowed to have recursive query parameters") } @@ -738,7 +738,7 @@ func TestMessageToQueryParametersWithJsonName(t *testing.T) { if err != nil { t.Fatalf("failed to lookup message: %s", err) } - params, err := messageToQueryParameters(message, reg, []descriptor.Parameter{}) + params, err := messageToQueryParameters(message, reg, []descriptor.Parameter{}, nil) if err != nil { t.Fatalf("failed to convert message to query parameters: %s", err) } @@ -1648,6 +1648,177 @@ func TestApplyTemplateRequestWithUnusedReferences(t *testing.T) { } } +func TestApplyTemplateRequestWithBodyQueryParameters(t *testing.T) { + bookDesc := &protodescriptor.DescriptorProto{ + Name: proto.String("Book"), + Field: []*protodescriptor.FieldDescriptorProto{ + { + Name: proto.String("name"), + Label: protodescriptor.FieldDescriptorProto_LABEL_REQUIRED.Enum(), + Type: protodescriptor.FieldDescriptorProto_TYPE_STRING.Enum(), + Number: proto.Int32(1), + }, + { + Name: proto.String("id"), + Label: protodescriptor.FieldDescriptorProto_LABEL_REQUIRED.Enum(), + Type: protodescriptor.FieldDescriptorProto_TYPE_STRING.Enum(), + Number: proto.Int32(2), + }, + }, + } + createDesc := &protodescriptor.DescriptorProto{ + Name: proto.String("CreateBookRequest"), + Field: []*protodescriptor.FieldDescriptorProto{ + { + Name: proto.String("parent"), + Label: protodescriptor.FieldDescriptorProto_LABEL_REQUIRED.Enum(), + Type: protodescriptor.FieldDescriptorProto_TYPE_STRING.Enum(), + Number: proto.Int32(1), + }, + { + Name: proto.String("book"), + Label: protodescriptor.FieldDescriptorProto_LABEL_REQUIRED.Enum(), + Type: protodescriptor.FieldDescriptorProto_TYPE_STRING.Enum(), + TypeName: proto.String("Book"), + Number: proto.Int32(2), + }, + { + Name: proto.String("book_id"), + Label: protodescriptor.FieldDescriptorProto_LABEL_REQUIRED.Enum(), + Type: protodescriptor.FieldDescriptorProto_TYPE_STRING.Enum(), + Number: proto.Int32(3), + }, + }, + } + meth := &protodescriptor.MethodDescriptorProto{ + Name: proto.String("CreateBook"), + InputType: proto.String("CreateBookRequest"), + OutputType: proto.String("Book"), + } + svc := &protodescriptor.ServiceDescriptorProto{ + Name: proto.String("BookService"), + Method: []*protodescriptor.MethodDescriptorProto{meth}, + } + + bookMsg := &descriptor.Message{ + DescriptorProto: bookDesc, + } + createMsg := &descriptor.Message{ + DescriptorProto: createDesc, + } + + parentField := &descriptor.Field{ + Message: createMsg, + FieldDescriptorProto: createMsg.GetField()[0], + } + bookField := &descriptor.Field{ + Message: createMsg, + FieldMessage: bookMsg, + FieldDescriptorProto: createMsg.GetField()[1], + } + bookIDField := &descriptor.Field{ + Message: createMsg, + FieldDescriptorProto: createMsg.GetField()[2], + } + + createMsg.Fields = []*descriptor.Field{parentField, bookField, bookIDField} + + file := descriptor.File{ + FileDescriptorProto: &protodescriptor.FileDescriptorProto{ + SourceCodeInfo: &protodescriptor.SourceCodeInfo{}, + Name: proto.String("book.proto"), + MessageType: []*protodescriptor.DescriptorProto{bookDesc, createDesc}, + Service: []*protodescriptor.ServiceDescriptorProto{svc}, + }, + GoPkg: descriptor.GoPackage{ + Path: "example.com/path/to/book.pb", + Name: "book_pb", + }, + Messages: []*descriptor.Message{bookMsg, createMsg}, + Services: []*descriptor.Service{ + { + ServiceDescriptorProto: svc, + Methods: []*descriptor.Method{ + { + MethodDescriptorProto: meth, + RequestType: createMsg, + ResponseType: bookMsg, + Bindings: []*descriptor.Binding{ + { + HTTPMethod: "POST", + PathTmpl: httprule.Template{ + Version: 1, + OpCodes: []int{0, 0}, + Template: "/v1/{parent=publishers/*}/books", + }, + PathParams: []descriptor.Parameter{ + { + FieldPath: descriptor.FieldPath([]descriptor.FieldPathComponent{ + { + Name: "parent", + Target: parentField, + }, + }), + Target: parentField, + }, + }, + Body: &descriptor.Body{ + FieldPath: descriptor.FieldPath([]descriptor.FieldPathComponent{ + { + Name: "book", + Target: bookField, + }, + }), + }, + }, + }, + }, + }, + }, + }, + } + reg := descriptor.NewRegistry() + reg.Load(&plugin.CodeGeneratorRequest{ProtoFile: []*protodescriptor.FileDescriptorProto{file.FileDescriptorProto}}) + result, err := applyTemplate(param{File: crossLinkFixture(&file), reg: reg}) + if err != nil { + t.Errorf("applyTemplate(%#v) failed with %v; want success", file, err) + return + } + + if _, ok := result.Paths["/v1/{parent=publishers/*}/books"].Post.Responses["200"]; !ok { + t.Errorf("applyTemplate(%#v).%s = expected 200 response to be defined", file, `result.Paths["/v1/{parent=publishers/*}/books"].Post.Responses["200"]`) + } else { + if want, got, name := 3, len(result.Paths["/v1/{parent=publishers/*}/books"].Post.Parameters), `len(result.Paths["/v1/{parent=publishers/*}/books"].Post.Parameters)`; !reflect.DeepEqual(got, want) { + t.Errorf("applyTemplate(%#v).%s = %d want to be %d", file, name, got, want) + } + + type param struct { + Name string + In string + Required bool + } + + p0 := result.Paths["/v1/{parent=publishers/*}/books"].Post.Parameters[0] + if want, got, name := (param{"parent", "path", true}), (param{p0.Name, p0.In, p0.Required}), `result.Paths["/v1/{parent=publishers/*}/books"].Post.Parameters[0]`; !reflect.DeepEqual(got, want) { + t.Errorf("applyTemplate(%#v).%s = %v want to be %v", file, name, got, want) + } + p1 := result.Paths["/v1/{parent=publishers/*}/books"].Post.Parameters[1] + if want, got, name := (param{"body", "body", true}), (param{p1.Name, p1.In, p1.Required}), `result.Paths["/v1/{parent=publishers/*}/books"].Post.Parameters[1]`; !reflect.DeepEqual(got, want) { + t.Errorf("applyTemplate(%#v).%s = %v want to be %v", file, name, got, want) + } + p2 := result.Paths["/v1/{parent=publishers/*}/books"].Post.Parameters[2] + if want, got, name := (param{"book_id", "query", false}), (param{p2.Name, p2.In, p2.Required}), `result.Paths["/v1/{parent=publishers/*}/books"].Post.Parameters[1]`; !reflect.DeepEqual(got, want) { + t.Errorf("applyTemplate(%#v).%s = %v want to be %v", file, name, got, want) + } + } + + // If there was a failure, print out the input and the json result for debugging. + if t.Failed() { + t.Errorf("had: %s", file) + t.Errorf("got: %s", fmt.Sprint(result)) + } +} + func generateFieldsForJSONReservedName() []*descriptor.Field { fields := make([]*descriptor.Field, 0) fieldName := string("json_name") @@ -2065,7 +2236,7 @@ func TestSchemaOfField(t *testing.T) { }, refs: make(refMap), expected: schemaCore{ - Type: "boolean", + Type: "boolean", }, }, {