-
Notifications
You must be signed in to change notification settings - Fork 113
Description
Tell us the extension to which you'd like to add the feature.
Server
What kind of feature would you like to add?
MP REST Client generation relies on relies org.openapitools:openapi-generator (link) and it works fine and is extremely configurable.
Server Stub generation currently relies on Apicurio which is nice and good but not that configurable as as OpenAPITools-openapi-generator.
In my opinion server stub generation should also rely on OpenAPITools-openapi-generator libary because issues like
- Support additional-model-type-annotations for Server Generator #1273
- Cannot generate MultipartForm server-side API #1154
- Polymorphism with discriminators is not working #1133
- Server Code Generation does not support multiple yaml files #983
- Resources grouping ignoring tags with common path name and different resources #675
would be fixed.
org.openapitools:openapi-generator is build on the use of yamls which is the most common way to write business openapi Specifications (e.g. newlines in json's are not really possible, petshopstore - sample is never a good sample for openapi spec because the main parts - good documentation is missing).
In the current state of server stub generation the yaml has to be converted to json - and converting between formats is never a good idea because info can be lost or mismapped. I also think that there is a bigger community around org.openapitools:openapi-generator (see github stars, ...)
Proposal(s):
In my opinion server & client generation could / should be nearly the same regarding the codebase - if you compare for example the PetsApi (MP-REST Client) vs. PetsResource (JAXRS Server) they do not differ that much. They differ only in some points (eg. RegisterRestClient, CDI-Scopes).
Client generation with org.openapitools:openapi-generator is currently really powerful (regarding configuration, extensibility).
Try to extend this powerful mechanism also to be used in server stub generation.
Alternative(s):
No response
Additional info:
No response
Community Notes
No response