Replies: 1 comment 9 replies
-
Hi @tjquinno . As far as I know, the spec targets microservices (hence also the In smallrye, this is not really enforced, as the implementations (Quarkus/Wildfly etc) can decide to create multiple separate documents and make them available under a context root. SmallRye allow the scanning of annotations (but the scope / jandex index is supplied by the implementation) and the merging of static documents. So a implementation can basically create a document per application by controlling the jandex index it provides to be scanned. Not sure if this makes sense. @MikeEdgar @EricWittmann please comment. |
Beta Was this translation helpful? Give feedback.
-
(transplanted from the old Google group)
Some time ago on an older release of SmallRye OpenAPI, we noticed trouble when multiple JAX-RS
Aoplication
classes were present. IIRC we would see only one represented in the OpenAPI document produce, and which one could vary from run to run.I've been doing some things with 2.0.26 recently and it seems as if the scanner and related code are handling multiple apps just fine (see below for a definition of "just fine"). I have seen at least one issue opened about this and closed as not supported (#645).
Does this in fact work and, if so, is this supported?
I've been working recently with a simple two-application project. I see all endpoints from both apps represented in the OpenAPI document, and the
components
section contains entries for POJOs used from all endpoints.Certainly the document can contain only one
info
section, even if all apps bear the@OpenAPIDefinition
, for example. But as stated in #645, the MP OpenAPI spec hints at but doesn't define the "correct" behavior in such cases. So it's developer beware (at least with respect to multiple classes with@OpenAPIDefinition
) and that seems fine to me.Beta Was this translation helpful? Give feedback.
All reactions