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 parsing and generating OpenAPI spec for file uploads #240

Merged
merged 3 commits into from
May 3, 2022

Conversation

greyli
Copy link
Member

@greyli greyli commented Apr 23, 2022

  • Add File field and form_and_files location
  • Fix the content type of form and files input locations.
  • Raise error if the user uses multiple body input locations ("files", "form", "json").
  • Add Form field and form_and_files location for better form upload support.
  • Rewrite the files to act like form_and_files, so that failed parsed file will be included in the returned data.

File validators will be added later in a separate PR.

The OpenAPI validation failed due to python-openapi/openapi-spec-validator#113.

Checklist:

  • Add tests that demonstrate the correct behavior of the change. Tests should fail without the change.
  • Add or update relevant docs, in the docs folder and in code docstring.
  • Add an entry in CHANGES.md summarizing the change and linking to the issue and your username.
  • Add *Version changed* or *Version added* note in any relevant docs and docstring.
  • Run pytest and tox, no tests failed.

Also fix the support for form location
@greyli greyli added this to the 1.0.0 milestone Apr 23, 2022
@greyli greyli changed the title Support file uploading Support parsing and generating OpenAPI spec for file uploads Apr 24, 2022
@greyli greyli merged commit 458037a into main May 3, 2022
@greyli greyli deleted the file-upload branch May 3, 2022 04:43
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.

Support file uploading for OAS
1 participant