Bug Report Checklist
Description
I want to use openapi-generator to generate Protocol Buffer definitions.
The files are generated, but the field numbers in the models are very high. F.ex:
message User {
int64 id = 3355;
string username = 265713450;
string firstName = 132835675;
openapi-generator version
openapitools/openapi-generator-cli:latest
OpenAPI declaration file content or url
I used the petstore.yaml from this reository.
Generation Details
docker run --rm \
-v ${PWD}:/local openapitools/openapi-generator-cli:latest generate \
-i /local/petstore.yaml \
-g protobuf-schema \
-o /local/out
Steps to reproduce
- Get the Yaml spec above
- Run the generation command above
- See the generated Proto Files in
./out
Suggest a fix
I expect to have model field numbers starting from 1 onwards for messages. Taking the output from above, I expect:
message User {
int64 id = 1;
string username = 2;
string firstName = 3;
See: https://developers.google.com/protocol-buffers/docs/overview#assigning_field_numbers
Bug Report Checklist
Description
I want to use openapi-generator to generate Protocol Buffer definitions.
The files are generated, but the field numbers in the models are very high. F.ex:
openapi-generator version
openapitools/openapi-generator-cli:latest
OpenAPI declaration file content or url
I used the petstore.yaml from this reository.
Generation Details
Steps to reproduce
./outSuggest a fix
I expect to have model field numbers starting from 1 onwards for messages. Taking the output from above, I expect:
See: https://developers.google.com/protocol-buffers/docs/overview#assigning_field_numbers