Enforce Parameter Validation

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:

11:39:17 AM
Responding with the requested status code 201
11:39:17 AM
Found a compatible content for /
11:39:17 AM
The request passed the validation rules. Looking for the best response
11:39:17 AM
Request contains an accept header: /
11:39:17 AM
Request received: POST /myAPI/stuff

How can one force the mock server to check for the presence of the right settings in the body?

Hey,

Prism should correctly support the required keyword. Is there any way you can share a minimal OAS document that manifests the problem, so I can take a look into?

Thanks,

V.