-
Notifications
You must be signed in to change notification settings - Fork 281
Conversion of hyphens to %2d in API documentation #856
Comments
The spec gives these:
where
I guess the percentage sign is not part of the spec. So this behaviour is then expected? |
Hi, this somehow slipped through my notifications 🙀 I'm going to take a look at this right away. |
@gellati Would you please share the relevant piece of your Swagger document here? The #460 and #481 issues might be relevant to this one, but they're talking about API Blueprint. I see from your |
@gellati Any updates on this? |
Test.txt For example, one of our query parameter in our swagger file is defined as: When running dredd, we are getting the following error: Dredd Version: Attached is a simple yaml test file that illustrate the issue (rename .txt to .yaml), which can be run with the option --dry-run to reproduce by running: If I use url encoded query param in the yaml file, the param name shows up decoded in apiary but dredd is still complaining about the same error except that this time the paramater appears to be encoded twice: Maybe my issue is more related to #481... |
Describe your problem
I am not sure if this is a bug...
Concerning this issue #460 , I've tried encoding hyphens (-) as %2d in query parameters, because some APIs are not compliant with RFC 6570. However, %2d is further encoded to %252d, i.e. the percentage sign is further encoded. Is this a bug in the library, or part of expected behaviour? Or does this issue stem from the URI Template library.
I am trying to make a search query to an implementation of a healthcare API which provides this resource, the search/query parameter based-on can be seen at the bottom of the page: https://www.hl7.org/fhir/careplan.html
Converting hyphens to %2d might not be the best way to tackle this problem, but right now I would just like to know where error message originates from.
What command line options do you use?
What is in your
dredd.yml
?What's your
dredd --version
output?Does
dredd --level=debug
uncover something?Parameter not defined in API description document: based%252don
Can you send us failing test in a Pull Request?
The text was updated successfully, but these errors were encountered: