-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Naming strategy #2310
Naming strategy #2310
Conversation
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed (or fixed any issues), please reply here with What to do if you already signed the CLAIndividual signers
Corporate signers
ℹ️ Googlers: Go here for more info. |
@googlebot I signed it! |
It would be great to have explicit consent from @misberner to use their code for this PR. |
Sorry for the delay. I absolutely give consent to using the code. Thanks a lot @alperengozeten for taking this to completion! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code LGTM, could you please run the bazel command from CONTRIBUTION.md to update the bazel files? That should fix the CI job. https://github.com/grpc-ecosystem/grpc-gateway/blob/master/CONTRIBUTING.md#i-want-to-regenerate-the-files-after-making-changes
I have run those commands that you said but it still fails the "generate". Anything you can suggest to me at this point? Or is it because I'm running on Windows? Thanks. As I see now there are problems with the \r, \n in the files. Is there any way I can run those commands from Windows without having this problem? |
Not sure what happened there, looks like some comments changed and you introduced some windows line endings. I've created another patch after running the generate job myself, apply this and it should hopefully pass again: From 9fcad31097d9b6211d89994ca9cf6ec58248c085 Mon Sep 17 00:00:00 2001
From: Johan Brandhorst-Satzkorn <[email protected]>
Date: Wed, 1 Sep 2021 01:08:01 +0000
Subject: [PATCH] Regenerate files
---
.../internal/clients/abe/api/swagger.yaml | 27 ++++++++---------
.../abe/api_a_bit_of_everything_service.go | 13 +++++----
.../clients/abe/model_examplepb_book.go | 2 ++
.../internal/clients/echo/api/swagger.yaml | 29 +++++++++----------
.../internal/clients/echo/api_echo_service.go | 19 +++++++-----
examples/internal/clients/echo/client.go | 6 ++--
.../internal/clients/echo/configuration.go | 4 +--
.../echo/model_examplepb_dynamic_message.go | 6 ++--
.../model_examplepb_dynamic_message_update.go | 4 +--
.../clients/echo/model_examplepb_embedded.go | 4 +--
.../echo/model_examplepb_simple_message.go | 4 +--
.../clients/echo/model_protobuf_any.go | 4 +--
.../clients/echo/model_protobuf_null_value.go | 4 +--
.../internal/clients/echo/model_rpc_status.go | 4 +--
examples/internal/clients/echo/response.go | 4 +--
.../generateunboundmethods/api/swagger.yaml | 11 ++++---
...i_generate_unbound_methods_echo_service.go | 5 ++--
.../clients/generateunboundmethods/client.go | 2 +-
.../generateunboundmethods/configuration.go | 2 +-
.../GenerateUnboundMethodsEchoServiceApi.md | 6 ++--
...generate_unbound_methods_simple_message.go | 2 +-
.../model_protobuf_any.go | 2 +-
.../model_rpc_status.go | 2 +-
.../generateunboundmethods/response.go | 2 +-
.../clients/unannotatedecho/api/swagger.yaml | 8 ++---
.../api_unannotated_echo_service.go | 2 +-
.../clients/unannotatedecho/client.go | 2 +-
.../clients/unannotatedecho/configuration.go | 2 +-
.../model_examplepb_unannotated_embedded.go | 2 +-
...el_examplepb_unannotated_simple_message.go | 2 +-
.../unannotatedecho/model_protobuf_any.go | 2 +-
.../unannotatedecho/model_rpc_status.go | 2 +-
.../clients/unannotatedecho/response.go | 2 +-
.../a_bit_of_everything.swagger.json | 17 ++++++-----
.../proto/examplepb/echo_service.swagger.json | 21 +++++++++-----
.../generate_unbound_methods.swagger.json | 5 ++--
.../examplepb/openapi_merge.swagger.json | 22 +++++++++-----
.../examplepb/openapi_merge_a.swagger.json | 16 ++++++----
.../examplepb/openapi_merge_b.swagger.json | 10 ++++---
.../unannotated_echo_service.swagger.json | 2 +-
.../examplepb/use_go_template.swagger.json | 14 +++++----
41 files changed, 166 insertions(+), 133 deletions(-)
diff --git a/examples/internal/clients/abe/api/swagger.yaml b/examples/internal/clients/abe/api/swagger.yaml
index a3bb228..9ffa066 100644
--- a/examples/internal/clients/abe/api/swagger.yaml
+++ b/examples/internal/clients/abe/api/swagger.yaml
@@ -1388,7 +1388,8 @@ paths:
: post:
tags:
- "ABitOfEverythingService"
- summary: "Create a new ABitOfEverything\r\n\r\nThis API creates a new ABitOfEverything"
+ summary: "Create a new ABitOfEverything"
+ description: "This API creates a new ABitOfEverything"
operationId: "ABitOfEverythingService_Create"
parameters:
- name: "floatValue"
@@ -1936,15 +1937,15 @@ paths:
parameters:
- name: "book.name"
in: "path"
- description: "The resource name of the book.\r\n\r\nFormat: `publishers/{publisher}/books/{book}`\r\
- \n\r\nExample: `publishers/1257894000000000000/books/my-book`"
+ description: "The resource name of the book.\n\nFormat: `publishers/{publisher}/books/{book}`\n\
+ \nExample: `publishers/1257894000000000000/books/my-book`"
required: true
type: "string"
x-exportParamName: "BookName"
- in: "body"
name: "body"
- description: "The book to update.\r\n\r\nThe book's `name` field is used to\
- \ identify the book to be updated.\r\nFormat: publishers/{publisher}/books/{book}"
+ description: "The book to update.\n\nThe book's `name` field is used to identify\
+ \ the book to be updated.\nFormat: publishers/{publisher}/books/{book}"
required: true
schema:
$ref: "#/definitions/examplepbBook"
@@ -1959,7 +1960,7 @@ paths:
- name: "allowMissing"
in: "query"
description: "If set to true, and the book is not found, a new book will be\
- \ created.\r\nIn this situation, `update_mask` is ignored."
+ \ created.\nIn this situation, `update_mask` is ignored."
required: false
type: "boolean"
x-exportParamName: "AllowMissing"
@@ -1999,8 +2000,8 @@ paths:
parameters:
- name: "parent"
in: "path"
- description: "The publisher in which to create the book.\r\n\r\nFormat: `publishers/{publisher}`\r\
- \n\r\nExample: `publishers/1257894000000000000`"
+ description: "The publisher in which to create the book.\n\nFormat: `publishers/{publisher}`\n\
+ \nExample: `publishers/1257894000000000000`"
required: true
type: "string"
x-exportParamName: "Parent"
@@ -2013,7 +2014,7 @@ paths:
x-exportParamName: "Body"
- name: "bookId"
in: "query"
- description: "The ID to use for the book.\r\n\r\nThis must start with an alphanumeric\
+ description: "The ID to use for the book.\n\nThis must start with an alphanumeric\
\ character."
required: false
type: "string"
@@ -2874,8 +2875,8 @@ definitions:
properties:
name:
type: "string"
- title: "The resource name of the book.\r\n\r\nFormat: `publishers/{publisher}/books/{book}`\r\
- \n\r\nExample: `publishers/1257894000000000000/books/my-book`"
+ 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."
@@ -2885,8 +2886,8 @@ definitions:
format: "date-time"
description: "Output only. Creation time of the book."
readOnly: true
- title: "An example resource type from AIP-123 used to test the behavior described\
- \ in\r\nthe CreateBookRequest message.\r\n\r\nSee: https://google.aip.dev/123"
+ 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:
createTime: "2000-01-23T04:56:07.000+00:00"
name: "name"
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 cc173e4..465540e 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
@@ -1477,7 +1477,8 @@ func (a *ABitOfEverythingServiceApiService) ABitOfEverythingServiceCheckStatus(c
}
/*
-ABitOfEverythingServiceApiService Create a new ABitOfEverything This API creates a new ABitOfEverything
+ABitOfEverythingServiceApiService Create a new ABitOfEverything
+This API creates a new ABitOfEverything
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param floatValue Float value field
* @param doubleValue
@@ -1828,10 +1829,10 @@ func (a *ABitOfEverythingServiceApiService) ABitOfEverythingServiceCreateBody(ct
/*
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 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.
+ * @param "BookId" (optional.String) - The ID to use for the book. This must start with an alphanumeric character.
@return ExamplepbBook
*/
@@ -3963,11 +3964,11 @@ func (a *ABitOfEverythingServiceApiService) ABitOfEverythingServiceUpdate(ctx co
/*
ABitOfEverythingServiceApiService
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param bookName The resource name of the book. Format: `publishers/{publisher}/books/{book}` Example: `publishers/1257894000000000000/books/my-book`
- * @param body The book to update. The book's `name` field is used to identify the book to be updated. Format: publishers/{publisher}/books/{book}
+ * @param bookName The resource name of the book. Format: `publishers/{publisher}/books/{book}` Example: `publishers/1257894000000000000/books/my-book`
+ * @param body The book to update. The book's `name` field is used to identify the book to be updated. Format: publishers/{publisher}/books/{book}
* @param optional nil or *ABitOfEverythingServiceUpdateBookOpts - Optional Parameters:
* @param "UpdateMask" (optional.String) - The list of fields to be updated.
- * @param "AllowMissing" (optional.Bool) - If set to true, and the book is not found, a new book will be created. In this situation, `update_mask` is ignored.
+ * @param "AllowMissing" (optional.Bool) - If set to true, and the book is not found, a new book will be created. In this situation, `update_mask` is ignored.
@return ExamplepbBook
*/
diff --git a/examples/internal/clients/abe/model_examplepb_book.go b/examples/internal/clients/abe/model_examplepb_book.go
index edf33f9..0246900 100644
--- a/examples/internal/clients/abe/model_examplepb_book.go
+++ b/examples/internal/clients/abe/model_examplepb_book.go
@@ -14,7 +14,9 @@ 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"`
diff --git a/examples/internal/clients/echo/api/swagger.yaml b/examples/internal/clients/echo/api/swagger.yaml
index ebd7c07..1018d8d 100644
--- a/examples/internal/clients/echo/api/swagger.yaml
+++ b/examples/internal/clients/echo/api/swagger.yaml
@@ -1,10 +1,9 @@
---
swagger: "2.0"
info:
- description: "Echo Service\r\n\r\nEcho Service API consists of a single service\
- \ which returns\r\na message."
+ description: "Echo Service API consists of a single service which returns\na message."
version: "version not set"
- title: "examples/internal/proto/examplepb/echo_service.proto"
+ title: "Echo Service"
tags:
- name: "EchoService"
consumes:
@@ -16,8 +15,8 @@ paths:
post:
tags:
- "EchoService"
- summary: "Echo method receives a simple message and returns it.\r\n\r\nThe message\
- \ posted as the id parameter will also be\r\nreturned."
+ summary: "Echo method receives a simple message and returns it."
+ description: "The message posted as the id parameter will also be\nreturned."
operationId: "EchoService_Echo"
parameters:
- name: "id"
@@ -39,8 +38,8 @@ paths:
get:
tags:
- "EchoService"
- summary: "Echo method receives a simple message and returns it.\r\n\r\nThe message\
- \ posted as the id parameter will also be\r\nreturned."
+ summary: "Echo method receives a simple message and returns it."
+ description: "The message posted as the id parameter will also be\nreturned."
operationId: "EchoService_Echo2"
parameters:
- name: "id"
@@ -114,8 +113,8 @@ paths:
get:
tags:
- "EchoService"
- summary: "Echo method receives a simple message and returns it.\r\n\r\nThe message\
- \ posted as the id parameter will also be\r\nreturned."
+ summary: "Echo method receives a simple message and returns it."
+ description: "The message posted as the id parameter will also be\nreturned."
operationId: "EchoService_Echo3"
parameters:
- name: "id"
@@ -188,8 +187,8 @@ paths:
get:
tags:
- "EchoService"
- summary: "Echo method receives a simple message and returns it.\r\n\r\nThe message\
- \ posted as the id parameter will also be\r\nreturned."
+ summary: "Echo method receives a simple message and returns it."
+ description: "The message posted as the id parameter will also be\nreturned."
operationId: "EchoService_Echo4"
parameters:
- name: "id"
@@ -256,8 +255,8 @@ paths:
get:
tags:
- "EchoService"
- summary: "Echo method receives a simple message and returns it.\r\n\r\nThe message\
- \ posted as the id parameter will also be\r\nreturned."
+ summary: "Echo method receives a simple message and returns it."
+ description: "The message posted as the id parameter will also be\nreturned."
operationId: "EchoService_Echo5"
parameters:
- name: "no.note"
@@ -458,8 +457,8 @@ definitions:
valueField:
type: "object"
properties: {}
- description: "DynamicMessage represents a message which can have its structure\r\
- \nbuilt dynamically using Struct and Values."
+ description: "DynamicMessage represents a message which can have its structure\n\
+ built dynamically using Struct and Values."
example:
structField: "{}"
valueField: "{}"
diff --git a/examples/internal/clients/echo/api_echo_service.go b/examples/internal/clients/echo/api_echo_service.go
index 1cfa6aa..1bcf461 100644
--- a/examples/internal/clients/echo/api_echo_service.go
+++ b/examples/internal/clients/echo/api_echo_service.go
@@ -1,7 +1,7 @@
/*
- * examples/internal/proto/examplepb/echo_service.proto
+ * Echo Service
*
- * Echo Service Echo Service API consists of a single service which returns a message.
+ * Echo Service API consists of a single service which returns a message.
*
* API version: version not set
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
@@ -27,7 +27,8 @@ var (
type EchoServiceApiService service
/*
-EchoServiceApiService Echo method receives a simple message and returns it. The message posted as the id parameter will also be returned.
+EchoServiceApiService Echo method receives a simple message and returns it.
+The message posted as the id parameter will also be returned.
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param id Id represents the message identifier.
@@ -126,7 +127,8 @@ func (a *EchoServiceApiService) EchoServiceEcho(ctx context.Context, id string)
}
/*
-EchoServiceApiService Echo method receives a simple message and returns it. The message posted as the id parameter will also be returned.
+EchoServiceApiService Echo method receives a simple message and returns it.
+The message posted as the id parameter will also be returned.
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param id Id represents the message identifier.
* @param num
@@ -267,7 +269,8 @@ func (a *EchoServiceApiService) EchoServiceEcho2(ctx context.Context, id string,
}
/*
-EchoServiceApiService Echo method receives a simple message and returns it. The message posted as the id parameter will also be returned.
+EchoServiceApiService Echo method receives a simple message and returns it.
+The message posted as the id parameter will also be returned.
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param id Id represents the message identifier.
* @param num
@@ -405,7 +408,8 @@ func (a *EchoServiceApiService) EchoServiceEcho3(ctx context.Context, id string,
}
/*
-EchoServiceApiService Echo method receives a simple message and returns it. The message posted as the id parameter will also be returned.
+EchoServiceApiService Echo method receives a simple message and returns it.
+The message posted as the id parameter will also be returned.
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param id Id represents the message identifier.
* @param lineNum
@@ -538,7 +542,8 @@ func (a *EchoServiceApiService) EchoServiceEcho4(ctx context.Context, id string,
}
/*
-EchoServiceApiService Echo method receives a simple message and returns it. The message posted as the id parameter will also be returned.
+EchoServiceApiService Echo method receives a simple message and returns it.
+The message posted as the id parameter will also be returned.
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param noNote
* @param optional nil or *EchoServiceEcho5Opts - Optional Parameters:
diff --git a/examples/internal/clients/echo/client.go b/examples/internal/clients/echo/client.go
index 870c404..d0e2045 100644
--- a/examples/internal/clients/echo/client.go
+++ b/examples/internal/clients/echo/client.go
@@ -1,7 +1,7 @@
/*
- * examples/internal/proto/examplepb/echo_service.proto
+ * Echo Service
*
- * Echo Service Echo Service API consists of a single service which returns a message.
+ * Echo Service API consists of a single service which returns a message.
*
* API version: version not set
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
@@ -37,7 +37,7 @@ var (
xmlCheck = regexp.MustCompile("(?i:[application|text]/xml)")
)
-// APIClient manages communication with the examples/internal/proto/examplepb/echo_service.proto API vversion not set
+// APIClient manages communication with the Echo Service API vversion not set
// In most cases there should be only one, shared, APIClient.
type APIClient struct {
cfg *Configuration
diff --git a/examples/internal/clients/echo/configuration.go b/examples/internal/clients/echo/configuration.go
index 027f068..6a44e4c 100644
--- a/examples/internal/clients/echo/configuration.go
+++ b/examples/internal/clients/echo/configuration.go
@@ -1,7 +1,7 @@
/*
- * examples/internal/proto/examplepb/echo_service.proto
+ * Echo Service
*
- * Echo Service Echo Service API consists of a single service which returns a message.
+ * Echo Service API consists of a single service which returns a message.
*
* API version: version not set
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
diff --git a/examples/internal/clients/echo/model_examplepb_dynamic_message.go b/examples/internal/clients/echo/model_examplepb_dynamic_message.go
index 6321d0e..dae5858 100644
--- a/examples/internal/clients/echo/model_examplepb_dynamic_message.go
+++ b/examples/internal/clients/echo/model_examplepb_dynamic_message.go
@@ -1,7 +1,7 @@
/*
- * examples/internal/proto/examplepb/echo_service.proto
+ * Echo Service
*
- * Echo Service Echo Service API consists of a single service which returns a message.
+ * Echo Service API consists of a single service which returns a message.
*
* API version: version not set
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
@@ -9,7 +9,7 @@
package echo
-// DynamicMessage represents a message which can have its structure built dynamically using Struct and Values.
+// DynamicMessage represents a message which can have its structure built dynamically using Struct and Values.
type ExamplepbDynamicMessage struct {
StructField *interface{} `json:"structField,omitempty"`
ValueField *interface{} `json:"valueField,omitempty"`
diff --git a/examples/internal/clients/echo/model_examplepb_dynamic_message_update.go b/examples/internal/clients/echo/model_examplepb_dynamic_message_update.go
index c259eae..086ab7c 100644
--- a/examples/internal/clients/echo/model_examplepb_dynamic_message_update.go
+++ b/examples/internal/clients/echo/model_examplepb_dynamic_message_update.go
@@ -1,7 +1,7 @@
/*
- * examples/internal/proto/examplepb/echo_service.proto
+ * Echo Service
*
- * Echo Service Echo Service API consists of a single service which returns a message.
+ * Echo Service API consists of a single service which returns a message.
*
* API version: version not set
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
diff --git a/examples/internal/clients/echo/model_examplepb_embedded.go b/examples/internal/clients/echo/model_examplepb_embedded.go
index 47823bf..7f6ff8a 100644
--- a/examples/internal/clients/echo/model_examplepb_embedded.go
+++ b/examples/internal/clients/echo/model_examplepb_embedded.go
@@ -1,7 +1,7 @@
/*
- * examples/internal/proto/examplepb/echo_service.proto
+ * Echo Service
*
- * Echo Service Echo Service API consists of a single service which returns a message.
+ * Echo Service API consists of a single service which returns a message.
*
* API version: version not set
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
diff --git a/examples/internal/clients/echo/model_examplepb_simple_message.go b/examples/internal/clients/echo/model_examplepb_simple_message.go
index 035d095..9b029fa 100644
--- a/examples/internal/clients/echo/model_examplepb_simple_message.go
+++ b/examples/internal/clients/echo/model_examplepb_simple_message.go
@@ -1,7 +1,7 @@
/*
- * examples/internal/proto/examplepb/echo_service.proto
+ * Echo Service
*
- * Echo Service Echo Service API consists of a single service which returns a message.
+ * Echo Service API consists of a single service which returns a message.
*
* API version: version not set
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
diff --git a/examples/internal/clients/echo/model_protobuf_any.go b/examples/internal/clients/echo/model_protobuf_any.go
index aef2749..a51f1e5 100644
--- a/examples/internal/clients/echo/model_protobuf_any.go
+++ b/examples/internal/clients/echo/model_protobuf_any.go
@@ -1,7 +1,7 @@
/*
- * examples/internal/proto/examplepb/echo_service.proto
+ * Echo Service
*
- * Echo Service Echo Service API consists of a single service which returns a message.
+ * Echo Service API consists of a single service which returns a message.
*
* API version: version not set
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
diff --git a/examples/internal/clients/echo/model_protobuf_null_value.go b/examples/internal/clients/echo/model_protobuf_null_value.go
index 43552f6..1d3e9e5 100644
--- a/examples/internal/clients/echo/model_protobuf_null_value.go
+++ b/examples/internal/clients/echo/model_protobuf_null_value.go
@@ -1,7 +1,7 @@
/*
- * examples/internal/proto/examplepb/echo_service.proto
+ * Echo Service
*
- * Echo Service Echo Service API consists of a single service which returns a message.
+ * Echo Service API consists of a single service which returns a message.
*
* API version: version not set
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
diff --git a/examples/internal/clients/echo/model_rpc_status.go b/examples/internal/clients/echo/model_rpc_status.go
index 01b2a44..f87184f 100644
--- a/examples/internal/clients/echo/model_rpc_status.go
+++ b/examples/internal/clients/echo/model_rpc_status.go
@@ -1,7 +1,7 @@
/*
- * examples/internal/proto/examplepb/echo_service.proto
+ * Echo Service
*
- * Echo Service Echo Service API consists of a single service which returns a message.
+ * Echo Service API consists of a single service which returns a message.
*
* API version: version not set
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
diff --git a/examples/internal/clients/echo/response.go b/examples/internal/clients/echo/response.go
index ff69c9b..a822955 100644
--- a/examples/internal/clients/echo/response.go
+++ b/examples/internal/clients/echo/response.go
@@ -1,7 +1,7 @@
/*
- * examples/internal/proto/examplepb/echo_service.proto
+ * Echo Service
*
- * Echo Service Echo Service API consists of a single service which returns a message.
+ * Echo Service API consists of a single service which returns a message.
*
* API version: version not set
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
diff --git a/examples/internal/clients/generateunboundmethods/api/swagger.yaml b/examples/internal/clients/generateunboundmethods/api/swagger.yaml
index 65e93dd..2ff23c5 100644
--- a/examples/internal/clients/generateunboundmethods/api/swagger.yaml
+++ b/examples/internal/clients/generateunboundmethods/api/swagger.yaml
@@ -1,10 +1,9 @@
---
swagger: "2.0"
info:
- description: "Generate Unannotated Methods Echo Service\r\nSimilar to echo_service.proto\
- \ but without annotations and without external configuration.\r\n\r\nGenerate\
- \ Unannotated Methods Echo Service API consists of a single service which returns\r\
- \na message."
+ description: "Generate Unannotated Methods Echo Service\nSimilar to echo_service.proto\
+ \ but without annotations and without external configuration.\n\nGenerate Unannotated\
+ \ Methods Echo Service API consists of a single service which returns\na message."
version: "version not set"
title: "examples/internal/proto/examplepb/generate_unbound_methods.proto"
tags:
@@ -18,8 +17,8 @@ paths:
post:
tags:
- "GenerateUnboundMethodsEchoService"
- summary: "Echo method receives a simple message and returns it.\r\n\r\nThe message\
- \ posted as the id parameter will also be\r\nreturned."
+ summary: "Echo method receives a simple message and returns it."
+ description: "The message posted as the id parameter will also be\nreturned."
operationId: "GenerateUnboundMethodsEchoService_Echo"
parameters:
- in: "body"
diff --git a/examples/internal/clients/generateunboundmethods/api_generate_unbound_methods_echo_service.go b/examples/internal/clients/generateunboundmethods/api_generate_unbound_methods_echo_service.go
index 4f5c01b..1df1aa7 100644
--- a/examples/internal/clients/generateunboundmethods/api_generate_unbound_methods_echo_service.go
+++ b/examples/internal/clients/generateunboundmethods/api_generate_unbound_methods_echo_service.go
@@ -1,7 +1,7 @@
/*
* examples/internal/proto/examplepb/generate_unbound_methods.proto
*
- * Generate Unannotated Methods Echo Service Similar to echo_service.proto but without annotations and without external configuration. Generate Unannotated Methods Echo Service API consists of a single service which returns a message.
+ * Generate Unannotated Methods Echo Service Similar to echo_service.proto but without annotations and without external configuration. Generate Unannotated Methods Echo Service API consists of a single service which returns a message.
*
* API version: version not set
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
@@ -25,7 +25,8 @@ var (
type GenerateUnboundMethodsEchoServiceApiService service
/*
-GenerateUnboundMethodsEchoServiceApiService Echo method receives a simple message and returns it. The message posted as the id parameter will also be returned.
+GenerateUnboundMethodsEchoServiceApiService Echo method receives a simple message and returns it.
+The message posted as the id parameter will also be returned.
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param body
diff --git a/examples/internal/clients/generateunboundmethods/client.go b/examples/internal/clients/generateunboundmethods/client.go
index 3426300..1c81380 100644
--- a/examples/internal/clients/generateunboundmethods/client.go
+++ b/examples/internal/clients/generateunboundmethods/client.go
@@ -1,7 +1,7 @@
/*
* examples/internal/proto/examplepb/generate_unbound_methods.proto
*
- * Generate Unannotated Methods Echo Service Similar to echo_service.proto but without annotations and without external configuration. Generate Unannotated Methods Echo Service API consists of a single service which returns a message.
+ * Generate Unannotated Methods Echo Service Similar to echo_service.proto but without annotations and without external configuration. Generate Unannotated Methods Echo Service API consists of a single service which returns a message.
*
* API version: version not set
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
diff --git a/examples/internal/clients/generateunboundmethods/configuration.go b/examples/internal/clients/generateunboundmethods/configuration.go
index 935085c..1a0022d 100644
--- a/examples/internal/clients/generateunboundmethods/configuration.go
+++ b/examples/internal/clients/generateunboundmethods/configuration.go
@@ -1,7 +1,7 @@
/*
* examples/internal/proto/examplepb/generate_unbound_methods.proto
*
- * Generate Unannotated Methods Echo Service Similar to echo_service.proto but without annotations and without external configuration. Generate Unannotated Methods Echo Service API consists of a single service which returns a message.
+ * Generate Unannotated Methods Echo Service Similar to echo_service.proto but without annotations and without external configuration. Generate Unannotated Methods Echo Service API consists of a single service which returns a message.
*
* API version: version not set
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
diff --git a/examples/internal/clients/generateunboundmethods/docs/GenerateUnboundMethodsEchoServiceApi.md b/examples/internal/clients/generateunboundmethods/docs/GenerateUnboundMethodsEchoServiceApi.md
index ba8f665..6d3426c 100644
--- a/examples/internal/clients/generateunboundmethods/docs/GenerateUnboundMethodsEchoServiceApi.md
+++ b/examples/internal/clients/generateunboundmethods/docs/GenerateUnboundMethodsEchoServiceApi.md
@@ -4,14 +4,16 @@ All URIs are relative to *https://localhost*
Method | HTTP request | Description
------------- | ------------- | -------------
-[**GenerateUnboundMethodsEchoServiceEcho**](GenerateUnboundMethodsEchoServiceApi.md#GenerateUnboundMethodsEchoServiceEcho) | **Post** /grpc.gateway.examples.internal.proto.examplepb.GenerateUnboundMethodsEchoService/Echo | Echo method receives a simple message and returns it. The message posted as the id parameter will also be returned.
+[**GenerateUnboundMethodsEchoServiceEcho**](GenerateUnboundMethodsEchoServiceApi.md#GenerateUnboundMethodsEchoServiceEcho) | **Post** /grpc.gateway.examples.internal.proto.examplepb.GenerateUnboundMethodsEchoService/Echo | Echo method receives a simple message and returns it.
[**GenerateUnboundMethodsEchoServiceEchoBody**](GenerateUnboundMethodsEchoServiceApi.md#GenerateUnboundMethodsEchoServiceEchoBody) | **Post** /grpc.gateway.examples.internal.proto.examplepb.GenerateUnboundMethodsEchoService/EchoBody | EchoBody method receives a simple message and returns it.
[**GenerateUnboundMethodsEchoServiceEchoDelete**](GenerateUnboundMethodsEchoServiceApi.md#GenerateUnboundMethodsEchoServiceEchoDelete) | **Post** /grpc.gateway.examples.internal.proto.examplepb.GenerateUnboundMethodsEchoService/EchoDelete | EchoDelete method receives a simple message and returns it.
# **GenerateUnboundMethodsEchoServiceEcho**
> ExamplepbGenerateUnboundMethodsSimpleMessage GenerateUnboundMethodsEchoServiceEcho(ctx, body)
-Echo method receives a simple message and returns it. The message posted as the id parameter will also be returned.
+Echo method receives a simple message and returns it.
+
+The message posted as the id parameter will also be returned.
### Required Parameters
diff --git a/examples/internal/clients/generateunboundmethods/model_examplepb_generate_unbound_methods_simple_message.go b/examples/internal/clients/generateunboundmethods/model_examplepb_generate_unbound_methods_simple_message.go
index 18becf7..9f88462 100644
--- a/examples/internal/clients/generateunboundmethods/model_examplepb_generate_unbound_methods_simple_message.go
+++ b/examples/internal/clients/generateunboundmethods/model_examplepb_generate_unbound_methods_simple_message.go
@@ -1,7 +1,7 @@
/*
* examples/internal/proto/examplepb/generate_unbound_methods.proto
*
- * Generate Unannotated Methods Echo Service Similar to echo_service.proto but without annotations and without external configuration. Generate Unannotated Methods Echo Service API consists of a single service which returns a message.
+ * Generate Unannotated Methods Echo Service Similar to echo_service.proto but without annotations and without external configuration. Generate Unannotated Methods Echo Service API consists of a single service which returns a message.
*
* API version: version not set
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
diff --git a/examples/internal/clients/generateunboundmethods/model_protobuf_any.go b/examples/internal/clients/generateunboundmethods/model_protobuf_any.go
index 204195f..f8c0bf0 100644
--- a/examples/internal/clients/generateunboundmethods/model_protobuf_any.go
+++ b/examples/internal/clients/generateunboundmethods/model_protobuf_any.go
@@ -1,7 +1,7 @@
/*
* examples/internal/proto/examplepb/generate_unbound_methods.proto
*
- * Generate Unannotated Methods Echo Service Similar to echo_service.proto but without annotations and without external configuration. Generate Unannotated Methods Echo Service API consists of a single service which returns a message.
+ * Generate Unannotated Methods Echo Service Similar to echo_service.proto but without annotations and without external configuration. Generate Unannotated Methods Echo Service API consists of a single service which returns a message.
*
* API version: version not set
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
diff --git a/examples/internal/clients/generateunboundmethods/model_rpc_status.go b/examples/internal/clients/generateunboundmethods/model_rpc_status.go
index 24a7b63..c105403 100644
--- a/examples/internal/clients/generateunboundmethods/model_rpc_status.go
+++ b/examples/internal/clients/generateunboundmethods/model_rpc_status.go
@@ -1,7 +1,7 @@
/*
* examples/internal/proto/examplepb/generate_unbound_methods.proto
*
- * Generate Unannotated Methods Echo Service Similar to echo_service.proto but without annotations and without external configuration. Generate Unannotated Methods Echo Service API consists of a single service which returns a message.
+ * Generate Unannotated Methods Echo Service Similar to echo_service.proto but without annotations and without external configuration. Generate Unannotated Methods Echo Service API consists of a single service which returns a message.
*
* API version: version not set
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
diff --git a/examples/internal/clients/generateunboundmethods/response.go b/examples/internal/clients/generateunboundmethods/response.go
index 91d1b56..a4a4c06 100644
--- a/examples/internal/clients/generateunboundmethods/response.go
+++ b/examples/internal/clients/generateunboundmethods/response.go
@@ -1,7 +1,7 @@
/*
* examples/internal/proto/examplepb/generate_unbound_methods.proto
*
- * Generate Unannotated Methods Echo Service Similar to echo_service.proto but without annotations and without external configuration. Generate Unannotated Methods Echo Service API consists of a single service which returns a message.
+ * Generate Unannotated Methods Echo Service Similar to echo_service.proto but without annotations and without external configuration. Generate Unannotated Methods Echo Service API consists of a single service which returns a message.
*
* API version: version not set
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
diff --git a/examples/internal/clients/unannotatedecho/api/swagger.yaml b/examples/internal/clients/unannotatedecho/api/swagger.yaml
index fa05186..f6ab2d1 100644
--- a/examples/internal/clients/unannotatedecho/api/swagger.yaml
+++ b/examples/internal/clients/unannotatedecho/api/swagger.yaml
@@ -1,10 +1,10 @@
---
swagger: "2.0"
info:
- description: "Unannotated Echo Service\r\nSimilar to echo_service.proto but without\
- \ annotations. See\r\nunannotated_echo_service.yaml for the equivalent of the\
- \ annotations in\r\ngRPC API configuration format.\r\n\r\nEcho Service API consists\
- \ of a single service which returns\r\na message."
+ description: "Unannotated Echo Service\nSimilar to echo_service.proto but without\
+ \ annotations. See\nunannotated_echo_service.yaml for the equivalent of the annotations\
+ \ in\ngRPC API configuration format.\n\nEcho Service API consists of a single\
+ \ service which returns\na message."
version: "1.0"
title: "Unannotated Echo"
contact:
diff --git a/examples/internal/clients/unannotatedecho/api_unannotated_echo_service.go b/examples/internal/clients/unannotatedecho/api_unannotated_echo_service.go
index 8dfd3fe..ed62777 100644
--- a/examples/internal/clients/unannotatedecho/api_unannotated_echo_service.go
+++ b/examples/internal/clients/unannotatedecho/api_unannotated_echo_service.go
@@ -1,7 +1,7 @@
/*
* Unannotated Echo
*
- * Unannotated Echo Service Similar to echo_service.proto but without annotations. See unannotated_echo_service.yaml for the equivalent of the annotations in gRPC API configuration format. Echo Service API consists of a single service which returns a message.
+ * Unannotated Echo Service Similar to echo_service.proto but without annotations. See unannotated_echo_service.yaml for the equivalent of the annotations in gRPC API configuration format. Echo Service API consists of a single service which returns a message.
*
* API version: 1.0
* Contact: [email protected]
diff --git a/examples/internal/clients/unannotatedecho/client.go b/examples/internal/clients/unannotatedecho/client.go
index f26dbb8..80ae202 100644
--- a/examples/internal/clients/unannotatedecho/client.go
+++ b/examples/internal/clients/unannotatedecho/client.go
@@ -1,7 +1,7 @@
/*
* Unannotated Echo
*
- * Unannotated Echo Service Similar to echo_service.proto but without annotations. See unannotated_echo_service.yaml for the equivalent of the annotations in gRPC API configuration format. Echo Service API consists of a single service which returns a message.
+ * Unannotated Echo Service Similar to echo_service.proto but without annotations. See unannotated_echo_service.yaml for the equivalent of the annotations in gRPC API configuration format. Echo Service API consists of a single service which returns a message.
*
* API version: 1.0
* Contact: [email protected]
diff --git a/examples/internal/clients/unannotatedecho/configuration.go b/examples/internal/clients/unannotatedecho/configuration.go
index 1117b9f..a471d97 100644
--- a/examples/internal/clients/unannotatedecho/configuration.go
+++ b/examples/internal/clients/unannotatedecho/configuration.go
@@ -1,7 +1,7 @@
/*
* Unannotated Echo
*
- * Unannotated Echo Service Similar to echo_service.proto but without annotations. See unannotated_echo_service.yaml for the equivalent of the annotations in gRPC API configuration format. Echo Service API consists of a single service which returns a message.
+ * Unannotated Echo Service Similar to echo_service.proto but without annotations. See unannotated_echo_service.yaml for the equivalent of the annotations in gRPC API configuration format. Echo Service API consists of a single service which returns a message.
*
* API version: 1.0
* Contact: [email protected]
diff --git a/examples/internal/clients/unannotatedecho/model_examplepb_unannotated_embedded.go b/examples/internal/clients/unannotatedecho/model_examplepb_unannotated_embedded.go
index a1b3eb3..e91de2d 100644
--- a/examples/internal/clients/unannotatedecho/model_examplepb_unannotated_embedded.go
+++ b/examples/internal/clients/unannotatedecho/model_examplepb_unannotated_embedded.go
@@ -1,7 +1,7 @@
/*
* Unannotated Echo
*
- * Unannotated Echo Service Similar to echo_service.proto but without annotations. See unannotated_echo_service.yaml for the equivalent of the annotations in gRPC API configuration format. Echo Service API consists of a single service which returns a message.
+ * Unannotated Echo Service Similar to echo_service.proto but without annotations. See unannotated_echo_service.yaml for the equivalent of the annotations in gRPC API configuration format. Echo Service API consists of a single service which returns a message.
*
* API version: 1.0
* Contact: [email protected]
diff --git a/examples/internal/clients/unannotatedecho/model_examplepb_unannotated_simple_message.go b/examples/internal/clients/unannotatedecho/model_examplepb_unannotated_simple_message.go
index fc566f3..07045bc 100644
--- a/examples/internal/clients/unannotatedecho/model_examplepb_unannotated_simple_message.go
+++ b/examples/internal/clients/unannotatedecho/model_examplepb_unannotated_simple_message.go
@@ -1,7 +1,7 @@
/*
* Unannotated Echo
*
- * Unannotated Echo Service Similar to echo_service.proto but without annotations. See unannotated_echo_service.yaml for the equivalent of the annotations in gRPC API configuration format. Echo Service API consists of a single service which returns a message.
+ * Unannotated Echo Service Similar to echo_service.proto but without annotations. See unannotated_echo_service.yaml for the equivalent of the annotations in gRPC API configuration format. Echo Service API consists of a single service which returns a message.
*
* API version: 1.0
* Contact: [email protected]
diff --git a/examples/internal/clients/unannotatedecho/model_protobuf_any.go b/examples/internal/clients/unannotatedecho/model_protobuf_any.go
index 642da89..6697363 100644
--- a/examples/internal/clients/unannotatedecho/model_protobuf_any.go
+++ b/examples/internal/clients/unannotatedecho/model_protobuf_any.go
@@ -1,7 +1,7 @@
/*
* Unannotated Echo
*
- * Unannotated Echo Service Similar to echo_service.proto but without annotations. See unannotated_echo_service.yaml for the equivalent of the annotations in gRPC API configuration format. Echo Service API consists of a single service which returns a message.
+ * Unannotated Echo Service Similar to echo_service.proto but without annotations. See unannotated_echo_service.yaml for the equivalent of the annotations in gRPC API configuration format. Echo Service API consists of a single service which returns a message.
*
* API version: 1.0
* Contact: [email protected]
diff --git a/examples/internal/clients/unannotatedecho/model_rpc_status.go b/examples/internal/clients/unannotatedecho/model_rpc_status.go
index 1e8ae88..d97aeea 100644
--- a/examples/internal/clients/unannotatedecho/model_rpc_status.go
+++ b/examples/internal/clients/unannotatedecho/model_rpc_status.go
@@ -1,7 +1,7 @@
/*
* Unannotated Echo
*
- * Unannotated Echo Service Similar to echo_service.proto but without annotations. See unannotated_echo_service.yaml for the equivalent of the annotations in gRPC API configuration format. Echo Service API consists of a single service which returns a message.
+ * Unannotated Echo Service Similar to echo_service.proto but without annotations. See unannotated_echo_service.yaml for the equivalent of the annotations in gRPC API configuration format. Echo Service API consists of a single service which returns a message.
*
* API version: 1.0
* Contact: [email protected]
diff --git a/examples/internal/clients/unannotatedecho/response.go b/examples/internal/clients/unannotatedecho/response.go
index 65e6313..16ded8d 100644
--- a/examples/internal/clients/unannotatedecho/response.go
+++ b/examples/internal/clients/unannotatedecho/response.go
@@ -1,7 +1,7 @@
/*
* Unannotated Echo
*
- * Unannotated Echo Service Similar to echo_service.proto but without annotations. See unannotated_echo_service.yaml for the equivalent of the annotations in gRPC API configuration format. Echo Service API consists of a single service which returns a message.
+ * Unannotated Echo Service Similar to echo_service.proto but without annotations. See unannotated_echo_service.yaml for the equivalent of the annotations in gRPC API configuration format. Echo Service API consists of a single service which returns a message.
*
* API version: 1.0
* Contact: [email protected]
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 e238da7..2dc248e 100644
--- a/examples/internal/proto/examplepb/a_bit_of_everything.swagger.json
+++ b/examples/internal/proto/examplepb/a_bit_of_everything.swagger.json
@@ -1550,7 +1550,8 @@
},
"/v1/example/a_bit_of_everything/{floatValue}/{doubleValue}/{int64Value}/separator/{uint64Value}/{int32Value}/{fixed64Value}/{fixed32Value}/{boolValue}/{stringValue}/{uint32Value}/{sfixed32Value}/{sfixed64Value}/{sint32Value}/{sint64Value}/{nonConventionalNameValue}/{enumValue}/{pathEnumValue}/{nestedPathEnumValue}/{enumValueAnnotation}": {
"post": {
- "summary": "Create a new ABitOfEverything\r\n\r\nThis API creates a new ABitOfEverything",
+ "summary": "Create a new ABitOfEverything",
+ "description": "This API creates a new ABitOfEverything",
"operationId": "ABitOfEverythingService_Create",
"responses": {
"200": {
@@ -2501,14 +2502,14 @@
"parameters": [
{
"name": "book.name",
- "description": "The resource name of the book.\r\n\r\nFormat: `publishers/{publisher}/books/{book}`\r\n\r\nExample: `publishers/1257894000000000000/books/my-book`",
+ "description": "The resource name of the book.\n\nFormat: `publishers/{publisher}/books/{book}`\n\nExample: `publishers/1257894000000000000/books/my-book`",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "body",
- "description": "The book to update.\r\n\r\nThe book's `name` field is used to identify the book to be updated.\r\nFormat: publishers/{publisher}/books/{book}",
+ "description": "The book to update.\n\nThe book's `name` field is used to identify the book to be updated.\nFormat: publishers/{publisher}/books/{book}",
"in": "body",
"required": true,
"schema": {
@@ -2524,7 +2525,7 @@
},
{
"name": "allowMissing",
- "description": "If set to true, and the book is not found, a new book will be created.\r\nIn this situation, `update_mask` is ignored.",
+ "description": "If set to true, and the book is not found, a new book will be created.\nIn this situation, `update_mask` is ignored.",
"in": "query",
"required": false,
"type": "boolean"
@@ -2579,7 +2580,7 @@
"parameters": [
{
"name": "parent",
- "description": "The publisher in which to create the book.\r\n\r\nFormat: `publishers/{publisher}`\r\n\r\nExample: `publishers/1257894000000000000`",
+ "description": "The publisher in which to create the book.\n\nFormat: `publishers/{publisher}`\n\nExample: `publishers/1257894000000000000`",
"in": "path",
"required": true,
"type": "string"
@@ -2595,7 +2596,7 @@
},
{
"name": "bookId",
- "description": "The ID to use for the book.\r\n\r\nThis must start with an alphanumeric character.",
+ "description": "The ID to use for the book.\n\nThis must start with an alphanumeric character.",
"in": "query",
"required": false,
"type": "string"
@@ -3745,7 +3746,7 @@
"properties": {
"name": {
"type": "string",
- "title": "The resource name of the book.\r\n\r\nFormat: `publishers/{publisher}/books/{book}`\r\n\r\nExample: `publishers/1257894000000000000/books/my-book`"
+ "description": "The resource name of the book.\n\nFormat: `publishers/{publisher}/books/{book}`\n\nExample: `publishers/1257894000000000000/books/my-book`"
},
"id": {
"type": "string",
@@ -3759,7 +3760,7 @@
"readOnly": true
}
},
- "title": "An example resource type from AIP-123 used to test the behavior described in\r\nthe CreateBookRequest message.\r\n\r\nSee: https://google.aip.dev/123"
+ "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"
},
"examplepbCheckStatusResponse": {
"type": "object",
diff --git a/examples/internal/proto/examplepb/echo_service.swagger.json b/examples/internal/proto/examplepb/echo_service.swagger.json
index 0aac7a4..012bda3 100644
--- a/examples/internal/proto/examplepb/echo_service.swagger.json
+++ b/examples/internal/proto/examplepb/echo_service.swagger.json
@@ -1,8 +1,8 @@
{
"swagger": "2.0",
"info": {
- "title": "examples/internal/proto/examplepb/echo_service.proto",
- "description": "Echo Service\r\n\r\nEcho Service API consists of a single service which returns\r\na message.",
+ "title": "Echo Service",
+ "description": "Echo Service API consists of a single service which returns\na message.",
"version": "version not set"
},
"tags": [
@@ -19,7 +19,8 @@
"paths": {
"/v1/example/echo/{id}": {
"post": {
- "summary": "Echo method receives a simple message and returns it.\r\n\r\nThe message posted as the id parameter will also be\r\nreturned.",
+ "summary": "Echo method receives a simple message and returns it.",
+ "description": "The message posted as the id parameter will also be\nreturned.",
"operationId": "EchoService_Echo",
"responses": {
"200": {
@@ -51,7 +52,8 @@
},
"/v1/example/echo/{id}/{num}": {
"get": {
- "summary": "Echo method receives a simple message and returns it.\r\n\r\nThe message posted as the id parameter will also be\r\nreturned.",
+ "summary": "Echo method receives a simple message and returns it.",
+ "description": "The message posted as the id parameter will also be\nreturned.",
"operationId": "EchoService_Echo2",
"responses": {
"200": {
@@ -136,7 +138,8 @@
},
"/v1/example/echo/{id}/{num}/{lang}": {
"get": {
- "summary": "Echo method receives a simple message and returns it.\r\n\r\nThe message posted as the id parameter will also be\r\nreturned.",
+ "summary": "Echo method receives a simple message and returns it.",
+ "description": "The message posted as the id parameter will also be\nreturned.",
"operationId": "EchoService_Echo3",
"responses": {
"200": {
@@ -221,7 +224,8 @@
},
"/v1/example/echo1/{id}/{lineNum}/{status.note}": {
"get": {
- "summary": "Echo method receives a simple message and returns it.\r\n\r\nThe message posted as the id parameter will also be\r\nreturned.",
+ "summary": "Echo method receives a simple message and returns it.",
+ "description": "The message posted as the id parameter will also be\nreturned.",
"operationId": "EchoService_Echo4",
"responses": {
"200": {
@@ -300,7 +304,8 @@
},
"/v1/example/echo2/{no.note}": {
"get": {
- "summary": "Echo method receives a simple message and returns it.\r\n\r\nThe message posted as the id parameter will also be\r\nreturned.",
+ "summary": "Echo method receives a simple message and returns it.",
+ "description": "The message posted as the id parameter will also be\nreturned.",
"operationId": "EchoService_Echo5",
"responses": {
"200": {
@@ -546,7 +551,7 @@
"type": "object"
}
},
- "description": "DynamicMessage represents a message which can have its structure\r\nbuilt dynamically using Struct and Values."
+ "description": "DynamicMessage represents a message which can have its structure\nbuilt dynamically using Struct and Values."
},
"examplepbDynamicMessageUpdate": {
"type": "object",
diff --git a/examples/internal/proto/examplepb/generate_unbound_methods.swagger.json b/examples/internal/proto/examplepb/generate_unbound_methods.swagger.json
index b08bed7..b23bd6b 100644
--- a/examples/internal/proto/examplepb/generate_unbound_methods.swagger.json
+++ b/examples/internal/proto/examplepb/generate_unbound_methods.swagger.json
@@ -2,7 +2,7 @@
"swagger": "2.0",
"info": {
"title": "examples/internal/proto/examplepb/generate_unbound_methods.proto",
- "description": "Generate Unannotated Methods Echo Service\r\nSimilar to echo_service.proto but without annotations and without external configuration.\r\n\r\nGenerate Unannotated Methods Echo Service API consists of a single service which returns\r\na message.",
+ "description": "Generate Unannotated Methods Echo Service\nSimilar to echo_service.proto but without annotations and without external configuration.\n\nGenerate Unannotated Methods Echo Service API consists of a single service which returns\na message.",
"version": "version not set"
},
"tags": [
@@ -19,7 +19,8 @@
"paths": {
"/grpc.gateway.examples.internal.proto.examplepb.GenerateUnboundMethodsEchoService/Echo": {
"post": {
- "summary": "Echo method receives a simple message and returns it.\r\n\r\nThe message posted as the id parameter will also be\r\nreturned.",
+ "summary": "Echo method receives a simple message and returns it.",
+ "description": "The message posted as the id parameter will also be\nreturned.",
"operationId": "GenerateUnboundMethodsEchoService_Echo",
"responses": {
"200": {
diff --git a/examples/internal/proto/examplepb/openapi_merge.swagger.json b/examples/internal/proto/examplepb/openapi_merge.swagger.json
index be4716a..dbcaee8 100644
--- a/examples/internal/proto/examplepb/openapi_merge.swagger.json
+++ b/examples/internal/proto/examplepb/openapi_merge.swagger.json
@@ -1,8 +1,8 @@
{
"swagger": "2.0",
"info": {
- "title": "examples/internal/proto/examplepb/openapi_merge_a.proto",
- "description": "Merging Services\r\n\r\nThis is an example of merging two proto files.",
+ "title": "Merging Services",
+ "description": "This is an example of merging two proto files.",
"version": "version not set"
},
"tags": [
@@ -25,7 +25,8 @@
"paths": {
"/v1/example/a/1": {
"post": {
- "summary": "ServiceA.MethodOne receives InMessageA and returns OutMessageA\r\n\r\nHere is the detail explanation about ServiceA.MethodOne.",
+ "summary": "ServiceA.MethodOne receives InMessageA and returns OutMessageA",
+ "description": "Here is the detail explanation about ServiceA.MethodOne.",
"operationId": "ServiceA_MethodOne",
"responses": {
"200": {
@@ -58,7 +59,8 @@
},
"/v1/example/a/2": {
"post": {
- "summary": "ServiceA.MethodTwo receives OutMessageA and returns InMessageA\r\n\r\nHere is the detail explanation about ServiceA.MethodTwo.",
+ "summary": "ServiceA.MethodTwo receives OutMessageA and returns InMessageA",
+ "description": "Here is the detail explanation about ServiceA.MethodTwo.",
"operationId": "ServiceA_MethodTwo",
"responses": {
"200": {
@@ -91,7 +93,8 @@
},
"/v1/example/b/1": {
"post": {
- "summary": "ServiceB.MethodOne receives InMessageB and returns OutMessageB\r\n\r\nHere is the detail explanation about ServiceB.MethodOne.",
+ "summary": "ServiceB.MethodOne receives InMessageB and returns OutMessageB",
+ "description": "Here is the detail explanation about ServiceB.MethodOne.",
"operationId": "ServiceB_MethodOne",
"responses": {
"200": {
@@ -124,7 +127,8 @@
},
"/v1/example/b/2": {
"post": {
- "summary": "ServiceB.MethodTwo receives OutMessageB and returns InMessageB\r\n\r\nHere is the detail explanation about ServiceB.MethodTwo.",
+ "summary": "ServiceB.MethodTwo receives OutMessageB and returns InMessageB",
+ "description": "Here is the detail explanation about ServiceB.MethodTwo.",
"operationId": "ServiceB_MethodTwo",
"responses": {
"200": {
@@ -157,7 +161,8 @@
},
"/v1/example/c/1": {
"post": {
- "summary": "ServiceC.MethodOne receives InMessageA and returns OutMessageC\r\n\r\nHere is the detail explanation about ServiceC.MethodOne.",
+ "summary": "ServiceC.MethodOne receives InMessageA and returns OutMessageC",
+ "description": "Here is the detail explanation about ServiceC.MethodOne.",
"operationId": "ServiceC_MethodOne",
"responses": {
"200": {
@@ -190,7 +195,8 @@
},
"/v1/example/c/2": {
"post": {
- "summary": "ServiceC.MethodTwo receives OutMessageA and returns InMessageA\r\n\r\nHere is the detail explanation about ServiceC.MethodTwo.",
+ "summary": "ServiceC.MethodTwo receives OutMessageA and returns InMessageA",
+ "description": "Here is the detail explanation about ServiceC.MethodTwo.",
"operationId": "ServiceC_MethodTwo",
"responses": {
"200": {
diff --git a/examples/internal/proto/examplepb/openapi_merge_a.swagger.json b/examples/internal/proto/examplepb/openapi_merge_a.swagger.json
index 99d8470..1b85e70 100644
--- a/examples/internal/proto/examplepb/openapi_merge_a.swagger.json
+++ b/examples/internal/proto/examplepb/openapi_merge_a.swagger.json
@@ -1,8 +1,8 @@
{
"swagger": "2.0",
"info": {
- "title": "examples/internal/proto/examplepb/openapi_merge_a.proto",
- "description": "Merging Services\r\n\r\nThis is an example of merging two proto files.",
+ "title": "Merging Services",
+ "description": "This is an example of merging two proto files.",
"version": "version not set"
},
"tags": [
@@ -22,7 +22,8 @@
"paths": {
"/v1/example/a/1": {
"post": {
- "summary": "ServiceA.MethodOne receives InMessageA and returns OutMessageA\r\n\r\nHere is the detail explanation about ServiceA.MethodOne.",
+ "summary": "ServiceA.MethodOne receives InMessageA and returns OutMessageA",
+ "description": "Here is the detail explanation about ServiceA.MethodOne.",
"operationId": "ServiceA_MethodOne",
"responses": {
"200": {
@@ -55,7 +56,8 @@
},
"/v1/example/a/2": {
"post": {
- "summary": "ServiceA.MethodTwo receives OutMessageA and returns InMessageA\r\n\r\nHere is the detail explanation about ServiceA.MethodTwo.",
+ "summary": "ServiceA.MethodTwo receives OutMessageA and returns InMessageA",
+ "description": "Here is the detail explanation about ServiceA.MethodTwo.",
"operationId": "ServiceA_MethodTwo",
"responses": {
"200": {
@@ -88,7 +90,8 @@
},
"/v1/example/c/1": {
"post": {
- "summary": "ServiceC.MethodOne receives InMessageA and returns OutMessageC\r\n\r\nHere is the detail explanation about ServiceC.MethodOne.",
+ "summary": "ServiceC.MethodOne receives InMessageA and returns OutMessageC",
+ "description": "Here is the detail explanation about ServiceC.MethodOne.",
"operationId": "ServiceC_MethodOne",
"responses": {
"200": {
@@ -121,7 +124,8 @@
},
"/v1/example/c/2": {
"post": {
- "summary": "ServiceC.MethodTwo receives OutMessageA and returns InMessageA\r\n\r\nHere is the detail explanation about ServiceC.MethodTwo.",
+ "summary": "ServiceC.MethodTwo receives OutMessageA and returns InMessageA",
+ "description": "Here is the detail explanation about ServiceC.MethodTwo.",
"operationId": "ServiceC_MethodTwo",
"responses": {
"200": {
diff --git a/examples/internal/proto/examplepb/openapi_merge_b.swagger.json b/examples/internal/proto/examplepb/openapi_merge_b.swagger.json
index 57a28b2..49e6847 100644
--- a/examples/internal/proto/examplepb/openapi_merge_b.swagger.json
+++ b/examples/internal/proto/examplepb/openapi_merge_b.swagger.json
@@ -1,8 +1,8 @@
{
"swagger": "2.0",
"info": {
- "title": "examples/internal/proto/examplepb/openapi_merge_b.proto",
- "description": "Merging Services\r\n\r\nThis is an example of merging two proto files.",
+ "title": "Merging Services",
+ "description": "This is an example of merging two proto files.",
"version": "version not set"
},
"tags": [
@@ -19,7 +19,8 @@
"paths": {
"/v1/example/b/1": {
"post": {
- "summary": "ServiceB.MethodOne receives InMessageB and returns OutMessageB\r\n\r\nHere is the detail explanation about ServiceB.MethodOne.",
+ "summary": "ServiceB.MethodOne receives InMessageB and returns OutMessageB",
+ "description": "Here is the detail explanation about ServiceB.MethodOne.",
"operationId": "ServiceB_MethodOne",
"responses": {
"200": {
@@ -52,7 +53,8 @@
},
"/v1/example/b/2": {
"post": {
- "summary": "ServiceB.MethodTwo receives OutMessageB and returns InMessageB\r\n\r\nHere is the detail explanation about ServiceB.MethodTwo.",
+ "summary": "ServiceB.MethodTwo receives OutMessageB and returns InMessageB",
+ "description": "Here is the detail explanation about ServiceB.MethodTwo.",
"operationId": "ServiceB_MethodTwo",
"responses": {
"200": {
diff --git a/examples/internal/proto/examplepb/unannotated_echo_service.swagger.json b/examples/internal/proto/examplepb/unannotated_echo_service.swagger.json
index 9844cda..25c886d 100644
--- a/examples/internal/proto/examplepb/unannotated_echo_service.swagger.json
+++ b/examples/internal/proto/examplepb/unannotated_echo_service.swagger.json
@@ -2,7 +2,7 @@
"swagger": "2.0",
"info": {
"title": "Unannotated Echo",
- "description": "Unannotated Echo Service\r\nSimilar to echo_service.proto but without annotations. See\r\nunannotated_echo_service.yaml for the equivalent of the annotations in\r\ngRPC API configuration format.\r\n\r\nEcho Service API consists of a single service which returns\r\na message.",
+ "description": "Unannotated Echo Service\nSimilar to echo_service.proto but without annotations. See\nunannotated_echo_service.yaml for the equivalent of the annotations in\ngRPC API configuration format.\n\nEcho Service API consists of a single service which returns\na message.",
"version": "1.0",
"contact": {
"name": "gRPC-Gateway project",
diff --git a/examples/internal/proto/examplepb/use_go_template.swagger.json b/examples/internal/proto/examplepb/use_go_template.swagger.json
index 85e7104..90881b9 100644
--- a/examples/internal/proto/examplepb/use_go_template.swagger.json
+++ b/examples/internal/proto/examplepb/use_go_template.swagger.json
@@ -18,7 +18,8 @@
"paths": {
"/v1/example/login": {
"post": {
- "summary": "Login\r\n\r\nLogin is a call with the method(s) POST within the \"LoginService\" service.\r\nIt takes in \"LoginRequest\" and returns a \"LoginReply\".\r\n\r\n## LoginRequest\r\n| Field ID | Name | Type | Description |\r\n| ----------- | --------- | --------------------------------------------------------- | ---------------------------- | \r\n| 1 | username | TYPE_STRING | The entered username | \r\n| 2 | password | TYPE_STRING | The entered password | \r\n\r\n## LoginReply\r\n| Field ID | Name | Type | Description |\r\n| ----------- | --------- | ---------------------------------------------------------- | ---------------------------- | \r\n| 1 | message | TYPE_STRING | | \r\n| 2 | access | TYPE_BOOL | Whether you have access or not |",
+ "summary": "Login",
+ "description": "Login is a call with the method(s) POST within the \"LoginService\" service.\nIt takes in \"LoginRequest\" and returns a \"LoginReply\".\n\n## LoginRequest\n| Field ID | Name | Type | Description |\n| ----------- | --------- | --------------------------------------------------------- | ---------------------------- | \n| 1 | username | TYPE_STRING | The entered username | \n| 2 | password | TYPE_STRING | The entered password | \n\n## LoginReply\n| Field ID | Name | Type | Description |\n| ----------- | --------- | ---------------------------------------------------------- | ---------------------------- | \n| 1 | message | TYPE_STRING | | \n| 2 | access | TYPE_BOOL | Whether you have access or not |",
"operationId": "LoginService_Login",
"responses": {
"200": {
@@ -51,7 +52,8 @@
},
"/v1/example/logout": {
"post": {
- "summary": "Logout\r\n\r\nLogout is a call with the method(s) POST within the \"LoginService\" service.\r\nIt takes in \"LogoutRequest\" and returns a \"LogoutReply\".\r\n\r\n## LogoutRequest\r\n| Field ID | Name | Type | Description |\r\n| ----------- | --------- | --------------------------------------------------------- | ---------------------------- | \r\n| 1 | timeoflogout | TYPE_STRING | The time the logout was registered | \r\n| 2 | test | TYPE_INT32 | This is the title\r\u003cbr\u003e\r\u003cbr\u003eThis is the \"Description\" of field test\r\u003cbr\u003eyou can use as many newlines as you want\r\u003cbr\u003e\r\u003cbr\u003e\r\u003cbr\u003eit will still format the same in the table | \r\n| 3 | stringarray | []TYPE_STRING | This is an array\r\u003cbr\u003e\r\u003cbr\u003eIt displays that using [] infront of the type | \r\n\r\n## LogoutReply\r\n| Field ID | Name | Type | Description |\r\n| ----------- | --------- | ---------------------------------------------------------- | ---------------------------- | \r\n| 1 | message | TYPE_STRING | Message that tells you whether your\r\u003cbr\u003elogout was succesful or not |",
+ "summary": "Logout",
+ "description": "Logout is a call with the method(s) POST within the \"LoginService\" service.\nIt takes in \"LogoutRequest\" and returns a \"LogoutReply\".\n\n## LogoutRequest\n| Field ID | Name | Type | Description |\n| ----------- | --------- | --------------------------------------------------------- | ---------------------------- | \n| 1 | timeoflogout | TYPE_STRING | The time the logout was registered | \n| 2 | test | TYPE_INT32 | This is the title\u003cbr\u003e\u003cbr\u003eThis is the \"Description\" of field test\u003cbr\u003eyou can use as many newlines as you want\u003cbr\u003e\u003cbr\u003e\u003cbr\u003eit will still format the same in the table | \n| 3 | stringarray | []TYPE_STRING | This is an array\u003cbr\u003e\u003cbr\u003eIt displays that using [] infront of the type | \n\n## LogoutReply\n| Field ID | Name | Type | Description |\n| ----------- | --------- | ---------------------------------------------------------- | ---------------------------- | \n| 1 | message | TYPE_STRING | Message that tells you whether your\u003cbr\u003elogout was succesful or not |",
"operationId": "LoginService_Logout",
"responses": {
"200": {
@@ -114,7 +116,7 @@
"properties": {
"message": {
"type": "string",
- "title": "Message that tells you whether your\r\nlogout was succesful or not"
+ "title": "Message that tells you whether your\nlogout was succesful or not"
}
}
},
@@ -128,14 +130,16 @@
"test": {
"type": "integer",
"format": "int32",
- "title": "This is the title\r\n\r\nThis is the \"Description\" of field test\r\nyou can use as many newlines as you want\r\n\r\n\r\nit will still format the same in the table"
+ "description": "This is the \"Description\" of field test\nyou can use as many newlines as you want\n\n\nit will still format the same in the table",
+ "title": "This is the title"
},
"stringarray": {
"type": "array",
"items": {
"type": "string"
},
- "title": "This is an array\r\n\r\nIt displays that using [] infront of the type"
+ "description": "It displays that using [] infront of the type",
+ "title": "This is an array"
}
}
},
--
2.30.2 Again, |
All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the ℹ️ Googlers: Go here for more info. |
Thank you so much, that solved the issue. I think the only thing left is your consent in this pull request since you're the author of the patch. |
@googlebot I consent. |
Thanks for your contribution! |
References to other Issues or PRs
This PR is the updated version of the #1968, which fixes the issue discussed in #877.
Compatibility concerns: the existing
fqn_for_openapi_name
flag is deprecated by this change. It can still be used, but only if no value is specified for theopenapi_naming_strategy
flag. The old behavior withfqn_for_openapi_name=false
can be enabled viaopenapi_naming_strategy=legacy
(this is the default). The behavior withfqn_for_openapi_name=true
can be enabled viaopenapi_naming_strategy=fqn
.New feature: A
simple
naming strategy is introduced that determines the OpenAPI name by looking at the shortest non-empty suffix of the slice of name components (parts in the FQN separated by dots) that is unique, and then joins the elements in this suffix with a..
The previouslegacy
strategy would look at the shortest (possibly empty) suffix that is unique, then extend that suffix length by one, and join all components with no separator.Misc: Flags in the
main_test.go
weren't properly cleared. Clearing logic has been rewritten by using the flag default values as the source of truth.Have you read the Contributing Guidelines?
Yes
Brief description of what is fixed or changed
Provides three different options for generating the schema names.
Other comments
N/A