Skip to content

Commit

Permalink
Conform to google-java-format when generating JavaDoc for classes (#…
Browse files Browse the repository at this point in the history
…194)

The generated JavaDoc for `record` classes would not always conform to
`google-java-format`. When a `record` was not `@deprecated`, there would
be no empty line between the description and the `@param`s. This has
been solved, so that there is always an empty line between the
description and deprecation/parameters.
  • Loading branch information
Chrimle authored Oct 25, 2024
1 parent e088fa1 commit 4cf7078
Show file tree
Hide file tree
Showing 82 changed files with 134 additions and 84 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ The mustache templates can be acquired through multiple ways.
<dependency>
<groupId>io.github.chrimle</groupId>
<artifactId>openapi-to-java-records-mustache-templates</artifactId>
<version>1.11.0</version>
<version>1.11.1</version>
</dependency>
```

Expand Down
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ The mustache templates can be acquired through multiple ways.
<dependency>
<groupId>io.github.chrimle</groupId>
<artifactId>openapi-to-java-records-mustache-templates</artifactId>
<version>1.11.0</version>
<version>1.11.1</version>
</dependency>
```

Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<groupId>io.github.chrimle</groupId>
<artifactId>openapi-to-java-records-mustache-templates</artifactId>
<version>1.11.0</version>
<version>1.11.1</version>

<!-- Project Information -->
<name>OpenAPI to Java records :: Mustache Templates</name>
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/templates/generateBuilders.mustache
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{{!
Source: openapi-to-java-records-mustache-templates
Version: 1.11.0
Version: 1.11.1
Enabled via configOptions.generateBuilders=true
Expand Down
8 changes: 5 additions & 3 deletions src/main/resources/templates/javadoc.mustache
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
{{!
Source: openapi-to-java-records-mustache-templates
Version: 1.11.0
Version: 1.11.1
This template is optional, and does not override an existing template.
}}/**
* {{description}}{{^description}}{{classname}}{{/description}}{{#isDeprecated}}
*
* @deprecated{{/isDeprecated}}{{#vars}}
* @param {{name}} {{description}}{{^description}}{{{datatypeWithEnum}}}{{/description}}{{/vars}}
* @deprecated{{/isDeprecated}}{{#vars}}{{#-first}}{{^isDeprecated}}
*{{/isDeprecated}}{{/-first}}
* @param {{name}} {{description}}{{^description}}{{{datatypeWithEnum}}}{{/description}}{{!
}}{{/vars}}
*/
2 changes: 1 addition & 1 deletion src/main/resources/templates/licenseInfo.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
* openapi-to-java-records-mustache-templates. For further information,
* questions, requesting features or reporting issues, please visit:
* https://github.com/Chrimle/openapi-to-java-records-mustache-templates.
* Generated with Version: 1.11.0
* Generated with Version: 1.11.1
*
*/
2 changes: 1 addition & 1 deletion src/main/resources/templates/modelEnum.mustache
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{{!
Source: openapi-to-java-records-mustache-templates
Version: 1.11.0
Version: 1.11.1
Required mustache templates (generation will fail without them):
- `deprecation.mustache`
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/templates/pojo.mustache
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{{!
Source: openapi-to-java-records-mustache-templates
Version: 1.11.0
Version: 1.11.1
Required imports:
- none
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/templates/serializableModel.mustache
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{{!
Source: openapi-to-java-records-mustache-templates
Version: 1.11.0
Version: 1.11.1
Enabled via configOptions.serializableModel=true
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/templates/useBeanValidation.mustache
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{{!
Source: openapi-to-java-records-mustache-templates
Version: 1.11.0
Version: 1.11.1
Enabled via configOption.useBeanValidation=true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* openapi-to-java-records-mustache-templates. For further information,
* questions, requesting features or reporting issues, please visit:
* https://github.com/Chrimle/openapi-to-java-records-mustache-templates.
* Generated with Version: 1.11.0
* Generated with Version: 1.11.1
*
*/

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* openapi-to-java-records-mustache-templates. For further information,
* questions, requesting features or reporting issues, please visit:
* https://github.com/Chrimle/openapi-to-java-records-mustache-templates.
* Generated with Version: 1.11.0
* Generated with Version: 1.11.1
*
*/

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* openapi-to-java-records-mustache-templates. For further information,
* questions, requesting features or reporting issues, please visit:
* https://github.com/Chrimle/openapi-to-java-records-mustache-templates.
* Generated with Version: 1.11.0
* Generated with Version: 1.11.1
*
*/

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* openapi-to-java-records-mustache-templates. For further information,
* questions, requesting features or reporting issues, please visit:
* https://github.com/Chrimle/openapi-to-java-records-mustache-templates.
* Generated with Version: 1.11.0
* Generated with Version: 1.11.1
*
*/

Expand All @@ -29,6 +29,7 @@

/**
* Example of a Record
*
* @param field1 a boolean field
*/
public record ExampleRecord(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* openapi-to-java-records-mustache-templates. For further information,
* questions, requesting features or reporting issues, please visit:
* https://github.com/Chrimle/openapi-to-java-records-mustache-templates.
* Generated with Version: 1.11.0
* Generated with Version: 1.11.1
*
*/

Expand All @@ -29,6 +29,7 @@

/**
* Example of a Record with default fields
*
* @param field1 a String field with a default value
*/
public record ExampleRecordWithDefaultFields(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* openapi-to-java-records-mustache-templates. For further information,
* questions, requesting features or reporting issues, please visit:
* https://github.com/Chrimle/openapi-to-java-records-mustache-templates.
* Generated with Version: 1.11.0
* Generated with Version: 1.11.1
*
*/

Expand All @@ -34,6 +34,7 @@

/**
* Example of a Record with fields of each type
*
* @param field1 a Boolean field
* @param field2 a String field
* @param field3 an Integer field
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* openapi-to-java-records-mustache-templates. For further information,
* questions, requesting features or reporting issues, please visit:
* https://github.com/Chrimle/openapi-to-java-records-mustache-templates.
* Generated with Version: 1.11.0
* Generated with Version: 1.11.1
*
*/

Expand All @@ -36,6 +36,7 @@

/**
* Example of a Record with fields of each type
*
* @param field1 a Boolean field
* @param field2 a String field
* @param field3 an Integer field
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* openapi-to-java-records-mustache-templates. For further information,
* questions, requesting features or reporting issues, please visit:
* https://github.com/Chrimle/openapi-to-java-records-mustache-templates.
* Generated with Version: 1.11.0
* Generated with Version: 1.11.1
*
*/

Expand All @@ -33,6 +33,7 @@

/**
* Example of a Record which has fields with constraints
*
* @param stringStandard String
* @param stringDefault String
* @param stringNullable String
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* openapi-to-java-records-mustache-templates. For further information,
* questions, requesting features or reporting issues, please visit:
* https://github.com/Chrimle/openapi-to-java-records-mustache-templates.
* Generated with Version: 1.11.0
* Generated with Version: 1.11.1
*
*/

Expand All @@ -29,6 +29,7 @@

/**
* Example of a Record with inner enum classes
*
* @param exampleInner Example of an inner enum class
* @param exampleInnerTwo Example of another inner enum class
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* openapi-to-java-records-mustache-templates. For further information,
* questions, requesting features or reporting issues, please visit:
* https://github.com/Chrimle/openapi-to-java-records-mustache-templates.
* Generated with Version: 1.11.0
* Generated with Version: 1.11.1
*
*/

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* openapi-to-java-records-mustache-templates. For further information,
* questions, requesting features or reporting issues, please visit:
* https://github.com/Chrimle/openapi-to-java-records-mustache-templates.
* Generated with Version: 1.11.0
* Generated with Version: 1.11.1
*
*/

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* openapi-to-java-records-mustache-templates. For further information,
* questions, requesting features or reporting issues, please visit:
* https://github.com/Chrimle/openapi-to-java-records-mustache-templates.
* Generated with Version: 1.11.0
* Generated with Version: 1.11.1
*
*/

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* openapi-to-java-records-mustache-templates. For further information,
* questions, requesting features or reporting issues, please visit:
* https://github.com/Chrimle/openapi-to-java-records-mustache-templates.
* Generated with Version: 1.11.0
* Generated with Version: 1.11.1
*
*/

Expand All @@ -29,6 +29,7 @@

/**
* Example of a Record
*
* @param field1 a boolean field
*/
@com.chrimle.example.annotations.TestAnnotationOne
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* openapi-to-java-records-mustache-templates. For further information,
* questions, requesting features or reporting issues, please visit:
* https://github.com/Chrimle/openapi-to-java-records-mustache-templates.
* Generated with Version: 1.11.0
* Generated with Version: 1.11.1
*
*/

Expand All @@ -29,6 +29,7 @@

/**
* Example of a Record with default fields
*
* @param field1 a String field with a default value
*/
@com.chrimle.example.annotations.TestAnnotationOne
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* openapi-to-java-records-mustache-templates. For further information,
* questions, requesting features or reporting issues, please visit:
* https://github.com/Chrimle/openapi-to-java-records-mustache-templates.
* Generated with Version: 1.11.0
* Generated with Version: 1.11.1
*
*/

Expand All @@ -34,6 +34,7 @@

/**
* Example of a Record with fields of each type
*
* @param field1 a Boolean field
* @param field2 a String field
* @param field3 an Integer field
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* openapi-to-java-records-mustache-templates. For further information,
* questions, requesting features or reporting issues, please visit:
* https://github.com/Chrimle/openapi-to-java-records-mustache-templates.
* Generated with Version: 1.11.0
* Generated with Version: 1.11.1
*
*/

Expand All @@ -36,6 +36,7 @@

/**
* Example of a Record with fields of each type
*
* @param field1 a Boolean field
* @param field2 a String field
* @param field3 an Integer field
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* openapi-to-java-records-mustache-templates. For further information,
* questions, requesting features or reporting issues, please visit:
* https://github.com/Chrimle/openapi-to-java-records-mustache-templates.
* Generated with Version: 1.11.0
* Generated with Version: 1.11.1
*
*/

Expand All @@ -33,6 +33,7 @@

/**
* Example of a Record which has fields with constraints
*
* @param stringStandard String
* @param stringDefault String
* @param stringNullable String
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* openapi-to-java-records-mustache-templates. For further information,
* questions, requesting features or reporting issues, please visit:
* https://github.com/Chrimle/openapi-to-java-records-mustache-templates.
* Generated with Version: 1.11.0
* Generated with Version: 1.11.1
*
*/

Expand All @@ -29,6 +29,7 @@

/**
* Example of a Record with inner enum classes
*
* @param exampleInner Example of an inner enum class
* @param exampleInnerTwo Example of another inner enum class
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* openapi-to-java-records-mustache-templates. For further information,
* questions, requesting features or reporting issues, please visit:
* https://github.com/Chrimle/openapi-to-java-records-mustache-templates.
* Generated with Version: 1.11.0
* Generated with Version: 1.11.1
*
*/

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* openapi-to-java-records-mustache-templates. For further information,
* questions, requesting features or reporting issues, please visit:
* https://github.com/Chrimle/openapi-to-java-records-mustache-templates.
* Generated with Version: 1.11.0
* Generated with Version: 1.11.1
*
*/

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* openapi-to-java-records-mustache-templates. For further information,
* questions, requesting features or reporting issues, please visit:
* https://github.com/Chrimle/openapi-to-java-records-mustache-templates.
* Generated with Version: 1.11.0
* Generated with Version: 1.11.1
*
*/

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* openapi-to-java-records-mustache-templates. For further information,
* questions, requesting features or reporting issues, please visit:
* https://github.com/Chrimle/openapi-to-java-records-mustache-templates.
* Generated with Version: 1.11.0
* Generated with Version: 1.11.1
*
*/

Expand All @@ -29,6 +29,7 @@

/**
* Example of a Record
*
* @param field1 a boolean field
*/
public record ExampleRecord(
Expand Down
Loading

0 comments on commit 4cf7078

Please sign in to comment.