smallrye-open-api
smallrye-open-api copied to clipboard
Support for (some) Springdoc annotations in the openapi spring module
See https://github.com/quarkusio/quarkus/issues/40328
/cc @mrickly
@MikeEdgar - w.d.y.t ?
This makes sense to me. Probably best to isolate it to the Spring module.
@mrickly are you keen to do a PR for this ?
@phillip-kruger : We are open to giving it a try. But we will need some guidance, e.g. the correct location/package for such a change. We would probably start with the ParameterObject and if it works as expected add things as the need arises.
Ok No worries. Most of the work is done in core (https://github.com/smallrye/smallrye-open-api/tree/main/core) and core then calls out to one of jax-rs, spring or vertx. So this should be done somewhere in spring module (https://github.com/smallrye/smallrye-open-api/tree/main/extension-spring). We just need to see if the "hooks" exist in core. I would assume it will work the same way as BeanParam in jax-rs. (see https://github.com/smallrye/smallrye-open-api/blob/e47033dca7fe383ebfcc64b4c8abf64156966a3e/extension-jaxrs/src/main/java/io/smallrye/openapi/jaxrs/JaxRsParameter.java#L25). @MikeEdgar, anything to add ?
This will likely be in the SpringParameterProcessor. I'm not entirely sure if @ParameterObject is analogous to @BeanParam or is it more like the MP OpenAPI @Parameter (i.e. documentation only, not functional).
Hi @MikeEdgar @phillip-kruger
i posted PR https://github.com/smallrye/smallrye-open-api/pull/1823 for @mrickly .
this would solve our needs. situation is somehow "shady" as quarkus does not seem to behave exactly as spring needing @QueryParam on fields while spring does not.
thanks for your review. tell us if you need more tests whatever