Skip to content

Commit 7745900

Browse files
soyukanolotz
andauthored
fix(laravel): add contact & license options to fix swagger UI issues (#6804)
Co-authored-by: nolotz <[email protected]>
1 parent ffadacc commit 7745900

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
@@ -87,7 +87,16 @@
8787
// 'refreshUrl' => '',
8888
// 'scopes' => ['scope1' => 'Description scope 1'],
8989
// 'pkce' => true
90-
//]
90+
//],
91+
//'license' => [
92+
// 'name' => 'Apache 2.0',
93+
// 'url' => 'https://www.apache.org/licenses/LICENSE-2.0.html',
94+
//],
95+
//'contact' => [
96+
// 'name' => 'API Support',
97+
// 'url' => 'https://www.example.com/support',
98+
// 'email' => '[email protected]',
99+
//],
91100
],
92101

93102
'url_generation_strategy' => UrlGeneratorInterface::ABS_PATH,

0 commit comments

Comments
 (0)