Skip to content

Commit 3718d0a

Browse files
committed
add documentation (#268)
1 parent dc606ac commit 3718d0a

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

docs/modules/ROOT/pages/processor/configuration.adoc

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ A mapping yaml looks like this:
88

99
[source,yaml]
1010
----
11-
openapi-processor-mapping: v7
11+
openapi-processor-mapping: v8
1212
1313
options:
1414
package-name: io.openapiprocessor.sample
@@ -21,6 +21,7 @@ options:
2121
format-code: true
2222
javadoc: true
2323
clear-target-dir: false
24+
json-property-annotation: always
2425
2526
compatibility:
2627
bean-validation-valid-on-reactive: false
@@ -64,6 +65,12 @@ With the [.badge .badge-since]+2023.1+ releases this key allows two new values t
6465

6566
* `clear-target-dir` (**optional**, `true` or `false`) enable or disable clearing of the `targetDir` when the processor is writing the generated files. Default is `true`.
6667

68+
* `json-property-annotation` (**optional**, `always`, `auto`, `never`) control generation of `@JsonProperty` annotation. Default is `always`.
69+
+
70+
** `always`: adds `@JsonProperty` to all schema property
71+
** `auto`: adds `@JsonProperty` only if it is required because the property name is no valid java identifier or the property is defined as `readOnly`/`writeOnly` in the OpenAPI description
72+
** `never`: never adds `@JsonProperty` to a schema property. NOTE: this may produce invalid code if the property name is not a valid java identifier.
73+
6774
[#_model_name_suffix]
6875
=== model name suffix:
6976

0 commit comments

Comments
 (0)