Api-blueprint: Escape hyphen in attribute example value

Created on 11 Aug 2015  路  4Comments  路  Source: apiaryio/api-blueprint

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!

Question

Most helpful comment

You can use backticks to escape MSON reserved characters.

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

All 4 comments

You can use backticks to escape MSON reserved characters.

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

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

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?

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rodriguise picture rodriguise  路  11Comments

AlexKorovyansky picture AlexKorovyansky  路  4Comments

pete001 picture pete001  路  6Comments

spark-developer picture spark-developer  路  12Comments

mootpointer picture mootpointer  路  4Comments