openapi-to-postman
openapi-to-postman copied to clipboard
Rename exampleParametersResolution to responseParametersResolution
For requests there is an option named requestParametersResolution that determines whether request bodies are created from schemas or examples. For responses, the equivalent parameter is named exampleParametersResolution. Shouldn't that name be responseSchemasResolution since it's about response schemas and not about example schemas? I thought maybe it was a mistake in the instructions, but I tried responseParametersResolution and got an error saying that it's invalid.
+1
I would go even further and ask why we have to choose? Ideally, if the example is available then Postman should use a provided example. If example is not available then it should fall back to the request parameter. Basically, instead of specifying request resolution and response resolution enums it should be "primary" and "fallback" resolution methods.
@khazamov @steve-nay-sage Thanks for the feedback.
The example
in the name indicates the Postman Example and not the response in the OAS spec. But I do understand the confusion.
@khazamov Also regarding the defaults: https://github.com/postmanlabs/openapi-to-postman/blob/develop/OPTIONS.md Here you can find that for exampleParametersResolution
the default is in fact example. And if that is not found we fall back on the schema. We can also think of making the default for requestParametersResolution to example too, but that might affect existing users in postman app.
cc @VShingala
@umeshp7 Is this issue open for contributing?