Problems with apiPrivate and Empty parser result.
gemal opened this issue · 4 comments
I think this happens after #71 got merged
I have the following php file called test.php:
<?php
/**
* @apiDescription xxxx.
* @api {post} /xxxxx/v1/xxxx.json XXXX
* @apiSampleRequest https://xxxxx.com
* @apiGroup xxxxx
* @apiPrivate
* @apiDeprecated use now (xxxxx).
*/
Now I run
apidoc --color --verbose --private --input . --file-filters ".php"
The output is:
{"message":"Please create an apidoc.json configuration file.","level":"warn"}
{"message":"apidoc-generator name: apidoc","level":"verbose"}
{"message":"apidoc-generator version: 0.19.1","level":"verbose"}
{"message":"apidoc-core version: 0.11.0","level":"verbose"}
{"message":"apidoc-spec version: 0.3.0","level":"verbose"}
{"message":"run parser","level":"verbose"}
{"message":{"description":"xxxx."},"level":"verbose"}
{"message":{"type":"post","url":"/xxxxx/v1/xxxx.json","title":"XXXX"},"level":"verbose"}
{"message":{"url":"https://xxxxx.com"},"level":"verbose"}
{"message":{"group":"xxxxx"},"level":"verbose"}
{"message":"","level":"verbose"}
{"File":"test.php","Block":1,"Element":"@apiPrivate","Source":"@apiPrivate","level":"error","message":"Empty parser result."}
I think this happens after #71 got merged
Hello.
I'm not sure. With or without the change in #71 the error is the same. TBH I don't manage to make this @apiPrivate tag work as expected...
Hello guys,
I created a PR #93 to fix that.
I think the documentation here https://apidocjs.com/#param-api-private doesn't match exactly the current state .
for now if you include --private as an argument the API element will be included and by default the element will be excluded, and in documentation i have the impression that i should pass the argument like that --private true to include the API element
Perfect!
I think in v0.25 it is still a fact that false getting interpreted as a truthy value and it does not matter if you set true or false in the parameter.