mirror of
https://gitee.com/hyperf/hyperf.git
synced 2024-11-29 18:27:44 +08:00
Added swagger.scan.paths
to rewrite scan paths
for swagger. (#5402)
This commit is contained in:
parent
7fb1f43c19
commit
3262796de5
2
.github/workflows/test-components.yml
vendored
2
.github/workflows/test-components.yml
vendored
@ -6,7 +6,7 @@ on:
|
||||
schedule:
|
||||
- cron: '0 2 * * *'
|
||||
env:
|
||||
SW_VERSION: 'v5.0.1'
|
||||
SW_VERSION: 'v5.0.2'
|
||||
jobs:
|
||||
database:
|
||||
name: Test for Database
|
||||
|
4
.github/workflows/test.yml
vendored
4
.github/workflows/test.yml
vendored
@ -14,7 +14,7 @@ jobs:
|
||||
matrix:
|
||||
os: [ ubuntu-latest ]
|
||||
php-version: [ '8.0', '8.1', '8.2' ]
|
||||
sw-version: [ 'v4.5.11', 'v4.6.7', 'v4.7.1', 'v4.8.12', 'v5.0.1', 'master' ]
|
||||
sw-version: [ 'v4.5.11', 'v4.6.7', 'v4.7.1', 'v4.8.12', 'v5.0.2', 'master' ]
|
||||
exclude:
|
||||
- php-version: '8.1'
|
||||
sw-version: 'v4.5.11'
|
||||
@ -57,7 +57,7 @@ jobs:
|
||||
rm swoole.tar.gz
|
||||
cd swoole
|
||||
phpize
|
||||
if [ _${{ matrix.sw-version }} = '_v5.0.1' ] || [ _${{ matrix.sw-version }} = '_master' ]
|
||||
if [ _${{ matrix.sw-version }} = '_v5.0.2' ] || [ _${{ matrix.sw-version }} = '_master' ]
|
||||
then
|
||||
./configure --enable-openssl --enable-swoole-curl --enable-cares --enable-swoole-pgsql --enable-brotli
|
||||
else
|
||||
|
@ -1,5 +1,9 @@
|
||||
# v3.0.7 - TBD
|
||||
|
||||
## Added
|
||||
|
||||
- [#5042](https://github.com/hyperf/hyperf/pull/5402) Added `swagger.scan.paths` to rewrite `scan paths` for swagger.
|
||||
|
||||
# v3.0.6 - 2023-02-12
|
||||
|
||||
## Fixed
|
||||
|
@ -16,4 +16,7 @@ return [
|
||||
'html' => null,
|
||||
'url' => '/swagger',
|
||||
'auto_generate' => true,
|
||||
'scan' => [
|
||||
'paths' => null,
|
||||
],
|
||||
];
|
||||
|
@ -21,7 +21,10 @@ class Generator
|
||||
|
||||
public function generate(): void
|
||||
{
|
||||
$paths = $this->config->get('annotations.scan.paths', []);
|
||||
$paths = $this->config->get('swagger.scan.paths', null);
|
||||
if ($paths === null) {
|
||||
$paths = $this->config->get('annotations.scan.paths', []);
|
||||
}
|
||||
|
||||
$openapi = \OpenApi\Generator::scan($paths, [
|
||||
'validate' => false,
|
||||
|
Loading…
Reference in New Issue
Block a user