mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-05-17 23:20:52 +00:00
* #18058 Fix AbstractJavaCodegen.getAccepts() so it returns a String array instead of a comma-separated string, and fixed api.mustache so the @RequestMapping annotation generated produces for x-accepts as a parameter list instead of a (single) string. * #18058 Updated test case to accept a string array instead of a comma-separated list. * #18058 Reverted changes on imported compared to the main branch. * #18058 getAccepts() is now hybrid, and can return both a single String or a String[]. * #18058 Rolled back the hybrid getAccepts(), so it only returns a String array. * #18058 Updated mustache files to cope with vendorExtensions.x-accepts being a string array instead of a comma-separated string. * #18058 Generated new sample files with by running `./bin/generate-samples.sh ./bin/configs/*.yaml` * #18058 Optimization of getAccepts() * #18058 Regenerated scripts that got broken after resolving conflicts on GitHub * #18058 Fixed introduced issue with api.mustache causing a redundant accept with @HttpExchange with the PetApi.java, StoreApi.java, and UserApi.java.
Helidon Server with OpenAPI
Build and run
With JDK11+
mvn package
java -jar target/petstore-helidon-server-mp.jar
Exercise the application
curl -X PATCH http://petstore.swagger.io:80/v2
curl -X GET http://petstore.swagger.io:80/v2
curl -X GET http://petstore.swagger.io:80/v2/BigDecimalMap
curl -X GET http://petstore.swagger.io:80/v2/health
curl -X GET http://petstore.swagger.io:80/v2/http-signature-test
curl -X POST http://petstore.swagger.io:80/v2/outer/boolean
curl -X POST http://petstore.swagger.io:80/v2/outer/composite
curl -X POST http://petstore.swagger.io:80/v2/outer/number
curl -X POST http://petstore.swagger.io:80/v2/outer/string
curl -X POST http://petstore.swagger.io:80/v2/property/enum-int
curl -X POST http://petstore.swagger.io:80/v2/additionalProperties-reference
curl -X PUT http://petstore.swagger.io:80/v2/body-with-binary
curl -X PUT http://petstore.swagger.io:80/v2/body-with-file-schema
curl -X PUT http://petstore.swagger.io:80/v2/body-with-query-params
curl -X PATCH http://petstore.swagger.io:80/v2
curl -X POST http://petstore.swagger.io:80/v2
curl -X GET http://petstore.swagger.io:80/v2
curl -X DELETE http://petstore.swagger.io:80/v2
curl -X POST http://petstore.swagger.io:80/v2/inline-additionalProperties
curl -X POST http://petstore.swagger.io:80/v2/inline-freeform-additionalProperties
curl -X GET http://petstore.swagger.io:80/v2/jsonFormData
curl -X POST http://petstore.swagger.io:80/v2/nullable
curl -X PUT http://petstore.swagger.io:80/v2/test-query-parameters
curl -X POST http://petstore.swagger.io:80/v2/stringMap-reference
curl -X PATCH http://petstore.swagger.io:80/v2
curl -X POST http://petstore.swagger.io:80/v2/pet
curl -X DELETE http://petstore.swagger.io:80/v2/pet/{petId}
curl -X GET http://petstore.swagger.io:80/v2/pet/findByStatus
curl -X GET http://petstore.swagger.io:80/v2/pet/findByTags
curl -X GET http://petstore.swagger.io:80/v2/pet/{petId}
curl -X PUT http://petstore.swagger.io:80/v2/pet
curl -X POST http://petstore.swagger.io:80/v2/pet/{petId}
curl -X POST http://petstore.swagger.io:80/v2/pet/{petId}/uploadImage
curl -X POST http://petstore.swagger.io:80/v2/fake/{petId}/uploadImageWithRequiredFile
curl -X DELETE http://petstore.swagger.io:80/v2/order/{order_id}
curl -X GET http://petstore.swagger.io:80/v2/inventory
curl -X GET http://petstore.swagger.io:80/v2/order/{order_id}
curl -X POST http://petstore.swagger.io:80/v2/order
curl -X POST http://petstore.swagger.io:80/v2
curl -X POST http://petstore.swagger.io:80/v2/createWithArray
curl -X POST http://petstore.swagger.io:80/v2/createWithList
curl -X DELETE http://petstore.swagger.io:80/v2/{username}
curl -X GET http://petstore.swagger.io:80/v2/{username}
curl -X GET http://petstore.swagger.io:80/v2/login
curl -X GET http://petstore.swagger.io:80/v2/logout
curl -X PUT http://petstore.swagger.io:80/v2/{username}
Try health and metrics
curl -s -X GET http://petstore.swagger.io:80/v2/health
{"outcome":"UP",...
. . .
# Prometheus Format
curl -s -X GET http://petstore.swagger.io:80/v2/metrics
# TYPE base:gc_g1_young_generation_count gauge
. . .
# JSON Format
curl -H 'Accept: application/json' -X GET http://petstore.swagger.io:80/v2/metrics
{"base":...
. . .