AEQ
AEQ

Reputation: 1429

Apiary: Is there a way to define options for parameters?

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

Upvotes: 4

Views: 4601

Answers (2)

julien bouteloup
julien bouteloup

Reputation: 3092

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

/api/data{?measurement}

Upvotes: 1

Zdenek
Zdenek

Reputation: 3693

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.

Upvotes: 10

Related Questions