Kinglish
Kinglish

Reputation: 23664

How to make apidoc.json parameters required?

Super simple but I can't find the docs on how to mark a parameter as required when I markup my document to generate an api-doc (using the package @: http://apidocjs.com)

// My APIDOC markup in my PHP doc

 * @apiParam {String} [type] comma delimited list of any or all of: contests, deals, coupons

... which generates the following html:

enter image description here

I want the optional as shown to become required. What is the markup for that?

Upvotes: 0

Views: 1949

Answers (1)

Kinglish
Kinglish

Reputation: 23664

Found it. Turns out you just remove the [] brackets around the variable

 * @apiParam {String} required_variable comma delimited list of any or all of: contests, deals, coupons

Upvotes: 1

Related Questions