How to use swagger.yaml?
Closed this issue · 4 comments
cesarrod11 commented
Hi Guys,
How to use endpoint mapping by a yaml file instead of mapping by annotations in the controllers class?
meysam001 commented
I need to know that too.
DeukhwaJeong commented
Any updates on the issue?
cesarrod11 commented
Guys, in your swagger-lume.php config file, just replace the .json file to your .yaml file. So:
'paths' => [
/*
|--------------------------------------------------------------------------
| Absolute path to location where parsed swagger annotations will be stored
|--------------------------------------------------------------------------
*/
'docs' => base_path('api-docs'),
/*
|--------------------------------------------------------------------------
| File name of the generated json documentation file
|--------------------------------------------------------------------------
*/
'docs_json' => 'api-docs.yaml',
DeukhwaJeong commented
@cesarrod11 Thank you for your reply. But could you tell me where I should put my .yaml file? My API is getting bigger so I want to move all of my annotations to a new .yaml file but I don't know where I should create the file and how to read the file. If you know the answer, please let me know! Thanks a lot!