mockoon icon indicating copy to clipboard operation
mockoon copied to clipboard

Feature Request - Option to create rules automatically for example responses

Open cvsudheer108 opened this issue 2 years ago • 3 comments
trafficstars

I have one feature request regarding rules.

In our API development process, we save the distinct responses as examples and great that Mockoon automatically displays them. But finding one issue that we want the responses, if the request fields match with the querystrig/body and header in the example. The idea behind proving example is that, it is for a specific request combination. We could have something like automatically create rules for example as per the params in the querystring/body and custom header. Creating rules every time will resolve the issue, but probably we can make it an optional feature while importing, so that it doesn't break existing users. Please evaluate this request.

cvsudheer108 avatar Sep 27 '23 13:09 cvsudheer108

Could you provide a partial example of an OpenAPI specification and the setup you expect to find in Mockoon? Thanks

255kb avatar Sep 27 '23 13:09 255kb

I verified the open-api spec and found that the examples have the response body, but not the request details that could create this reponse. I see the postman export JSON has it. We use this tool to create open api from postman JSON: https://joolfe.github.io/postman-to-openapi/ Is there any plan to allow importing postman collection in Mockoon?

cvsudheer108 avatar Sep 27 '23 16:09 cvsudheer108

On Mockoon, I would like the rules to be added like this for each example, but the request for the example is available in postman imported json only. Screenshot 2023-09-27 at 10 42 05 PM

cvsudheer108 avatar Sep 27 '23 17:09 cvsudheer108