-
Notifications
You must be signed in to change notification settings - Fork 96
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Failed to parse environment file: json: cannot unmarshal number into Go struct field .value of type string #45
Comments
Facing the same issue:
While having env file like this:
|
+1 |
I can parse a collection fine using the following command--
postmanerator -output=./doc.html -collection=/var/www/[email protected]/config/postman_collection.json
this will show me a success message, however when i try and attach my corresponding environment variables, i get the following error:
postmanerator -output=./doc.html -collection=/var/www/[email protected]/config/postman_collection.json -environment=/var/www/[email protected]/config/postman_environment.json
Failed to parse environment file: json: cannot unmarshal number into Go struct field .value of type string
Upon inspection of the postman_environment.json file i have seen the few lines which are causing the issue by a process of elmination:
{
"key": "expires_in",
"value": 31536000,
"enabled": true,
"type": "text"
},
{
"key": "device_id",
"value": 22,
"enabled": true,
"type": "text"
},
It appears that upon inspecting a integer value which is labeled as a text type, postmanerator will read as a string. I can fix the issue by surrounding the value in quotes, however we wish to make the process of documentation automated. Thanks
The text was updated successfully, but these errors were encountered: