-
Notifications
You must be signed in to change notification settings - Fork 3
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: add documentation to some endpoints #890
Conversation
addc82a
to
65dc497
Compare
65dc497
to
af59121
Compare
af59121
to
179121a
Compare
error_message="Trees not found", status_code=HTTPStatus.OK | ||
return create_api_error_response(error_message="Trees not found", status_code=HTTPStatus.OK) | ||
|
||
checkouts = [self._sanitize_tree(checkout) for checkout in checkouts] |
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.
As discussed in the meeting me and Francisco had, we could remove this _sanatize_tree
using Pydantic alias but that would mean that instead of checkouts
being a list of tuples, we would need to change this to a list of objects, like checkouts = [{"checkout": checkouts[0]}, {"checkout": checkouts[1]}, ...]
because of the way AliasPath
of pydantic works (it gets the element in index n
of an object field that has an iterable as value). We judged both of the solutions to be more or less equal so decided not to change at first and would like the opinion of the other devs in this matter
class TreeDetailsFullResponse( | ||
TreeDetailsBuildsResponse, | ||
CommonDetailsBootsResponse, | ||
CommonDetailsTestsResponse, | ||
SummaryResponse | ||
): | ||
pass |
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.
I believe this makes sense in this code (since the full endpoint must be the combination of all the other tree endpoints) but I wanna see what the others think as well
179121a
to
2e231bc
Compare
2e231bc
to
aef36a8
Compare
aef36a8
to
8c601b0
Compare
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.
Seems to be working fine. I think we might still have some discussion to do about _sanitize_tree
if we'd like that the function returns a dict with the already correct field names or if we'd like to use pydantic to sort this out, but for now I think this is working well
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.
It is good as it is, even though as we discussed we could change the _sanitize_tree
. Pre approving
Part of #86
Close #808, #809, #810, #812