Skip to content

Feature request: Add support for Files and Form in OpenAPI schema #3663

Closed
2 of 2 issues completed
Closed

Description

@leandrodamascena

Use case

Original discussion: #3609

OpenAPI supports File and Form fields in the Request Body and we must add support for this.

https://swagger.io/docs/specification/describing-request-body/

Solution/User Experience

Add support for File and Form fields.

Alternative solutions

No response

Acknowledgment

Sub-issues

Sub-issues

2 of 2 Issues completed
Loading 2 sub-issues

Activity

  1. added
    triage
    feature-request
    on Jan 22, 2024
  2. added and removed
    triage
    on Jan 22, 2024
  3. leandrodamascena commented on Jan 22, 2024

    @leandrodamascena
    ContributorAuthor

    Assigned to @rubenfonseca

  4. added
    help wanted
    on Jan 22, 2024
  5. Hatter1337 commented on Sep 12, 2024

    @Hatter1337

    Hi 👋🏼
    From the original discussion, I see this concerns app.enable_swagger().
    Could you please let me know if it is possible to add multipart/form-data to the request body when using app.get_openapi_json_schema, or is this option currently unavailable as well?

    @router.post(
        "/user/activities/<activity_id>/assets",
        summary="Create asset",
        description="Create an asset for a user activity",
        responses={
            201: {
                "description": "Created",
                "content": {"application/json": {"model": models.ActivityAssetResponse}},
            }
        }
        | default_openapi_responses,  # 400, 409, etc.
        tags=["User"],
    )

    Thank you.

  6. dreamorosi commented on Jan 24, 2025

    @dreamorosi
    Contributor

    @leandrodamascena can you please take a look at the question above when you can?


    Regarding the feature, we're still keeping this non our backlog and will get to it eventually. If anyone has knowledge on the topic and would like to contribute, please leave a comment to claim the issue.

  7. leandrodamascena commented on Jan 29, 2025

    @leandrodamascena
    ContributorAuthor

    Hi 👋🏼 From the original discussion, I see this concerns app.enable_swagger(). Could you please let me know if it is possible to add multipart/form-data to the request body when using app.get_openapi_json_schema, or is this option currently unavailable as well?

    @router.post(
    "/user/activities/<activity_id>/assets",
    summary="Create asset",
    description="Create an asset for a user activity",
    responses={
    201: {
    "description": "Created",
    "content": {"application/json": {"model": models.ActivityAssetResponse}},
    }
    }
    | default_openapi_responses, # 400, 409, etc.
    tags=["User"],
    )
    Thank you.

    Hey @Hatter1337! Thanks, I think we support it but I'm doing some additional tests to validate if this is working as expected.

  8. removed
    help wanted
    on Aug 6, 2025
  9. moved this from Backlog to Working on it in Powertools for AWS Lambda (Python)on Sep 5, 2025
  10. leandrodamascena commented on Apr 6, 2026

    @leandrodamascena
    ContributorAuthor

    Closing as complete.

  11. powertools-for-aws-oss-automation commented on Apr 6, 2026

    @powertools-for-aws-oss-automation

    Warning

    This issue is now closed. Please be mindful that future comments are hard for our team to see.
    If you need more assistance, please either reopen the issue, or open a new issue referencing this one.
    If you wish to keep having a conversation with other community members under this issue feel free to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions