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
3.4 KiB
3.4 KiB
Helidon SE Server with OpenAPI
Build and run
With JDK11+
mvn package
java -jar target/petstore-helidon-server-se.jar
Exercise the application
curl -X PATCH http://petstore.swagger.io:80/v2/another-fake/dummy
curl -X GET http://petstore.swagger.io:80/v2/fake/BigDecimalMap
curl -X GET http://petstore.swagger.io:80/v2/fake/health
curl -X GET http://petstore.swagger.io:80/v2/fake/http-signature-test
curl -X POST http://petstore.swagger.io:80/v2/fake/outer/boolean
curl -X POST http://petstore.swagger.io:80/v2/fake/outer/composite
curl -X POST http://petstore.swagger.io:80/v2/fake/outer/number
curl -X POST http://petstore.swagger.io:80/v2/fake/outer/string
curl -X POST http://petstore.swagger.io:80/v2/fake/property/enum-int
curl -X POST http://petstore.swagger.io:80/v2/fake/additionalProperties-reference
curl -X PUT http://petstore.swagger.io:80/v2/fake/body-with-binary
curl -X PUT http://petstore.swagger.io:80/v2/fake/body-with-file-schema
curl -X PUT http://petstore.swagger.io:80/v2/fake/body-with-query-params
curl -X PATCH http://petstore.swagger.io:80/v2/fake
curl -X POST http://petstore.swagger.io:80/v2/fake
curl -X GET http://petstore.swagger.io:80/v2/fake
curl -X DELETE http://petstore.swagger.io:80/v2/fake
curl -X POST http://petstore.swagger.io:80/v2/fake/inline-additionalProperties
curl -X POST http://petstore.swagger.io:80/v2/fake/inline-freeform-additionalProperties
curl -X GET http://petstore.swagger.io:80/v2/fake/jsonFormData
curl -X POST http://petstore.swagger.io:80/v2/fake/nullable
curl -X PUT http://petstore.swagger.io:80/v2/fake/test-query-parameters
curl -X POST http://petstore.swagger.io:80/v2/fake/stringMap-reference
curl -X POST http://petstore.swagger.io:80/v2/fake/{petId}/uploadImageWithRequiredFile
curl -X PATCH http://petstore.swagger.io:80/v2/fake_classname_test
curl -X GET http://petstore.swagger.io:80/v2/foo
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 DELETE http://petstore.swagger.io:80/v2/store/order/{order_id}
curl -X GET http://petstore.swagger.io:80/v2/store/inventory
curl -X GET http://petstore.swagger.io:80/v2/store/order/{order_id}
curl -X POST http://petstore.swagger.io:80/v2/store/order
curl -X POST http://petstore.swagger.io:80/v2/user
curl -X POST http://petstore.swagger.io:80/v2/user/createWithArray
curl -X POST http://petstore.swagger.io:80/v2/user/createWithList
curl -X DELETE http://petstore.swagger.io:80/v2/user/{username}
curl -X GET http://petstore.swagger.io:80/v2/user/{username}
curl -X GET http://petstore.swagger.io:80/v2/user/login
curl -X GET http://petstore.swagger.io:80/v2/user/logout
curl -X PUT http://petstore.swagger.io:80/v2/user/{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":...
. . .