You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First of all, good job on this tool but I am currently using a nested environment variables structure for an API I am developing but the merging always conflicts with the base settings for endpoint...You can check it out here: https://fanfaro-accounting-api-docs.vercel.app
SyntaxError: JSON.parse: expected ',' or '}' after property value in object at line 2 column 13 of the JSON data
Note that whilst I enter _.email, it still resolves to {{_.email}}
I can use {{email}}, which of course resolves to {{email}} which has the same issue.
Experimenting, I found that by swapping {{_.email}} with \u007B\u007B _.email \u007D \u007D
although - if you notice, there is a space between the last 2 hex codes....take the space out and you get an error again!!!
I've not bothered whether the {{ }} appear in the docs or not - I think that naming the vars better on my part will make the docs work - like:
so all that remains is to get rid of the {{ }} in the insomnia.json file, or replace them... I used a small script to rewrite the export file, before moving to the web site:
var fs = require('fs')
fs.readFile('insomnia.json', 'utf8', (err, data) => {
if (err) { return console.log(err); }
var str = data.replace(/{{ _\.(\w+) }}/g, "\\u007B\\u007B _.$1 \\u007D \\u007D");
fs.writeFile('insomnia.json', str, 'utf8', (err) => {
if (err) { return console.log(err); }
});
});
Hope that helps someone....
....if you are able to patch something similar, that would be great.
First of all, good job on this tool but I am currently using a nested environment variables structure for an API I am developing but the merging always conflicts with the base settings for endpoint...You can check it out here: https://fanfaro-accounting-api-docs.vercel.app
Base Settings:
Folder Settings (e.g auth):
Insomnia Documenter Output:
http://fanfaro.test/api
Expected Output:
http://fanfaro.test/api/auth
This works fine in the Insomnia app.
The text was updated successfully, but these errors were encountered: