Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changelog(OpenAPI-2-Kong): Fixed an issue where Kong declarative config generation had different behaviour for name delimiters between Inso CLI's npm package and binary release
The problem
TL;DR: We have an issue where generating a kong declarative config, we replace dashes in original title of openapi specs with underscores. It's reproducible on tests, on
inso-cliinstalled via github releases, and also on Insomnia plugin.E.g.
Investigation
After pairing with @DMarby and @gatzjames we found out some things:
inso-cliinstalled via npm (e.g.npm i insomnia-inso@2.8.0) faced a weird behavior where declarative kong configs that had names and some strings with stuff using-dashes stayed with dashes.inso clifrom Github, or in the Insomnia Plugin, the-dash characters were replaced with underscore.This was happening due to a difference in versions of
slugify.The packaged inso/insomnia was using an older
slugifyversion that caused-dashes to be wrongly replaced.Folks using
insofrom NPM had the latestslugifyversion (e.g.1.6.5) which didn't have this behavior.Ultimately this difference in what
slugifyversion was used on packaged inso vs. on inso via npm caused the overall weirdness that folks reported in #4432 and also in support tickets.In this PR we pin
slugifyto1.6.5so the behavior stays consistent between packaged and npminso, and we fixed and added tests to check the behavior is consistent.TODO