swagger-php having different documentations from the same code -


we using slim framework , swagger-php dynamically generate swagger documentation. have special methods in api should not publicly documentated. (/doc now) there way can have second documentation url (/doc2) can secret methods , params documentated? (without having make documentation hand, using annotations in php code). thanks.

as per latest version of swagger-php can indicate list of files and/or directories exclude scanning when building documentation.

see scan function's docblock on github details.

a solution problem separate public , private methods different files. create 2 documentation generation methods/functions each excluding other's files.

example:

$privateoptions = array(     'exclude' => array('app/api/public') ); $privatedoc = swagger\scan("app/", $privateoptions); ... $publicoptions = array(     'exclude' => array('app/api/private') ); $publicdoc = swagger\scan("app/", $publicoptions); 

note: example indicative , not tested, can exclude filenames.


Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -