-
-
Notifications
You must be signed in to change notification settings - Fork 940
Description
API Platform version(s) affected: 4.2
Description
We are using API Platform with Symfony, both using the latest stable version.
Unfortunately, we require certain API endpoints to accept XML only. Because of the changes in commit 79edced, schema definitions for those XML endpoints are no longer created. With those changes, there no longer is a textarea for the request body in the SwaggerUI.
How to reproduce
Just add a class with ApiResource format 'xml' and open the POST endpoint in the SwaggerUI.
Possible Solution
I haven't found a solution for this issue other than simply removing the if (str_starts_with($operationFormat, 'json')), which does solve the issue. If there is some way to make this work with those changes, please let me know.
If not, I would suggest checking if there is a schema generator for the given operation format. This way it would be possible to simply add schema generators for formats that are not provided by default in our own codebase.