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
The problem, to my eyes, is that {} is the incorrect response type here. Since the property is optional, prisma should instead just omit the property in its return.
Context
Right now we're unable to use mocking for certain endpoints that use this pattern and thus have to disable testing for this.
Current Behavior
Right now prisma will throw a validation error on its own when you make a request to
/pet
:[5:14:38 PM] › [VALIDATOR] ✖ error Violation: response.body.parent.parent Response body property parent.parent must have required property 'name'
This is because it's returning the following object:
Expected Behavior
The problem, to my eyes, is that
{}
is the incorrect response type here. Since the property is optional, prisma should instead just omit the property in its return.Possible Workaround/Solution
I'm not aware of any workarounds. I don't believe using the OpenAPI 3.1 flavor of sibling refs would work either: https://redocly.com/learn/openapi/all-of#siblings-to-ref-s
Steps to Reproduce
Easily reproduced using the example request and
curl http://127.0.0.1:4010/pet
Environment
The text was updated successfully, but these errors were encountered: