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

Empty <p> tag #1580

Open
RagGren opened this issue Jan 5, 2024 · 0 comments
Open

Empty <p> tag #1580

RagGren opened this issue Jan 5, 2024 · 0 comments

Comments

@RagGren
Copy link

RagGren commented Jan 5, 2024

jsonschema2pojo creates empty <p> tags, if there is a title schema annotation but no further schema annotations.

TitleRule adds a <p> tag to the Javadoc always. If there is no further schema annotation, e.g. typically a description, the paragraph is empty. This causes a Javadoc Warning.

Maybe it would be better to add the <p> tag in the DescriptionRule though I fear this is inadequate and it must be added for other annotations/keywords/extension too (e.g. javaName, $comment, etc.).
Probably it might be better to write <p> tags only if really needed, e.g. if there is a title and a description, but it seems that this must be implemented in other classes, like PropertyRule (and others).

Even if it is good style to add both, a title and a description to the JSON Schema, it is also correct to have only one of both (or none of them).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant