Skip to content

[OpenAPI] multipart/form-data not generated #7436

@guillaume-sainthillier

Description

@guillaume-sainthillier

API Platform version(s) affected: 4.2.0

Since this commit : api-platform/openapi@bd7b60e
The OpenApi requestBody is empty for multipart/form-data inputFormats.
Swagger UI (and openapi.json) were successfully managed.

I would be happy to make a PR but not sure if it's really a regression or an unwanted feature before.

Here you have the ApiResource used:

#[ApiResource(
    operations: [
        new Post(
            inputFormats: ['multipart' => ['multipart/form-data']],
        ),
)]
class TheResource {
    public ?ImportTaskType $type = null;
    public ?UploadedFile $clientFileUpload = null;
}

Here you have some swagger UI.

Before:
Image

After:
Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions