Skip to content
This repository was archived by the owner on Nov 8, 2024. It is now read-only.

Unescape the path variable#24

Open
tobz-nz wants to merge 3 commits intoapiaryio:masterfrom
tobz-nz:patch-1
Open

Unescape the path variable#24
tobz-nz wants to merge 3 commits intoapiaryio:masterfrom
tobz-nz:patch-1

Conversation

@tobz-nz
Copy link

@tobz-nz tobz-nz commented Aug 2, 2017

so that characters like { and } are not escaped to html entities.

tobz-nz added 3 commits August 3, 2017 10:46
so that characters like { and } are not escaped to html entities.
Update APIBlueprintGenerator.js
@tobz-nz
Copy link
Author

tobz-nz commented Aug 2, 2017

This allows for variables to be properly defined in the url

@kylef
Copy link
Member

kylef commented Mar 20, 2020

@tobz-nz I'm really sorry that we never got back to you on this one. This pull request must've slipped through the cracks.

If you happen to remember any more details, could you share an example Paw request and how its rendered before to help explain the problem that this changeset solves. I think a screenshot would suffice.

@tobz-nz
Copy link
Author

tobz-nz commented Mar 20, 2020

hmmm, sorry I don't remembered any details - it was quite a while ago.

My guess would be that if using variables in a url they are getting escaped. something like https://{hostname}/api/users getting output as https://\{hostname\}/api/users or something?

@kylef
Copy link
Member

kylef commented Mar 26, 2020

The host component of the URI is stripped out, only the path makes it to the generated API Blueprint example.

I've tested with some characters in the parameters which are reserved and as I would expect, these are percent encoded in the API Blueprint:

Screenshot 2020-03-26 at 18 04 12

@kylef
Copy link
Member

kylef commented Mar 26, 2020

If you have { characters in Paw, I don't think it would even be capable of making a request:

Screenshot 2020-03-26 at 18 05 20

@tobz-nz
Copy link
Author

tobz-nz commented Mar 26, 2020

🤷‍♂️ Yeah I don't know. It was all too long ago now.
Maybe just close this issue.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants