Skip to content

Generator should also provide org.openapitools:openapi-generator Integration for Server - Stubs #1331

@michaelsonnleitner

Description

@michaelsonnleitner

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

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

Metadata

Metadata

Assignees

Labels

area:serverThis item is related to the server extension

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions