-
-
Notifications
You must be signed in to change notification settings - Fork 54
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
feat: Types for the FastAPI API and API refactor #748
Conversation
We should add the settings models to this too. We should be handling validations with pydantic for those too.. before now we havent used the full potential of pydantic. Apreciate the hard work man! |
Added to the goals :) |
Description:
Added Pydantic types to the FastAPI responses. This is preparation so we can generate a strongly-typed frontend client.
We also have a lot of endpoints that return JSON like this
And returns
false
when the action fails, the status code remains 200. We will migrate to a new response type where we don't include thesuccess
variable and handle errors by returning the appropriate HTTP status codes.Checklist