SwaggerLume
SwaggerLume copied to clipboard
How to use swagger.yaml?
Hi Guys,
How to use endpoint mapping by a yaml file instead of mapping by annotations in the controllers class?
Example: https://github.com/zircote/swagger-php/blob/master/Examples/petstore.swagger.io/petstore.swagger.io.yaml
I need to know that too.
Any updates on the issue?
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',
@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!