Skip to content
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

Support binary format strings (multipart/form-data) #45

Merged
merged 4 commits into from
May 19, 2020

Conversation

dbanty
Copy link
Collaborator

@dbanty dbanty commented May 19, 2020

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 their models which will contain a File 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 of file and can be any IO (e.g. a file pointer). Optionally, a file_name and mime_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.

@codecov
Copy link

codecov bot commented May 19, 2020

Codecov Report

Merging #45 into master will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            master       #45   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            9         9           
  Lines          573       597   +24     
=========================================
+ Hits           573       597   +24     
Impacted Files Coverage Δ
openapi_python_client/__init__.py 100.00% <100.00%> (ø)
openapi_python_client/openapi_parser/openapi.py 100.00% <100.00%> (ø)
openapi_python_client/openapi_parser/properties.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 36637c6...e672139. Read the comment docs.

@dbanty dbanty merged commit 0e74b59 into master May 19, 2020
@dbanty dbanty deleted the binary_format_strings branch May 19, 2020 01:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant