Skip to content

Commit e046c5c

Browse files
committed
added logging options
1 parent 6ed8a45 commit e046c5c

File tree

2 files changed

+593
-0
lines changed

2 files changed

+593
-0
lines changed
Lines changed: 150 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,150 @@
1+
##
2+
## mapping example with keys & values
3+
##
4+
5+
# mapping format [required]
6+
openapi-processor-mapping: v10
7+
8+
options: # general processor options [required]
9+
10+
# target package [required]: io.openapiprocessor.generated (default)
11+
package-name: io.openapiprocessor.generated
12+
13+
# validation annotation (optional): true or false (default), javax, jakarta.
14+
bean-validation: jakarta
15+
16+
# generate javadoc from OpenAPI 'description' properties.
17+
javadoc: true
18+
19+
# enable/disable code formatter: true (default) or false.
20+
format-code: false
21+
22+
# suffix for model class names and enum names. Default is none.
23+
model-name-suffix: Resource
24+
25+
# default (i.e pojo) or record
26+
model-type: default
27+
28+
# default, string, supplier
29+
enum-type: default
30+
31+
# generate common interface for an `oneOf` object list (optional): true or false (default)
32+
one-of-interface: true
33+
34+
# enable/disable deletion of targetDir: true (default) or false.
35+
clear-target-dir: false
36+
37+
# enable/disable @Generated annotation
38+
generated-annotation: true
39+
40+
# enable/disable date on @Generated annotation
41+
generated-date: true
42+
43+
# control @JsonProperty annotation (always|auto|never)
44+
json-property-annotation: always
45+
46+
# target-dir related configuration
47+
target-dir:
48+
clear: true
49+
layout: standard
50+
51+
# server-url related configuration
52+
base-path:
53+
# false, true = 0, 1, ..
54+
prefix: 0
55+
# property resource with the uri base path
56+
properties-name: openapi.properties
57+
58+
logging:
59+
mapping: true
60+
mapping-target: stdout
61+
62+
compatibility:
63+
bean-validation-valid-on-reactive: false
64+
identifier-word-break-from-digit-to-letter: false
65+
66+
map: # the type mappings
67+
68+
# global mappings, apply to all paths/endpoints
69+
70+
# response wrapper (optional)
71+
result: org.springframework.http.ResponseEntity
72+
73+
# result style (optional, default "success")
74+
result-style: all
75+
76+
# reactive single wrapper (optional)
77+
single: reactor.core.publisher.Mono
78+
79+
# reactive array wrapper (optional)
80+
multi: reactor.core.publisher.Flux
81+
82+
types: # global type mappings (optional)
83+
84+
- type: array => java.util.Collection
85+
86+
- type: Schema => java.util.Map
87+
generics:
88+
- java.lang.String
89+
- java.lang.Double
90+
91+
- type: Schema @ io.openapiprocessor.Annotation()
92+
93+
parameters: # global parameter mappings (optional)
94+
95+
- name: foo => java.util.List
96+
- name: bar => com.github.hauner.openapi.Bar
97+
- name: param @ io.openapiprocessor.Annotation()
98+
- type: Schema @ io.openapiprocessor.Annotation()
99+
100+
responses: # global response mappings (optional)
101+
102+
- content: application/vnd.something => java.util.List
103+
- content: application/json => com.github.hauner.openapi.FooBar
104+
105+
106+
paths: # path/endpoint specific mappings (optional)
107+
108+
/first: # a path/endpoint from the openapi.yaml
109+
110+
# generate endpoint to a separate "excluded" interface
111+
exclude: true
112+
113+
/second: # another path/endpoint from the openapi.yaml
114+
115+
# path mappings, allow the same mappings as on the global level (except the "paths" property)
116+
# all mappings apply only to the parent path overriding any matching global mapping
117+
118+
# override top level "result" property, "plain" means no wrapper
119+
result: plain
120+
single: reactor.core.publisher.Mono
121+
multi: reactor.core.publisher.Flux
122+
123+
types:
124+
- type: Schema => java.util.Collection
125+
126+
parameters:
127+
- name: foo => java.util.List
128+
- add: bar => java.util.Set
129+
- type: Schema @ io.openapiprocessor.Annotation()
130+
131+
responses:
132+
- content: application/vnd.any => java.util.Set
133+
- content: application/json => java.util.Map
134+
135+
/third:
136+
result: plain
137+
138+
# path mappings can be limited to a specific http method
139+
140+
patch:
141+
# path method mappings, allow the same mappings as on the global level (except the "paths" property)
142+
# all mappings apply only to the parent path and method overriding any matching global mapping
143+
144+
null: org.openapitools.jackson.nullable.JsonNullable = JsonNullable.undefined()
145+
146+
extensions:
147+
x-something: foo @ some.Annotation
148+
x-something-else:
149+
- foo @ some.custom.FooAnnotation
150+
- bar @ some.custom.BarAnnotation

0 commit comments

Comments
 (0)