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

Swagger demo API calls don't work #37

Open
pacharanero opened this issue Feb 13, 2022 · 0 comments
Open

Swagger demo API calls don't work #37

pacharanero opened this issue Feb 13, 2022 · 0 comments

Comments

@pacharanero
Copy link
Member

The Swagger demo which is integrated into our documentation site is not working fully. It displays the API spec but it doesn't successfully call the API because it is using the wrong baseUrl.

Because there is authorization required on the api.rcpch.ac.uk endpoint, even just to request the / (root) endpoint, which describes the API in openapi/Swagger format, we can't call that api.rcpch.ac.uk endpoint without having to include an API key in the documentation site.

So instead we call the raw page in GitHub to get the API spec: https://raw.githubusercontent.com/rcpch/digital-growth-charts-server/live/openapi.json

But the Swagger UI component seems to think this is the BaseUrl we want to call with API requests.

FIX:

  • Set up the / root endpoint on api.rcpch.ac.uk so that some domains can call it without needing authorization (this will probably require a different API Management platform, which we are currently looking at)

  • Change the configuration of the Swagger UI component to call api.rcpch.ac.uk/growth/v1 to get the AI spec document form there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant