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

Escape hyphen in attribute example value #248

Closed
alronlam opened this issue Aug 11, 2015 · 4 comments
Closed

Escape hyphen in attribute example value #248

alronlam opened this issue Aug 11, 2015 · 4 comments

Comments

@alronlam
Copy link

Hi, I'm editing a blueprint on Apiary.io.
I've been trying to add an example value to a response attribute. See snippet below.

  • Response 201 (application/json)
    • Attributes
      • message: Hello-World (string) - description of the message attribute

The question is, how can I escape the hyphen in Hello-World? It seems that anything after the first hyphen becomes part of the attribute description. I've tried escaping with , and surrounding the hyphen with `. Both don't seem to work.

Any help would be greatly appreciated. Thanks!

@alronlam alronlam changed the title Escape hyphens in attribute example values Escape hyphen in attribute example values Aug 11, 2015
@alronlam alronlam changed the title Escape hyphen in attribute example values Escape hyphen in attribute example value Aug 11, 2015
@pksunkara
Copy link
Contributor

You can use backticks to escape MSON reserved characters.

+ message: `Hello-World` (string) - description

@alronlam
Copy link
Author

Thanks and sorry for the trouble! I just checked, and using backticks solved the problem. The live preview just wasn't updating properly.

@bennettellis
Copy link

I have an parameter called "template_type". type is apparently a keyword
I try using the backtics around the full parameter name and just the word type but in both cases I get the same error, "Ignoring unrecognized block". If I leave it as template_type, it semantically clears the checks, but my parameter is ignored and not presented in the API doc in the example or the console. What am I doing wrong?

@bennettellis
Copy link

never mind. Figured it out -- URL encoded both param in the URI and in the parameter list and it works fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants