-
Notifications
You must be signed in to change notification settings - Fork 940
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
Schema generator add illegal request key under requestBody #1639
Comments
That would be a bug. However, hard to tell in conjunction with the bundle... I've added some more variations to the request body scratch test #1640 The generated yaml looks ok to me; could you check if your attribute usage is covered by the test and if not post a sample so I can add it? |
Maybe I am wrong but I believe the tests verify the bug, see here: The Nelmio-Doc-Bundle uses a simple json_encode to create the json file: And the OpenApi object holds this in fact before render:
So either |
The annotations are written in a way that makes sense when using the library. The If you look at the #[\ReturnTypeWillChange]
public function jsonSerialize()
{
$data = parent::jsonSerialize();
unset($data->request);
return $data;
} This is implemented as is there any difference in calling |
Sorry for the late reply, I have been absent for a while. You are absolutely right. We had been locked to 4.8.5, just one patch higher and we would have had the fix. Sorry for the confusion. I will close this issue :-) |
We have a project that relies on nelmio doc bundle which in turn uses swagger-php. When we access our openapi doc.json, we suddenly receive a
request
key, that we did not have before, eg:As per the spec this key is illegal: https://spec.openapis.org/oas/latest.html#request-body-object
This obviously leads to parsing errors, since the key is illegal:
Apparently this change comes from this PR: #1544
So am I right in the assumption that this is a bug or did I miss something?
The text was updated successfully, but these errors were encountered: