forked from loafle/openapi-generator-original
* Save work-in-progress * Incoming param handling generating well exc. for file upload * Revise generated test for v3 vs v4 differences * Leave details of multi-part handling to the user for now * change default version to use the highest version known * SE client changes for Helidon 4 * A few fixes; add new v4 SE samples * Fix v3/v4 routing prep * Improve version handling if web site is inaccessible; add test * Reworking parameter conversion and required and validation handling * Add generation of a return value record per response for each operation * Improvements to the result record generation * More changes * Remove change in whitespace in v3 output * More progress on parameter handling * WIP - refactor parameter-returning methods to inner class along with return records * Reorg of op helpers * Use no-op for handling map in path, query, header, cookie - need to revise later * Binary form param handling * Clean-up and consistency check bt useAbstractClass and not * Improve result builders * Add new samples files * Fix a few issues * Update samples after rebase; add build steps for v3 and v4 uac github actions * Remove v3 se useAbstractClass test - creates some bad code * Generated doc updates * Fix missing newline * Improve Javadoc for generated Result; add convenience Result.send method * Add bean val. for body param if needed * Restructure generated records for declared responses; add Generated annotation selectively * Fix typo * In sample generation, force a stable generatorVersion value to avoid confusing builds and up-to-date samples checking * Fix up white space in older generation * Generate PartsUtils only with useAbstractClass = true * Adopt some review comments; more to come * Review comments; notably, switch to using the first path segment to group operations rather than the tags items * Improve status handling a bit * Add new generated sample files * Add missing new samples files * Quite a few updates, esp. to generated samples * New config file for sample * Updates samples * Add updates to .openapi-generator/FILES contents
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":...
. . .