File tree 1 file changed +10
-2
lines changed
src/main/java/io/dinject/javalin/generator/openapi 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -65,7 +65,11 @@ private OpenAPI initOpenAPI() {
65
65
66
66
OpenAPI openAPI = new OpenAPI ();
67
67
openAPI .setPaths (new Paths ());
68
- openAPI .setInfo (new Info ());
68
+
69
+ Info info = new Info ();
70
+ info .setTitle ("" );
71
+ info .setVersion ("" );
72
+ openAPI .setInfo (info );
69
73
70
74
return openAPI ;
71
75
}
@@ -137,6 +141,10 @@ public void readApiDefinition(Element element) {
137
141
if (!info .description ().isEmpty ()) {
138
142
openAPI .getInfo ().setDescription (info .description ());
139
143
}
144
+ if (!info .version ().isEmpty ()) {
145
+ openAPI .getInfo ().setVersion (info .version ());
146
+ }
147
+
140
148
}
141
149
142
150
public void writeApi () {
@@ -155,7 +163,7 @@ public void writeApi() {
155
163
private ObjectMapper createObjectMapper () {
156
164
157
165
ObjectMapper mapper = new ObjectMapper ();
158
- mapper .setDefaultPropertyInclusion (JsonInclude .Include .NON_EMPTY )
166
+ mapper .setDefaultPropertyInclusion (JsonInclude .Include .NON_NULL )
159
167
.configure (DeserializationFeature .FAIL_ON_UNKNOWN_PROPERTIES , false )
160
168
.enable (SerializationFeature .INDENT_OUTPUT );
161
169
You can’t perform that action at this time.
0 commit comments