Api-blueprint: Issue with underscore in both name and value of enumerated parameter

Created on 1 Nov 2016  路  2Comments  路  Source: apiaryio/api-blueprint

Using the below spec, I get the error:

parameter 'start_time: recorded_at' is not found within the URI template '/api/devices/{imei}{?start_time}' for 'Device'

I have found that it works properly with an underscore in either the parameter name or the example value. It only seems to fail when there is an underscore in both places.

```
FORMAT: 1A

API

Device [/api/devices/{imei}{?start_time}]

A device resource

  • Parameters

    • start_time: recorded_at (enum[string], optional)

      QWERTY

      • Members

        • recorded_at

        • created_at

          ```

Most helpful comment

_ is reserved character because it has a meaning in markdown so if you wan to use it in parameter name you need escape it using backticks. See the API Blueprint below it does not produce any warning or error.

Relevant part of the MSON Spec for more details: https://apiblueprint.org/documentation/mson/specification.html#6-reserved-characters--keywords

FORMAT: 1A

# API

## Device [/api/devices/{imei}{?start_time}]
A device resource

+ Parameters

    + `start_time`: `recorded_at` (enum[string], optional)

        QWERTY

        + Members
            + `recorded_at`
            + `created_at`

All 2 comments

_ is reserved character because it has a meaning in markdown so if you wan to use it in parameter name you need escape it using backticks. See the API Blueprint below it does not produce any warning or error.

Relevant part of the MSON Spec for more details: https://apiblueprint.org/documentation/mson/specification.html#6-reserved-characters--keywords

FORMAT: 1A

# API

## Device [/api/devices/{imei}{?start_time}]
A device resource

+ Parameters

    + `start_time`: `recorded_at` (enum[string], optional)

        QWERTY

        + Members
            + `recorded_at`
            + `created_at`

Thanks @w-vi, that works for me.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

AlexKorovyansky picture AlexKorovyansky  路  4Comments

danilvalov picture danilvalov  路  3Comments

mootpointer picture mootpointer  路  4Comments

robbinjanssen picture robbinjanssen  路  6Comments

alronlam picture alronlam  路  4Comments