Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request - Option to create rules automatically for example responses #1151

Open
cvsudheer108 opened this issue Sep 27, 2023 · 3 comments
Labels
feature New feature request

Comments

@cvsudheer108
Copy link

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.

@255kb
Copy link
Member

255kb commented Sep 27, 2023

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

@255kb 255kb added the feature New feature request label Sep 27, 2023
@cvsudheer108
Copy link
Author

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
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature request
Projects
None yet
Development

No branches or pull requests

2 participants