4

I would like to define options for Apiary parameters, I'm currently listing them in the description:

  • measurement = m (optional, string, m) ... measurement e.g. m = meters, km = kilometers, yd = yards, mi = miles
dan1st
  • 12,568
  • 8
  • 34
  • 67
AEQ
  • 1,339
  • 1
  • 16
  • 20

2 Answers2

10

You can enumerate the possible values of an URI query parameter and discuss it in the parameter discussion like so:

+ Parameters
    + measurement = `m` (optional, string) ... measurement units

        Any discussion here...

        e.g. explanation of **values** listed bellow are.

        + Values
            + `m`
            + `mi`
            + `yd`

Also see the Documenting query parameters with API Blueprint question.

Community
  • 1
  • 1
Zdenek
  • 3,653
  • 27
  • 34
1

You can define the optional parameters in the endpoint as below:

/api/data{?measurement}
julien bouteloup
  • 3,022
  • 22
  • 16