Skip to content

[Protobuf-Schema] Add enum as model support#10868

Merged
wing328 merged 9 commits intoOpenAPITools:masterfrom
Yurzel:protobuf-model-enum
Nov 22, 2021
Merged

[Protobuf-Schema] Add enum as model support#10868
wing328 merged 9 commits intoOpenAPITools:masterfrom
Yurzel:protobuf-model-enum

Conversation

@Yurzel
Copy link
Copy Markdown
Contributor

@Yurzel Yurzel commented Nov 16, 2021

resolves #10867

Resources:

  • Added enum.mustache
  • Partial render to model.mustache.

Codegen

  • Add "protobuf-enum-index" to enumVars in model aswell (needed for field numbers)
  • Set ClassName to match the enumName when used as CodegenProperty

@Yurzel
Copy link
Copy Markdown
Contributor Author

Yurzel commented Nov 18, 2021

Had to revert ClassName modification, because name didn't match the reference in message. Model inside postProcessOperationsWithModels doesn't have isEnum set to true so I decided to go this way.

@wing328
Copy link
Copy Markdown
Member

wing328 commented Nov 20, 2021

Thanks for the PR but your commit (as shown in the Commits tab) is not linked to your Github account, which means this PR won't count as your contribution in https://github.com/OpenAPITools/openapi-generator/graphs/contributors.

Let me know if you need help fixing it.

Ref: https://github.com/OpenAPITools/openapi-generator/wiki/FAQ#how-can-i-update-commits-that-are-not-linked-to-my-github-account

@Yurzel
Copy link
Copy Markdown
Contributor Author

Yurzel commented Nov 20, 2021

Thanks for the PR but your commit (as shown in the Commits tab) is not linked to your Github account, which means this PR won't count as your contribution in https://github.com/OpenAPITools/openapi-generator/graphs/contributors.

Let me know if you need help fixing it.

Ref: https://github.com/OpenAPITools/openapi-generator/wiki/FAQ#how-can-i-update-commits-that-are-not-linked-to-my-github-account

Thanks for the info. I hope I did it properly. Did it for the other branches aswell. #10892 and #10893.

@wing328
Copy link
Copy Markdown
Member

wing328 commented Nov 22, 2021

LGTM.

@wing328 wing328 merged commit fdea71b into OpenAPITools:master Nov 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[REQ][Protobuf-Schema] Enum as model support

2 participants