You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If Menes detects that input fails schema validation, it attempts to produce a 400 response that describes the problem, and which includes a copy of the schema that has been violated.
At some point (we think somewhere mid 2022) the Microsoft OpenAPI libraries started including reference details where $ref has been used, that end up including a pointer back to the whole OpenAPI doc. This causes Menes to crash because we end up with loops when trying to serialize the schema. But in any case, we shouldn't even be trying to copy the entire open API doc.
We need to work out how to stop it doing this. That might entail using the OpenApi library's built in functionality for serializing schemas. Or it might involve customizing how we serialize the thing.
First, we need to make the problem repro in the PetStore project, and then fix that.
The text was updated successfully, but these errors were encountered:
Looks like this behaviour came in with an update to the Microsoft OpenAPI libraries, and then was fixed in a later release, so it no longer repros. However, we're no longer confidence that the code serializing the schema in the error response is doing things the best way. Look into whether we should use a different way to serialize the schema into the response.
If Menes detects that input fails schema validation, it attempts to produce a 400 response that describes the problem, and which includes a copy of the schema that has been violated.
At some point (we think somewhere mid 2022) the Microsoft OpenAPI libraries started including reference details where
$ref
has been used, that end up including a pointer back to the whole OpenAPI doc. This causes Menes to crash because we end up with loops when trying to serialize the schema. But in any case, we shouldn't even be trying to copy the entire open API doc.We need to work out how to stop it doing this. That might entail using the OpenApi library's built in functionality for serializing schemas. Or it might involve customizing how we serialize the thing.
First, we need to make the problem repro in the PetStore project, and then fix that.
The text was updated successfully, but these errors were encountered: