Replies: 1 comment
-
I've prepared a PR with bytes handling #506 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I found that BlackSheep can't generate proper OAS for a multi-part body if a handler uses
BodyBinder
viaFromFiles
type binder.I've expected to have something like this.
This can't be solved by changing the parent of
FilesBinder
toBodyBinder
becauseFilesBinder
will conflict withFromFromBinder
when they are used together. BlackSheep allows to have only one body binder for a handler.I found the only way to see the file upload button in UI is to use the Pydantic model with the
bytes
field.There is a solution for objects like dataclasses and Pytdantic models to see multi-file upload.
OpenAPIHandler
should resolve a schema forbytes
simple type in_try_get_schema_for_simple_type
method.Then, those classes will look like in the image below.
Have I missed something? Any other workarounds?
Beta Was this translation helpful? Give feedback.
All reactions