"required" Not showing in documentation generated by apidoc.js

272 Views Asked by At

I am trying to generate Rest api documentation using apidoc.js. Everything working perfect except the "required" marking not showing in documentation. like below enter image description here

I have change template setting showRequiredLabels to true as per the documentation. But in my case its generating some thing like below.

enter image description here

This is my apidoc.json looks like

{
  "name": "Sample API",
  "version": "1.0.0",
  "description": "Sample API Documentation",
  "url" : "https://sampleapi.com/v1",
  "template": {
    "showRequiredLabels": true,
    "withCompare": true,
    "withGenerator": true,
    "aloneDisplay": false
  }
}

Anyone please help me to find out if I'm missed anything.

1

There are 1 best solutions below

1
Dmitry Mashkovtsev On

This setting was added in version 0.50.3. Check the version of apidoc used in your project.

Changes as always can be found here https://github.com/apidoc/apidoc/blob/master/CHANGELOG.md