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
*openapi-processor-spring* is an link:{openapi}[OpenAPI] interface & model java code generator
17
+
*openapi-processor-spring* is an link:{openapi}[OpenAPI] interface & dto java code generator
18
18
for link:{springboot}[Spring Boot].
19
19
20
20
It supports an approach where you explicitly define and document your Service API (using OpenAPI)
@@ -28,10 +28,7 @@ and keep the overview.
28
28
* it is easy to document in plain text. You can use markdown in the OpenAPI `description`
29
29
properties.
30
30
31
-
The processor generates java interfaces based on the endpoint description of the API and simple POJO
32
-
classes for parameter or response objects defined in the API. The processor adds all the required
33
-
spring & jackson annotations to the interface and all that is left to *you* is the implementation
34
-
of the generated interfaces in any way you like.
31
+
The processor generates java interfaces based on the endpoint description of the API and simple POJO classes or records for parameter or response schemas defined in the API. The processor adds all the required spring & jackson annotations to the interface and all that is left to *you* is the implementation of the generated interfaces in any way you like.
35
32
36
33
The interfaces will help to keep the implementation in sync with the API. If anything relevant
37
34
changes in the API the interface changes and the compiler will warn that the interface is not
@@ -48,23 +45,15 @@ out some samples, or your own yaml and view the code that the processor generate
48
45
49
46
== Features
50
47
51
-
- generates **only java interfaces and java model classes** (get/set POJOs) for all defined endpoints
52
-
and schemas to allow full control of the endpoint implementation. It does not generate any other
53
-
file. See xref:processor/index.adoc[processor].
48
+
- generates **only java interfaces and java dto classes** (get/set POJOs or records) for all defined endpoints and schemas to allow full control of the endpoint implementation. It does not generate any other file. See xref:processor/index.adoc[processor].
54
49
55
-
- **powerful type mappings with generic support** (one level) to map schemas defined in the openapi.yaml
56
-
to existing java types.
50
+
- **powerful type mappings with generic support** to map schemas defined in the openapi.yaml to existing java types.
57
51
+
58
-
For example to map the openapi `array` type to a different java collections or to map paging
59
-
parameters and results to th Spring types like `Page<>` & `Pageable`.
52
+
For example to map the openapi `array` type to a different java collections or to map paging parameters and results to th Spring types like `Page<>` & `Pageable`.
60
53
+
61
54
mappings can be defined globally, for a specific response, parameter or endpoint and or http method (of an endpoint). See xref:mapping/index.adoc[type mapping].
62
55
63
-
- Annotation based **WebFlux support**. Actually there is *no* explicit WebFlux support, but the mapping
64
-
allows defining a *single*, and a *multi* wrapper class. *single* wraps non-array like result types
65
-
(e.g. `Mono<>`). *multi* replaces array like result types or parameters with the given multi mapping.
66
-
For example, it will replace `List<String>` with `Flux<String>` if the multi mapping contains the
67
-
fully qualified `Flux` type. +
56
+
- Annotation based **WebFlux support**. Actually there is *no* explicit WebFlux support, but the mapping allows defining a *single*, and a *multi* wrapper class. *single* wraps non-array like result types(e.g. `Mono<>`). *multi* replaces array like result types or parameters with the given multi mapping. For example, it will replace `List<String>` with `Flux<String>` if the multi mapping contains the fully qualified `Flux` type. +
0 commit comments