这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@weiser
Copy link
Contributor

@weiser weiser commented Aug 14, 2020

I'm deploying my huma application behind a shared API gateway. As such, I need all of my routes to be prefixed with my app name, i.e.

GET endpoint1 --> GET my-app/endpoint

For routes I myself can define, that is easy enough.

Buyt for the API docs, which have static routes of /{docs, openapi.json,openapi.yaml} I have no way to change those routes to

GET /docs --> GET /my-app/docs

This PR adds a new RouterOption, which when applied ensures that the auto-generated docs can be prefixed.

@weiser
Copy link
Contributor Author

weiser commented Aug 14, 2020

Based on the result of review, I need to update the main docs to show how to use this new Router Option.

@weiser
Copy link
Contributor Author

weiser commented Aug 17, 2020

This should not be accepted. Though the tests pass, when I wire this up to an actual running instance, the DOM doesn't render because the rapi-doc element is missing the prefixed path. I.e.

<rapi-doc spec-url="openapi.json"...> instead of <rapi-doc spec-url="prefix/openapi.json"...>

@weiser
Copy link
Contributor Author

weiser commented Aug 18, 2020

closed in favor of #9

@weiser weiser closed this Aug 19, 2020
@weiser weiser mentioned this pull request Aug 20, 2020
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.

1 participant