Add Javadoc to constructors parameters for properties that have title/description/$comment#1481
Conversation
|
I know I recommended this, but I think with this change we will see a new javadoc warning: For any argument that doesn't have So we get a warning for no param, and we get a warning for param without description. So we're a bit stuck if we don't have a description 🤔 Making up some junk (like |
|
I've been thinking about it and couldn't come up with any "ideal" solutions, so far following "ideas" where on the table:
|
|
On reflection I think the way you have implemented this is correct. We should omit any param that has no description. If you see a warning telling you that you have not documented some parameters, then this warning is accurate, and you can fix it by documenting the parameter (add title and/or description). |
|
For a moment I've thought that people might start complaining about schema being an external to their project and them being unable/not allowed to modify it. |
jsonschema2pojo-core/src/main/java/org/jsonschema2pojo/rules/ConstructorRule.java
Outdated
Show resolved
Hide resolved
jsonschema2pojo-core/src/main/java/org/jsonschema2pojo/rules/ConstructorRule.java
Outdated
Show resolved
Hide resolved
jsonschema2pojo-core/src/main/java/org/jsonschema2pojo/rules/ConstructorRule.java
Outdated
Show resolved
Hide resolved
|
@unkish This is the last one for 1.2.0 I think. Could you rebase and I will merge? |
|
An observation not related to given task. However configuration is defined as:and setTargetVersion accepts JsonSchemaExtension (which is a implementation of GenerationConfig)Is gradle doing some trickery that this won't be failing in runtime ? UPD: Probably is fine as |
Add Javadoc to constructors parameters which have corresponding documented properties.
Properties that are not documented (do not have
titleordescription) won't be added to constructors Javadoc.Following format will be used:
Closes #1463