Extract OpenAPI YAML from insomnia
Needs yq
(think jq
for YAML). E. g. scoop install yq
Windows:
yq eval .contents $(ls .\.insomnia\ApiSpec\spc_*.yml) > openapi.yaml
(cat .\openapi.yaml) -replace '\\/', '/' | yq -o json > .\openapi.json
Unix-like:
yq eval .contents $(ls .\.insomnia\ApiSpec\spc_*.yml) > openapi.yaml
cat ./openapi.yaml | sed "s/\\\\\//\//g" | yq -o json > ./openapi.json