-
Notifications
You must be signed in to change notification settings - Fork 557
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 U/I integration [3.x] #5568
Merged
tjquinno
merged 21 commits into
helidon-io:helidon-3.x
from
tjquinno:openapi-ui-one-service-3.x
Dec 3, 2022
Merged
Add OpenAPI U/I integration [3.x] #5568
tjquinno
merged 21 commits into
helidon-io:helidon-3.x
from
tjquinno:openapi-ui-one-service-3.x
Dec 3, 2022
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…ome with the full impl
…es in base and minimal impl; adjust tests
…ith minimal support
tjquinno
requested review from
romain-grecourt,
spericas,
barchetta,
tomas-langer,
ljamen and
Geetha-Savithriamma
November 30, 2022 18:31
oracle-contributor-agreement
bot
added
the
OCA Verified
All contributors have signed the Oracle Contributor Agreement.
label
Nov 30, 2022
ljamen
reviewed
Dec 1, 2022
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.
I didn't call them out individually, but perhaps we should stick to UI (vs U/I) throughout the docs? Is there a way to find/replace? The only other issue I had was with the logo.svg file. It wasn't displaying for me -- or at least it didn't look like it was?
barchetta
approved these changes
Dec 2, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Resolves #4883
SmallRye offers a mostly-static content solution for presenting essentially the Swagger U/I.
This PR creates a new integration--
helidon-integrations-openapi-ui
--which layers on the SmallRye code, customizing the main page dynamically with some Helidon-specific content (logo, title, links) and serving the U/I at at/openapi/ui
(by default) and, using content negotiation, also at/openapi
.SE developers add a build-time dependency and then create an
OpenApiUi.Builder
instance and add it to theOpenAPISupport.Builder
if they want to customize the U/I behavior. Or, they can just letOpenAPISupport.Builder
automatically create a U/I using default settings. They can use config for a few settings as well.MP developers add a runtime dependency and use config as needed to tailor the behavior.
Changes to
helidon-openapi
OpenApiUiFactory
andOpenApiUi
) and contains no-op implementations.OpenAPISupport
:OpenApiUi.Builder
implOpenApiUi
update
method so it can add its own routing. (none for the no-op impl) The developer's code does not explicitly register the U/I service.OpenApiUi
instance upon receiving a request at/openapi
so it can handle requests for text/* content.New
helidon-integrations-openapi-ui
OpenApiUiFactory
impl and contains a full-featuredOpenApiUi
impl which:/openapi
and/openapi/ui
to return a dynamically-computedindex.html
(from SmallRye) which contains JavaScript which retrieves the OpenAPI document and then runs the browser U/I)MP QuickStart examples
Docs
se/openapi.adoc
which was moved tose/openapi/openapi.adoc
in a previous PR but I accidentally left the old file in place.