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

Maintained Fork Inquiry #73

Open
TheJumpyWizard opened this issue Dec 7, 2022 · 3 comments
Open

Maintained Fork Inquiry #73

TheJumpyWizard opened this issue Dec 7, 2022 · 3 comments

Comments

@TheJumpyWizard
Copy link

Are there a good number of people interested in this still? Could potentially fork this and address some of the issues here based off how many people would want that. I see it hasn't been maintained in over a year.

@akliang
Copy link

akliang commented Dec 11, 2022

I would say given the number of forks (53) and PRs (7) and the fact that the latest 3 PRs were only ~4 months ago, you'd have a pretty reasonable chance of success by forking it. Not sure about the pypi packaging though...

@TheJumpyWizard
Copy link
Author

@akliang yeah the pypi packaging issue is tough would need the key from current maintainer

@alexschimpf
Copy link

alexschimpf commented Dec 23, 2022

@TheJumpyWizard @akliang
I created my own package based on fastapi_versioning.
It fixes most of the bugs noted on here and adds some additional features.
https://github.com/alexschimpf/fastapi-versionizer
https://pypi.org/project/fastapi-versionizer/

Some notable differences:

  • Package includes py.typed so mypy will actually be able to type check it
  • kwargs are passed to all versioned sub-applications
  • You can provide a function to generate custom OpenAPI schemas for each sub-application
  • You can provide a function to generate custom Swagger/Redoc HTML for each sub-application
  • You can provide a custom "latest" prefix
    • Currently, "/" as a latest prefix is not supported though
  • Websocket routes are now handled
  • The versioning is applied directly to your FastAPI app, instead of generating a new FastAPI app object
  • The versionize function returns a list of all the versions in your app
  • The version decorator is now called api_version
  • dependency_overrides is preserved
  • A main docs page is not generated. But this can be easily accomplished like so: https://github.com/alexschimpf/fastapi-versionizer/blob/main/examples/advanced.py#L125
    • You can generate a Swagger page to expose an automatically generated "/versions" endpoint or you can generate your own custom HTML page

If ya'll have any feedback, let me know. Happy to make changes or add new features.

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

No branches or pull requests

3 participants