Search code examples
jsonapi-doc

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?


Solution

  • 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