-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
paramters with underscore that have sample values with underscore do not work #311
Comments
Parameter keys and values which contains a reserved character ( + Parameters
+ `template_type`: `advocacy_post` (string, required) the template type Note: There is a known issue [drafter#123] with using backticks in parameters. |
backticks don't solve the problem. |
@kylef for what it is worth this is about parameters and not attributes (parameters are, for now, using a different parsing mechanism) |
Hi. Was this issue solved? I have similar problem where our session id has underscore and I am getting Parser warning that
Api blueprint:
If i change "_" to "-", everything works fine and I get no warnings. Best regards. |
Yes, I believe it was. At the time I entered this issue, backticks were not working for parameters. Not exactly sure when it was fixed, but I do know they work. You need to do something like the above referenced backtick escaping, so for me it was:
Your syntax is wrong though, so it's not just the backticks, it's also the way you've specified the parameter. You really want something like this (I added this into my own apiary doc temporarily to test, and it validated and works fine).
Hope that helps. Oh, also you should NOT escape the backticks in your URI template. |
@bennettellis Thank you for the prompt answer. Your solution worked. |
Doesn't work. Always interprets the end-to-end underscores as something strange and causes syntax errors. Attempts to escape them with %5f don't work because the parameter does not pass through properly in the console when making the request. The only thing that I've found that works is taking the second underscore out and making the parameter be this:
+ template_type: advocacy post (string, required) the template type
I can get by with that but it's not really good because the sample should have an underscore in it. All of the valid values for that parameter have an underscore in them, so I can only make it work by putting in a sample value that would never work.
The text was updated successfully, but these errors were encountered: