mocks-server / main

Node.js mock server running live, interactive mocks in place of real APIs
https://www.mocks-server.org
Apache License 2.0
289 stars 15 forks source link

OpenApi validation #254

Open javierbrea opened 3 years ago

javierbrea commented 3 years ago

It is desirable to add a command (maybe a plugin) to validate the server responses using a OpenApi document, which would be a kind of "contract tests". Further investigation is needed in order to find the better approach to implement it.

kenset commented 2 years ago

Another option could be to parse an openapi definition and integrate Faker.js to generate the mock data itself.

javierbrea commented 2 years ago

Another option could be to parse an openapi definition and integrate Faker.js to generate the mock data itself.

Thanks for your suggestion @kenset! I have opened another issue (#384 ) for that topic.

javierbrea commented 2 years ago

384 was closed with a first approach in which routes are generated only from OpenAPI responses having examples. #424 has been opened for the topic suggested by @kenset