Skip to content

Support parsing and generating OpenAPI spec for file uploads#240

Merged
greyli merged 3 commits intomainfrom
file-upload
May 3, 2022
Merged

Support parsing and generating OpenAPI spec for file uploads#240
greyli merged 3 commits intomainfrom
file-upload

Conversation

@greyli
Copy link
Copy Markdown
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