We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Enums defined at the root level do not support titles or descriptions.
{ "type" : "string", "title": "MyEnumTitle", "description": "Some description of my enum.", "enum" : ["one", "secondOne", "3rd one"] }
The above json does not cause either the title or description to be created for the enum. However, the following does generate docs:
{ "type" : "object", "properties" : { "myEnum" : { "title": "MyEnumTitle", "description": "Some description of my enum.", "type" : "string", "enum" : ["one", "secondOne", "3rd one"] } } }
This appears to be because enums are treated differently to objects: they do not apply the TitleRule or Description rule (https://github.com/joelittlejohn/jsonschema2pojo/blob/master/jsonschema2pojo-core/src/main/java/org/jsonschema2pojo/rules/EnumRule.java#L100).
The text was updated successfully, but these errors were encountered:
Fix joelittlejohn#975: Add support for root level enum titles and des…
ecd7b09
…criptions.
Merge branches 'joelittlejohn#975-add-enum-documentation' and 'master…
7592ecf
…' of github.com:john-tipper/jsonschema2pojo into joelittlejohn#975-add-enum-documentation
9123019
Merge pull request #1 from joelittlejohn/master
27c4e16
Fix joelittlejohn#975: Add support for root level enum titles and descriptions. (#…
No branches or pull requests
Enums defined at the root level do not support titles or descriptions.
The above json does not cause either the title or description to be created for the enum. However, the following does generate docs:
This appears to be because enums are treated differently to objects: they do not apply the TitleRule or Description rule (https://github.com/joelittlejohn/jsonschema2pojo/blob/master/jsonschema2pojo-core/src/main/java/org/jsonschema2pojo/rules/EnumRule.java#L100).
The text was updated successfully, but these errors were encountered: