-
-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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
[cpp-pistache-server] Enumerations not generated #1317
Labels
Comments
4 tasks
Generator still generates enums the same way (a class with no members). Is there any chance that this issue will ever be fixed ? |
Hi, What is it that needed to fix and reopen and merge this PR? I will help if need. Thanks a lot. |
mfyuce
pushed a commit
to mfyuce/openapi-generator
that referenced
this issue
Jun 16, 2021
…ing enum code generation; * A class that has an `anyOf` specification, in cpp side will have no members: in stead it should have a member having the type `classname_anyOf` * Thus, Its `==` operator is not present or wrongly filled * An string enum, should have a better usage, hence the `setEnumValue` * this PR, is a brigde between `stringenumclassname_anyOf` and `stringenumclassname` * `anyOf` specification is not just about `Enums`, so a better handling is needed from mustache templates, hence new template model parameter `isStringEnumContainer`
wing328
pushed a commit
that referenced
this issue
Jun 20, 2021
…e generation (#9786) * Continuing from #1317 and its PRs for pistache server string enum code generation; * A class that has an `anyOf` specification, in cpp side will have no members: in stead it should have a member having the type `classname_anyOf` * Thus, Its `==` operator is not present or wrongly filled * An string enum, should have a better usage, hence the `setEnumValue` * this PR, is a brigde between `stringenumclassname_anyOf` and `stringenumclassname` * `anyOf` specification is not just about `Enums`, so a better handling is needed from mustache templates, hence new template model parameter `isStringEnumContainer` * PR fix: muttleyxd: `double semicolon` * PR fix: wing328: `I think std::string is C++ only. What about adding x-is-string-enum-container instead in the postProcessModel operation in the C++ pistache server generator?` * PR fix: wing328: `I think std::string is C++ only...` after fix get latest codes and then generate samples Co-authored-by: Mehmet Fatih <[email protected]>
2 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
Currently the enumeration definition below generates a class with no members. The attached file archive.zip contains a complete definition (with several enumerations) that demonstrate this problem.
Archive.zip
openapi-generator version
v 3.3.0
OpenAPI declaration file content or url
Command line used for generation
java -jar /home/brian/code/git/openapi-generator/modules/openapi-generator-cli/target/openapi-generator-cli.jar generate -i updated/TS29122_MonitoringEvent.yaml -g cpp-pistache-server --config config -o ./code/MonitoringEvent/server/cpp-pistache-server
Steps to reproduce
Related issues/PRs
Suggest a fix/enhancement
The attached file SupportedGADShapes.zip contains the .h and .cpp definitions for the enumeration.
Note that an enumeration named "INVALID" has been added in the header and is used when no default is specified.
SupportedGADShapes.cpp-pistache-server.zip
The text was updated successfully, but these errors were encountered: