Tim Quinn 8f1d59fb0a
Support Helidon SE 4 generation (clients and servers) (#19150)
* 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
2024-08-04 22:06:30 +08:00

1.6 KiB

OpenAPI Petstore

This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: " \

Overview

This project was generated using the Helidon OpenAPI Generator.

The generated classes use the programming model from the Helidon WebClient implementation, primarily the WebClient interface and its associated WebClientClient.Builder class. Refer to the Helidon WebClient documentation for complete information about them.

Using the Generated Classes and Interfaces

The generated ApiClient class wraps a WebClient instance. Similarly, the ApiClient.Builder class wraps the WebClientConfig.Builder class.

The generated xxxApi interfaces and xxxApiImpl classes make it very simple for your code to send requests (with input parameters) to the remote service which the OpenAPI document describes and to process the response (with output values) from the remote service.

To use the generated API, your code performs the following steps.

  1. Create an instance of the ApiClient using its Builder.
  2. Create an instance of a xxxApi it wants to access, typically by invoking xxxApiImpl.create(ApiClient) and passing the ApiClient instance just created.
  3. Invoke any of the public methods on the xxxApi instance, passing the input parameters and saving the returned Single<WebClientResponse> object.
  4. Invoke methods on the returned Single<WebClientResponse> to process the response and any output from it.

Browse the methods and JavaDoc on the generated classes for more information.