Skip to content

Commit 96e8843

Browse files
committed
fix(laravel): add contact & license options to fix swagger UI issues
1 parent fb47197 commit 96e8843

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

src/Laravel/ApiPlatformProvider.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -744,6 +744,11 @@ public function register(): void
744744
oAuthRefreshUrl: $config->get('api-platform.swagger_ui.oauth.refreshUrl', null),
745745
oAuthScopes: $config->get('api-platform.swagger_ui.oauth.scopes', []),
746746
apiKeys: $config->get('api-platform.swagger_ui.apiKeys', []),
747+
contactName: $config->get('api-platform.swagger_ui.contact.name', ''),
748+
contactUrl: $config->get('api-platform.swagger_ui.contact.url', ''),
749+
contactEmail: $config->get('api-platform.swagger_ui.contact.email', ''),
750+
licenseName: $config->get('api-platform.swagger_ui.license.name', ''),
751+
licenseUrl: $config->get('api-platform.swagger_ui.license.url', ''),
747752
);
748753
});
749754

src/Laravel/config/api-platform.php

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,16 @@
8888
// 'refreshUrl' => '',
8989
// 'scopes' => ['scope1' => 'Description scope 1'],
9090
// 'pkce' => true
91-
//]
91+
//],
92+
//'license' => [
93+
// 'name' => 'Apache 2.0',
94+
// 'url' => 'https://www.apache.org/licenses/LICENSE-2.0.html',
95+
//],
96+
//'contact' => [
97+
// 'name' => 'API Support',
98+
// 'url' => 'https://www.example.com/support',
99+
// 'email' => '[email protected]',
100+
//],
92101
],
93102

94103
'url_generation_strategy' => UrlGeneratorInterface::ABS_PATH,

0 commit comments

Comments
 (0)