-
Notifications
You must be signed in to change notification settings - Fork 1.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
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. Line 56 in 02d6017
However configuration is defined as:Line 34 in 02d6017
and setTargetVersion accepts JsonSchemaExtension (which is a implementation of GenerationConfig )Line 85 in 02d6017
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
title
ordescription
) won't be added to constructors Javadoc.Following format will be used:
Closes #1463