Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Refactor the route POST:
/api/tools
to FastAPI #17295base: dev
Are you sure you want to change the base?
Refactor the route POST:
/api/tools
to FastAPI #17295Changes from all commits
bd9e30f
4542333
28d1d6d
181f63b
a606b66
8177005
632eac9
bfeb888
fca3497
976a917
d6d363e
39481cc
a036653
0bc847c
a9bbf2f
001f533
434b045
098aa80
9f2da1b
702d955
8838d2f
498f3f5
8806f70
b049ff2
f69e11f
f298968
00ce35e
ecd3a48
37e5a41
6826dbf
ae36dfe
b272fd5
4379464
9be481d
e8133c6
95c02d4
8a44ea0
a3ba4a7
0d0ada3
d125e30
8d97c50
60a5bbf
b033aa4
71f7bfc
a10088a
54448e5
3d803d3
2d65739
dc03471
3d6c325
34fe594
d7833d3
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
Large diffs are not rendered by default.
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'm not familiar with this, where did you find that ?
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.
This one's deprecated and raises an exception if provided, we can remove that
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.
Do you expect any other field to be here that cannot be part of the model? If not we should avoid using
extra=allow
.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.
Yes, we expect other fields. They fields will have the prefix "files_" and it is not possible to narrow them down further (I think). The execute method (line 131 -152) in the service layer handles them like this:
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.
Can you add a validator that validates the whole model ? https://docs.pydantic.dev/latest/concepts/validators/#model-validators mode="after" and then check that the only fields not defined in the model are
files_*
fields ?