DarkaOnLine / L5-Swagger

OpenApi or Swagger integration to Laravel
https://github.com/DarkaOnLine/L5-Swagger
MIT License
2.64k stars 394 forks source link

Deep Linking is not working #462

Closed kah9509 closed 2 years ago

kah9509 commented 2 years ago

Description:

I want use DeepLinking Update l5-swagger.php ui > display > add 'deep_linking' => true But is not working..What should I do

This is my code.

'ui' => [
            'display' => [
                /*
                 * Controls the default expansion setting for the operations and tags. It can be :
                 * 'list' (expands only the tags),
                 * 'full' (expands the tags and operations),
                 * 'none' (expands nothing).
                 */
                'doc_expansion' => env('L5_SWAGGER_UI_DOC_EXPANSION', 'none'),

                'deep_linking' => true, // This!!!!

                /**
                 * If set, enables filtering. The top bar will show an edit box that
                 * you can use to filter the tagged operations that are shown. Can be
                 * Boolean to enable or disable, or a string, in which case filtering
                 * will be enabled using that string as the filter expression. Filtering
                 * is case-sensitive matching the filter expression anywhere inside
                 * the tag.
                 */
                'filter' => env('L5_SWAGGER_UI_FILTERS', true), // true | false
            ],

            'authorization' => [
                /*
                 * If set to true, it persists authorization data, and it would not be lost on browser close/refresh
                 */
                'persist_authorization' => env('L5_SWAGGER_UI_PERSIST_AUTHORIZATION', false),
            ],
        ],

Steps To Reproduce:

DarkaOnLine commented 2 years ago

You need to update the template for this. We've a PR which was merged (still not released) to support this by default: https://github.com/DarkaOnLine/L5-Swagger/pull/459

kah9509 commented 2 years ago

OK I got it, Thank You~~!!

kah9509 commented 2 years ago

Thanks for the DeepLinking update. But how would you use it? After updating to 8.3.1, I modified the l5-swagger.php file same, but it doesn't seem to be applied.

DarkaOnLine commented 2 years ago

You don't need to edit the config. You should replace your published resources/views/index.blade.php or just add this option in the current one you have like this: https://github.com/DarkaOnLine/L5-Swagger/pull/459/files#diff-e6a72274bd2be1ba8cf26cb930f07d9c65cf4329bfc5f832779d8be3129ea3c6R62

kah9509 commented 2 years ago

Thank you!!! works very well!!