-
Notifications
You must be signed in to change notification settings - Fork 0
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
API stub #12
API stub #12
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shaping up nicely!
Could you add the (corrected) ASCII API structure to the PR comment for reference please? Just something to say "this is what I'm aiming to make" for the reviewer to bounce off. Indeed, I've flagged some stuff that having this exact comparison to hand very much helped with.
I think that the principal advantage of Depends
for us would be connection sharing between endpoints. Have you looked at the documentation?
Would docstrings for each endpoint help here? I think it might be useful as things get more complex.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Happy!
Context
Changes proposed in this pull request
Guidance to review
I'd like some feedback on the tests, in particular the one for the endpoint talking to the backend. I'm currently setting up the DB and filling it up at the highest level ("link"), but that takes time, and tests something irrelevant from the point of view of the API, and difficult to predict in terms of the output.
On the other hand, we might want to check that the API does the correct backend calls...
I'm also unsure about whether we're gaining much from the FastAPI construct for dependency injection, which I used to inject the backend.
Final point, the ticket suggested implementing this
However, I'm instead posting to
models/{name}
andsources/{hash}
when creating new items.Checklist: