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

Custom routes #29

Merged
merged 8 commits into from
Jul 29, 2020
Merged

Custom routes #29

merged 8 commits into from
Jul 29, 2020

Conversation

benbovy
Copy link
Contributor

@benbovy benbovy commented Jun 26, 2020

Follow-up #27.

Custom API routers may be plugged in the FastAPI application using the new routers argument when calling the rest accessor. This completely overrides the default routers, although it is still possible to reuse the latter ones by importing them from xpublish.routers and including them in the given list of routers.

TODO:

  • explicitly check for API path conflicts
  • more doc updates.

Copy link
Contributor

@jhamman jhamman left a comment

Choose a reason for hiding this comment

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

@benbovy - apologies for the much delayed review here. This all looks great to me. Just one minor comment on the docs.

xpublish/rest.py Outdated Show resolved Hide resolved
@benbovy
Copy link
Contributor Author

benbovy commented Jul 29, 2020

Thanks for the review @jhamman. I've addressed your comment and I've also updated the tutorial with a couple of examples with custom API endpoints.

@jhamman
Copy link
Contributor

jhamman commented Jul 29, 2020

Amazing @benbovy! Thanks so much for the new feature work and for the extensive documentation. Merging now.

@jhamman jhamman merged commit 293608d into xpublish-community:master Jul 29, 2020
@jhamman jhamman mentioned this pull request Jul 29, 2020
@benbovy benbovy deleted the custom-routes branch July 30, 2020 08:05
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.

3 participants