joelittlejohn / jsonschema2pojo

Generate Java types from JSON or JSON Schema and annotate those types for data-binding with Jackson, Gson, etc

Home Page:http://www.jsonschema2pojo.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Empty <p> tag

RagGren opened this issue · comments

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).