Hello Stoplight team! First of all, thank you for providing such a great tool.
Here is my issue:
I have created an API using Stoplight Studio for Desktop.
I wish to test my endpoint using the mock server.
My problem is that the mock server does not seem to validate the inputs that I provide in my request.
In the specification of request POST /myAPI/stuff, I toggle the required button for several components in the body as well as for a header named “Content-type” (together with an apikey header defined through global security). I also defined two answers, 201 and 422, both with examples.
Then comes my problem.
If a submit a POST /myAPI/stuff with, let’s say, an empty body, I still get a 201 response saying all is fine. The same goes if I remove my header (except apikey which correctly signals a problem).
The log is as follows:
Responding with the requested status code 201
Found a compatible content for /
The request passed the validation rules. Looking for the best response
Request contains an accept header: /
Request received: POST /myAPI/stuff
How can one force the mock server to check for the presence of the right settings in the body?