-
Notifications
You must be signed in to change notification settings - Fork 566
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
Add openapi support to SE #558
Conversation
…ses - primarily for MP extension later given that SE OpenAPI support will not include annotations
Merge with concurrent changes to master.
The starting point of this PR contains only the SE changes. MP will come along shortly. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. We should add some tests for the new service.
…scaping the opening methods in case of errors
Combine with parallel unrelated changes.
Get concurrent changes.
…peline so temporarily giving up
…OpenAPI model reader and filter
Merge with concurrent changes to master.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
I have a problem with the dependency on small rye - mostly because it obviously requires Weld (as you note above - Jandex index is expected). |
What are the required runtime dependencies for SE ? Does it drag weld and jandex even for SE ? |
I have been digging into the dependency situation since Tomas noted his concern. As a brute force experiment I deleted the entire There seems to be no dependency on Weld introduced by using smallrye's OpenAPI impl but I'll check a little more to be sure. |
Basic approach:
OpenAPISupport
class in SE which developers can use to explicitly and easily add OpenAPI support to their apps. Our SE support excludes annotation support. The most reasonable use of OpenAPI support in SE will be with a static OpenAPI document file built into the app. This fits well with the idea often described of writing the OpenAPI document first and using that to drive development of the endpoints described in the document.OpenAPISupport
with annotation handling (as well as the other mechanisms for providing OpenAPI model information).Note that the smallrye implementation expects to find a jandex index to support its OpenAPI annotation handling. It does not even fail gracefully if the index is missing. The work savings to us in leveraging smallrye's impl is significant and so requiring the presence of the jandex index seems worth it. Early on, our MP support will check for the index and fail if it is absent. Later (presumably a short while later), our MP support can create the index just-in-time (in memory) if the developer did not build it into the application. I'd expect our first release that supports OpenAPI to build the index JIT if it is missing.