Skip to content
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

Postman collection export: encoding value to prevent validation errors #888

Merged
merged 3 commits into from
Sep 15, 2024

Conversation

eschricker
Copy link
Contributor

The generated postman collection from my project was not valid. It contained several value entries for query parameters that were pure integer values. This is not compatible with the postman format, which requires strings.

Therefore, I added urlencode to the value in PostmanCollectionWriter to avoid validation errors.

@shalvah
Copy link
Contributor

shalvah commented Sep 7, 2024

Hm, I'm reluctant to add this because URL encoding will potentially have other effects on regular strings. I think there's been a lot of back and forth on encoding for Postman collections in this project. People complain when we don't encode; people complain when we do.

@eschricker
Copy link
Contributor Author

Would it be better to check if the value is a string to take it as it is and only encode if it is not a string?

@shalvah
Copy link
Contributor

shalvah commented Sep 11, 2024

Yeah, let's do that.

@eschricker
Copy link
Contributor Author

I have changed urlencode with strval due to complains of phpstan. urlencode expects a string as input.

@shalvah shalvah merged commit 3ab4ae7 into knuckleswtf:master Sep 15, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants