Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for springdoc-openapi annotations in quarkus-smallrye-openapi #40328

Open
mrickly opened this issue Apr 28, 2024 · 4 comments
Open

Support for springdoc-openapi annotations in quarkus-smallrye-openapi #40328

mrickly opened this issue Apr 28, 2024 · 4 comments
Labels
area/openapi area/smallrye area/spring Issues relating to the Spring integration kind/enhancement New feature or request

Comments

@mrickly
Copy link

mrickly commented Apr 28, 2024

Description

Quarkus offers a Spring Web compatibility layer to facilitate migrations and quarkus-smallrye-openapi will generate openapi documentation for Spring controllers: https://quarkus.io/guides/openapi-swaggerui#expose-openapi-specifications
Apparently springdoc-openapi annotations like @ParameterObject (https://springdoc.org/#how-can-i-extract-fields-from-parameter-object) are not supported. Annotating the parameter with the Jakarta RS @BeanParam does not work either. Are there any plans to support at least some springdoc-openapi annotations? What is the recommended migration path if not?

Implementation ideas

No response

@mrickly mrickly added the kind/enhancement New feature or request label Apr 28, 2024
@quarkus-bot quarkus-bot bot added area/openapi area/smallrye area/spring Issues relating to the Spring integration labels Apr 28, 2024
@quarkus-bot
Copy link

quarkus-bot bot commented Apr 28, 2024

/cc @EricWittmann (openapi), @Ladicek (smallrye), @MikeEdgar (openapi), @geoand (spring), @jmartisk (smallrye), @phillip-kruger (openapi,smallrye), @radcortez (smallrye)

@phillip-kruger
Copy link
Member

Why do you say the @BeanParam does not work ? What is not working ?

@mrickly
Copy link
Author

mrickly commented Apr 29, 2024

I mean simply replacing the @ParameterObject annotation with a @BeanParam annotation in a Spring @GetMapping resource will produce an openapi file that displays a body in Swagger.UI. For it to work as expected (query params in Swagger.UI), you need to replace the Spring @GetMapping resource with a Jakarta @GET resource, split off in its own class. That defeats the purpose of a compatibility layer to some extent.

@phillip-kruger
Copy link
Member

A, ok, cool. I think we should be able to map ParameterObject to BeanParam. This all happens in Smallrye OpenAPI. I'll open an issue there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/openapi area/smallrye area/spring Issues relating to the Spring integration kind/enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants