Open SpechtD opened 2 weeks ago
Colon led parameters would not be interpolated by nunjucks rendering. It uses brackets to identify syntax to evaluate.
I'm not sure if I'm overlooking something here, but after changing this
path?.replace(VARIABLE_SEARCH_VALUE, '{{ _.$1 }}') ?? '';
to this
path?.replace(VARIABLE_SEARCH_VALUE, ':$1') ?? '';
it works:
A setting to control the behavior would probably be quite suitable, if some people prefer the old behavior, but in my use case it would be a welcomed change.
I guess it's possible the question is can you make url and headers editable without causing bugs or side effects. @gatzjames what do you think?
Feature Request
With the introduction of path parameters in version 8.6 it would be more fitting to convert path parameters in openapi format to insomnia path parameters with a colon, instead of insomnia variables with double curly brackets.
Current behavior
openapi:
/foo/{bar}
insomnia:/foo/{{_.$1}}
Wanted behavior
openapi:
/foo/{bar}
insomnia:/foo/:bar
Affected code
https://github.com/Kong/insomnia/blob/0ddbccfd3e8d010d3b769a8e562325a8e27ac006/packages/insomnia/src/utils/importers/importers/openapi-3.ts#L272-L278
If my proposal is welcomed, I will open a PR with the requested change myself.