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

Fix broken OpenAPI documentation #37

Merged
merged 3 commits into from
Jan 25, 2025
Merged

Fix broken OpenAPI documentation #37

merged 3 commits into from
Jan 25, 2025

Conversation

No767
Copy link
Member

@No767 No767 commented Jan 25, 2025

Summary

Before this PR, I've been working on ensuring that the API documentation works, but ran into a snag when it kept up outputting the same error over and over. If anyone is interested in looking at it, here is the link: https://mystb.in/9e8ebb1b188d84be55.

That point aside, I spent the next 2-3 weeks trying to shim it to work, but that failed. I also did contact the SuperTokens Discord team and the library maintainer for the Python SDK actually reached out to me and helped me with his suggestions. Big thanks to sattvikc for pointing me into the right direction.

Turns out:

  1. Annotated[SessionContainer, Depends(verify_session)] needed to be used instead of the old way of doing it. This is because FastAPI requires Python 3.9+ instances to use that form of typing rather than the old kind.
  2. This was such an easy mistake to make, but there wasnt () within verify_session. That fixed it up and it finally works.

Types of changes

What types of changes does your code introduce to Kanae?
Put an x in the boxes that apply

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation Update (Updates to README.md, the documentation, etc)
  • Other (if none of the other choices apply)

Checklist

Put an x in the boxes that apply

  • If code changes were made then they have been tested.
    • I have updated the documentation to reflect the changes. (if appropriate)
  • All workflows pass with my new changes
  • This PR does not address a duplicate issue or PR

@No767 No767 merged commit 863d914 into main Jan 25, 2025
10 checks passed
@No767 No767 deleted the noelle/fix-broken-docs branch January 25, 2025 07:47
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