Skip to content
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

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

Merged
merged 9 commits into from
Nov 22, 2021

Conversation

Yurzel
Copy link
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
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
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
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
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