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

Invalid "request" field under "requestBody" #1556

Closed
DjordyKoert opened this issue Mar 12, 2024 · 1 comment · Fixed by #1557
Closed

Invalid "request" field under "requestBody" #1556

DjordyKoert opened this issue Mar 12, 2024 · 1 comment · Fixed by #1557
Labels

Comments

@DjordyKoert
Copy link
Contributor

This was added in #1544

NelmioApiDocBundle automatically uses all newly adde processors in swagger-php. This now causes an invalid spec to be generated when using the newly added https://github.com/zircote/swagger-php/blob/038da8ad219f1e9c3f82c5d84c47da3b6f35039c/src/Processors/AugmentRequestBody.php.

According to https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.0.md#request-body-object a request body cannot contain a request property.

public $request = Generator::UNDEFINED;

@DjordyKoert
Copy link
Contributor Author

Related phpunit failure output on our end:

1) Nelmio\ApiDocBundle\Tests\Functional\ControllerTest::testControllers with data set "https://github.com/nelmio/NelmioApiDocBundle/issues/2209" ('Controller2209')
Failed asserting that two strings are identical.
--- Expected
+++ Actual
@@ @@
             "post": {
                 "operationId": "post_api_v3_users_create",
                 "requestBody": {
+                    "request": "Controller2209",
                     "required": true,
                     "content": {
                         "application/json": {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants