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
Currently we use only the /credit/verifyCard endpoint.
At first we didn't notice any problems as Prism properly showed the normal type errors for our requests like "field value must be a number, not a string". But when we solved those errors we noticed that one error persists: "Request body property creditVerificationInformation must match exactly one schema in oneOf". We double checked the key names in the request and OpenAPI schema and everything seems fine (although we are not experts in OpenAPI). On the other hand, we can't find a way to get a more detailed error message from Prism to fix the problem.
The request body was copied from GMO's API docs. There were some type errors which we fixed already.
If it's not a bug, is there a way to solve this problem?
Context
We can't create a mock server for the tests and that slows down our development team.
Current Behavior
The mock server returns the following response.
HTTP/1.1 400 Bad Request
Access-Control-Allow-Credentials: true
Access-Control-Allow-Headers: *
Access-Control-Allow-Origin: *
Access-Control-Expose-Headers: *
Connection: close
Content-Length: 109
Content-Type: application/problem+json
Date: Tue, 29 Oct 2024 03:34:49 GMT
Sl-Violations: [{"location":["request","body","creditVerificationInformation"],"severity":"Error","code":"oneOf","message":"Request body property creditVerificationInformation must match exactly one schema in oneOf"}]
{"title":"missing_parameter","detail":"Missing required request parameters.","instance":"/credit/verifyCard"}
Expected Behavior
201 response according to the specification.
Possible Workaround/Solution
It's not exactly a solution but it would be nice to have a more detailed error message which shows what keys inside the property don't match the schema.
Error response should appear with the error in the header like this:
[{"location":["request","body","creditVerificationInformation"],"severity":"Error","code":"oneOf","message":"Request body property creditVerificationInformation must match exactly one schema in oneOf"}]
Environment
Version used: prism 5.10.0 (installed via npm install -g @stoplight/prism-cli)
Environment name and version (e.g. Chrome 39, node.js 5.4): HTTPie desktop client (version 2024.01), curl 8.5.0, Node.js v20.17.0
Operating System and version (desktop or mobile): HTTPie client - windows 11 home, curl and prism - Ubuntu 24.04.1 LTS on WSL on the same desktop PC
Link to your environment/workspace/project:
The text was updated successfully, but these errors were encountered:
Encountering nearly the same bug in Prism 5.10.0, but ours is a query parameter with two schema options. Removing the oneOf and forcing a single schema for the query parameter works. Guessing this is the same code path that's producing these two bugs!
(Realized that we weren't being strict enough in our string-format specifications, thanks to the note from Brenda Rearden on #2469)
Our company tries to setup a Prism mock server for GMO payment system based on the OpenAPI 3.1.0 specification located here
https://static.mul-pay.jp/doc/openapi-type/
Currently we use only the /credit/verifyCard endpoint.
At first we didn't notice any problems as Prism properly showed the normal type errors for our requests like "field value must be a number, not a string". But when we solved those errors we noticed that one error persists: "Request body property creditVerificationInformation must match exactly one schema in oneOf". We double checked the key names in the request and OpenAPI schema and everything seems fine (although we are not experts in OpenAPI). On the other hand, we can't find a way to get a more detailed error message from Prism to fix the problem.
The request body was copied from GMO's API docs. There were some type errors which we fixed already.
If it's not a bug, is there a way to solve this problem?
Context
We can't create a mock server for the tests and that slows down our development team.
Current Behavior
The mock server returns the following response.
Expected Behavior
201 response according to the specification.
Possible Workaround/Solution
It's not exactly a solution but it would be nice to have a more detailed error message which shows what keys inside the property don't match the schema.
Steps to Reproduce
Tried to send the same test request via curl and HTTPie desktop client with the same result (the auth data is random).
Environment
npm install -g @stoplight/prism-cli
)The text was updated successfully, but these errors were encountered: