apiaryio / api-blueprint

API Blueprint
https://apiblueprint.org
MIT License
8.65k stars 2.14k forks source link

Unable to escape underscore #421

Closed fgblomqvist closed 5 years ago

fgblomqvist commented 6 years ago

Example

+ Request (application/json)
    + Attributes
        + api_key: `<API_KEY>` (string, required)

Gets parsed like this: screenshot from 2018-03-07 12-20-19

(Dredd also reads it in the same way, so it is definitely the parser that is wrong)

kylef commented 6 years ago

You will need to escape the underscore, for example:

+ Request (application/json)
    + Attributes
        + `api_key`: `<API_KEY>` (string, required)
fgblomqvist commented 6 years ago

Ah, didn't realize that it was the first underscore that was causing the issue. Apiary should imo catch that as a semantic issue: "Attribute names that include underscores need to be escaped with backticks" or something along those lines.

kylef commented 5 years ago

I'm going to close this issue as it's tracked in https://github.com/apiaryio/api-blueprint/issues/210.