File tree Expand file tree Collapse file tree 3 files changed +60
-18
lines changed
http-generator-core/src/main/java/io/avaje/http/generator/core/openapi
test-javalin-jsonb/src/main/resources/public
test-jex/src/main/resources/public Expand file tree Collapse file tree 3 files changed +60
-18
lines changed Original file line number Diff line number Diff line change @@ -81,7 +81,7 @@ static String serialize(Object obj) throws IllegalAccessException {
8181 sb .append ("," );
8282 }
8383 sb .append ("\" " );
84- sb .append (field .getName ());
84+ sb .append (field .getName (). replace ( "_enum" , "enum" ) );
8585 sb .append ("\" : " );
8686 write (sb , value );
8787 firstField = false ;
Original file line number Diff line number Diff line change 11{
22 "openapi" : " 3.0.1" ,
33 "info" : {
4- "title" : " Example service showing off the Path extension method of controller " ,
4+ "title" : " Example service" ,
55 "description" : " Example Javalin controllers with Java and Maven" ,
66 "version" : " "
77 },
88 "tags" : [
99 {
1010 "name" : " tag1" ,
11- "description" : " this is added to openapi tags "
11+ "description" : " it's somethin "
1212 },
1313 {
1414 "name" : " tag1" ,
15- "description" : " it's somethin "
15+ "description" : " this is added to openapi tags "
1616 }
1717 ],
1818 "paths" : {
11561156 "type" : " string"
11571157 },
11581158 "type" : {
1159- "$ref" : " #/components/schemas/ServerType"
1159+ "type" : " string" ,
1160+ "enum" : [
1161+ " PROXY" ,
1162+ " HIDE_N_SEEK" ,
1163+ " FFA"
1164+ ]
11601165 }
11611166 }
11621167 }
11951200 "type" : " string"
11961201 },
11971202 "type" : {
1198- "$ref" : " #/components/schemas/ServerType"
1203+ "type" : " string" ,
1204+ "enum" : [
1205+ " PROXY" ,
1206+ " HIDE_N_SEEK" ,
1207+ " FFA"
1208+ ]
11991209 }
12001210 }
12011211 }
12291239 "name" : " type" ,
12301240 "in" : " query" ,
12311241 "schema" : {
1232- "$ref" : " #/components/schemas/ServerType"
1242+ "type" : " string" ,
1243+ "enum" : [
1244+ " PROXY" ,
1245+ " HIDE_N_SEEK" ,
1246+ " FFA"
1247+ ]
12331248 }
12341249 }
12351250 ],
12611276 "schema" : {
12621277 "type" : " array" ,
12631278 "items" : {
1264- "$ref" : " #/components/schemas/ServerType"
1279+ "type" : " string" ,
1280+ "enum" : [
1281+ " PROXY" ,
1282+ " HIDE_N_SEEK" ,
1283+ " FFA"
1284+ ]
12651285 }
12661286 }
12671287 }
12991319 "name" : " type" ,
13001320 "in" : " query" ,
13011321 "schema" : {
1302- "$ref" : " #/components/schemas/ServerType"
1322+ "type" : " string" ,
1323+ "enum" : [
1324+ " PROXY" ,
1325+ " HIDE_N_SEEK" ,
1326+ " FFA"
1327+ ]
13031328 }
13041329 }
13051330 ],
19031928 }
19041929 }
19051930 },
1906- "ServerType" : {
1907- "type" : " object"
1908- },
19091931 "byte" : {
19101932 "type" : " object"
19111933 }
Original file line number Diff line number Diff line change 190190 "name" : " type" ,
191191 "in" : " query" ,
192192 "schema" : {
193- "$ref" : " #/components/schemas/ServerType"
193+ "type" : " string" ,
194+ "enum" : [
195+ " PROXY" ,
196+ " HIDE_N_SEEK" ,
197+ " FFA"
198+ ]
194199 }
195200 }
196201 ],
222227 "schema" : {
223228 "type" : " array" ,
224229 "items" : {
225- "$ref" : " #/components/schemas/ServerType"
230+ "type" : " string" ,
231+ "enum" : [
232+ " PROXY" ,
233+ " HIDE_N_SEEK" ,
234+ " FFA"
235+ ]
226236 }
227237 }
228238 }
260270 "name" : " type" ,
261271 "in" : " query" ,
262272 "schema" : {
263- "$ref" : " #/components/schemas/ServerType"
273+ "type" : " string" ,
274+ "enum" : [
275+ " PROXY" ,
276+ " HIDE_N_SEEK" ,
277+ " FFA"
278+ ]
264279 }
265280 }
266281 ],
363378 "name" : {
364379 "type" : " string" ,
365380 "nullable" : false
381+ },
382+ "serverType" : {
383+ "type" : " string" ,
384+ "enum" : [
385+ " PROXY" ,
386+ " HIDE_N_SEEK" ,
387+ " FFA"
388+ ]
366389 }
367390 }
368- },
369- "ServerType" : {
370- "type" : " object"
371391 }
372392 }
373393 }
You can’t perform that action at this time.
0 commit comments