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

Add swagger UI #38

Merged
merged 7 commits into from
May 20, 2024
Merged

Conversation

gkumbhat
Copy link
Collaborator

@gkumbhat gkumbhat commented May 20, 2024

closes: #16

Changes

  • Add swagger UI to host and publish orchestrator and detector APIs

There is a lot of code that I got from swagger-ui following this tutorial. But files I changed are:

  1. index.html
  2. dist/swagger-initializer.js
  3. docs/api/orchestrator_openapi_0_1_0.yaml
  4. docs/api/openapi_detector_api.yaml

The pages are available for demo here: https://gkumbhat.github.io/fms-guardrails-orchestrator/?urls.primaryName=Orchestrator+API

gkumbhat added 5 commits May 20, 2024 14:41
Signed-off-by: gkumbhat <kumbhat.gaurav@gmail.com>
Signed-off-by: gkumbhat <kumbhat.gaurav@gmail.com>
Signed-off-by: gkumbhat <kumbhat.gaurav@gmail.com>
Signed-off-by: gkumbhat <kumbhat.gaurav@gmail.com>
Signed-off-by: gkumbhat <kumbhat.gaurav@gmail.com>
gkumbhat added 2 commits May 20, 2024 15:49
Signed-off-by: gkumbhat <kumbhat.gaurav@gmail.com>
Signed-off-by: gkumbhat <kumbhat.gaurav@gmail.com>
Copy link
Collaborator

@evaline-ju evaline-ju left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - but general q, will this be able to built off this repo and auto-updated on any yaml API changes?

@gkumbhat
Copy link
Collaborator Author

@evaline-ju yep. yaml changes should automatically get reflected. If we need to change some swagger ui elements, like UI Name, attribute name or add another API spec, then we would just add them to list in dist/swagger-initializer.js and it would automatically get built, deployed and available in pages.

@gkumbhat gkumbhat merged commit e45a89e into foundation-model-stack:main May 20, 2024
1 check passed
@gkumbhat gkumbhat deleted the add_swagger_ui branch May 20, 2024 21:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Host API in swagger pages in the repo
2 participants