You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/modules/ROOT/pages/processor/configuration.adoc
+25-9Lines changed: 25 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,6 @@
1
1
= Configuration
2
2
:toc:
3
+
:toclevels: 4
3
4
include::partial$links.adoc[]
4
5
include::partial$vars.adoc[]
5
6
@@ -66,7 +67,7 @@ Interfaces and models will be generated into the `api` and `model` subpackages o
66
67
* the final package name of the generated interfaces will be `"$\{package-name\}.api"`,
67
68
* and the final package name of the generated models will be `"$\{package-name\}.model"`
68
69
69
-
==== example
70
+
*example*
70
71
71
72
[source,yaml,subs=attributes+]
72
73
----
@@ -127,7 +128,7 @@ Usually you will separate the classes by putting them in different packages. Thi
127
128
128
129
If a schema name from the OpenAPI description already ends with the `model-name-suffix`, the processor will **not** append the suffix. This allows migrating an existing api with a suffix in the API to `model-name-suffix` step by step.
129
130
130
-
==== example
131
+
*example*
131
132
132
133
*OpenAPI*
133
134
[source,yaml]
@@ -209,7 +210,7 @@ public class BarResource { // <2>
209
210
210
211
generate pojos (class with get/set property methods) or records model classes from OpenAPI schemas. This is a global setting in the `mapping.yaml`. It can either have the value `default` (which is default) to generate pojos or `record` to generate records.
211
212
212
-
==== example
213
+
*example*
213
214
214
215
*mapping.yaml*
215
216
[source,yaml,subs=attributes+]
@@ -264,7 +265,7 @@ public class Foo {
264
265
}
265
266
----
266
267
267
-
=== model-accessors ([.badge .badge-since]+new with 2025.1+)
268
+
=== model-accessors
268
269
269
270
**optional** (boolean, `true` or `false`, default is `true`)
270
271
@@ -273,7 +274,7 @@ enables or disables generation of accessor methods, i.e., getter and setter. The
273
274
[NOTE]
274
275
This is only used with `model-type: default`. It is ignored with `model-type: record`.
275
276
276
-
==== example
277
+
*example*
277
278
278
279
Here is a small example that uses object annotation mapping to add the lombok getter and setter annotations to the generated class.
279
280
@@ -359,7 +360,7 @@ selects the Jackson version, i.e., which package-name is used.
359
360
360
361
enables generation of JavaDoc comments from the OpenAPI `description` s on the API interfaces and model pojos.
361
362
362
-
=== format-code ([.badge .badge-since]+updated with 2025.1+)
363
+
=== format-code
363
364
364
365
// [.badge .badge-since]+changed with 2025.1+
365
366
@@ -385,7 +386,7 @@ In case of `google` (or `true`) see also xref:oap::jdk.adoc[JDK 16+].
385
386
386
387
enables generation of marker interfaces for `oneOf` objects. See xref:processor/one-of-interface.adoc#_marker_interfaces[oneOf marker interfaces].
387
388
388
-
=== response-interface ([.badge .badge-since]+new with 2025.2+)
389
+
=== response-interface
389
390
390
391
**optional** (boolean, `true` or `false`, default is `false`)
391
392
@@ -438,7 +439,7 @@ The other two can be used if `default` does not work.This is described in more d
438
439
439
440
*`framework`* does generate a slightly different enum classes than `default` and a Spring `ConverterFactory` that can deserialize incoming values to proper enum values.
440
441
441
-
==== example
442
+
*example*
442
443
443
444
*mapping.yaml*
444
445
[source,yaml,subs=attributes+]
@@ -512,7 +513,7 @@ this controls if the `targetDir` is the source root folder or if there is anothe
512
513
| \--- model
513
514
\--- resources
514
515
515
-
==== example
516
+
*example*
516
517
517
518
[source,yaml,subs=attributes+]
518
519
----
@@ -523,6 +524,21 @@ options:
523
524
layout: standard
524
525
----
525
526
527
+
=== spring
528
+
529
+
The parent key to group Spring specific options.
530
+
531
+
[NOTE]
532
+
to benefit from editing support in IntelliJ make sure you use `openapi-processor-spring` instead of `openapi-processor-mapping` with the appropriate version.
533
+
534
+
==== annotations ([.badge .badge-since]+new with 2026.3+)
535
+
536
+
**optional** (string, `mapping` or `exchange`, default is `mapping`)
537
+
538
+
Select the Spring annotation family, either `mapping` for `@RequestMapping` based annotations or `exchange` for `@HttpExchange` based annotations.
539
+
540
+
See xref:processor/annotations.adoc[].
541
+
526
542
== annotation-targets: ([.badge .badge-since]+new with 2025.6+)
527
543
528
544
This section is used to configure the *allowed* targets of an annotation. This is like `java.lang.annotation.Target` which is used to define at which places an annotation can be used. On a type, field, method or property etc.
0 commit comments