Skip to content

Commit

Permalink
fix(laravel): add contact & license options to fix swagger UI issues
Browse files Browse the repository at this point in the history
  • Loading branch information
nolotz authored and soyuka committed Nov 18, 2024
1 parent ffadacc commit 089f38a
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
5 changes: 5 additions & 0 deletions src/Laravel/ApiPlatformProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -744,6 +744,11 @@ public function register(): void
oAuthRefreshUrl: $config->get('api-platform.swagger_ui.oauth.refreshUrl', null),
oAuthScopes: $config->get('api-platform.swagger_ui.oauth.scopes', []),
apiKeys: $config->get('api-platform.swagger_ui.apiKeys', []),
contactName: $config->get('api-platform.swagger_ui.contact.name', ''),
contactUrl: $config->get('api-platform.swagger_ui.contact.url', ''),
contactEmail: $config->get('api-platform.swagger_ui.contact.email', ''),
licenseName: $config->get('api-platform.swagger_ui.license.name', ''),
licenseUrl: $config->get('api-platform.swagger_ui.license.url', ''),
);
});

Expand Down
11 changes: 10 additions & 1 deletion src/Laravel/config/api-platform.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,16 @@
// 'refreshUrl' => '',
// 'scopes' => ['scope1' => 'Description scope 1'],
// 'pkce' => true
//]
//],
//'license' => [
// 'name' => 'Apache 2.0',
// 'url' => 'https://www.apache.org/licenses/LICENSE-2.0.html',
//],
//'contact' => [
// 'name' => 'API Support',
// 'url' => 'https://www.example.com/support',
// 'email' => '[email protected]',
//],
],

'url_generation_strategy' => UrlGeneratorInterface::ABS_PATH,
Expand Down

0 comments on commit 089f38a

Please sign in to comment.