Support binary format strings (multipart/form-data) #45
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.
This PR adds support for the multipart/form-data body type and schemas with the string "binary" format.
Generally these are used together when uploading files. Generated clients will now have a
types
module in theirmodels
which will contain aFile
class. That class is used to contain all the data required to upload a file via multipart/form-data. The payload is the only required piece offile
and can be anyIO
(e.g. a file pointer). Optionally, afile_name
andmime_type
can be provided as metadata to upload.As part of this PR, to make testing easier and bring more clarity to coverage, the normal unit tests and end to end tests were separated.
task check
will run unit tests only,task e2e
will regenerate the "golden_master" and run the end to end tests.