apiaryio / Paw-APIBlueprintImporter

Paw extension to import API Blueprint
https://paw.cloud/extensions/APIBlueprintImporter
MIT License
9 stars 5 forks source link

Parsing URL Params #15

Closed mekanixdk closed 5 years ago

mekanixdk commented 8 years ago

Let my start apologizing if my question sound silly because I'm not quite sure what I should expect of APIBlueprintImporter.

I've tried importing one of the API Blueprint examples (https://github.com/apiaryio/api-blueprint/blob/master/examples/Gist%20Fox%20API.md) and the URL Params doesn't look like they are correctly handled.

Fx. for "Create a Gist" {?since} gets parsed as since} and the http part looks like this: POST /gists%7B?since%7D HTTP/1.1.

Is this the expected behaviour or am I doing something wrong?

kylef commented 8 years ago

This isn't expected behaviour, and for me it's importing the complete URI Template (here's a screenshot):

screen shot 2016-01-19 at 18 21 45 screen shot 2016-01-19 at 18 23 27

Which allows the user to either fill in this detail or remove it.

Could you please let me know which version of Paw you are using?

-Kyle

mekanixdk commented 8 years ago

I am seeing the same, so we may speak past eachother. Here is another screenshot

image

I was hoping/expecting that API BlueprintImporter would list all the URI Params in rows, leaving it to me to fill out just the values.

It appears to work with Body / JSON Params though.

I am running Paw 2.2.9

kylef commented 8 years ago

Ah, I see what you mean. I though you meant in the URL bar itself.

"URI Params" in Paw isn't quite the same as "URI Parameters" in API Blueprint. In Paw the URI Params is just the query parameters, which start with ?. Looks like it's picking out the ? in {?since}. Whereas in API Blueprint the URI parameters include other things like {id} (from my other screenshot) which wouldn't be shown in the "URL Params" section in Paw.

Let me have a think about how we can solve this, thanks for reporting @mekanixdk.

mekanixdk commented 8 years ago

Thanks.

It would be cool if {id} could be handled as well, but I guess that's beyond the design of Paw.