fix: sdk.hideServer & sdk.hideClient

This commit is contained in:
loks0n
2024-02-24 13:17:58 +00:00
parent 5ba50c842b
commit 5ff2121ef7
2 changed files with 8 additions and 4 deletions
+1 -1
View File
@@ -400,7 +400,7 @@ App::get('/v1/account/tokens/oauth2/:provider')
->label('error', __DIR__ . '/../../views/general/error.phtml')
->label('scope', 'sessions.write')
->label('sdk.auth', [])
->label('sdk.hideServer', true)
->label('sdk.hideClient', true)
->label('sdk.namespace', 'account')
->label('sdk.method', 'createOAuth2Token')
->label('sdk.description', '/docs/references/account/create-token-oauth2.md')
@@ -150,10 +150,14 @@ class Swagger2 extends Format
}
if (empty($routeSecurity)) {
$sdkPlatforms[] = APP_PLATFORM_CLIENT;
$sdkPlatforms[] = APP_PLATFORM_SERVER;
if (!$route->getLabel('sdk.hideServer', false)) {
$sdkPlatforms[] = APP_PLATFORM_SERVER;
}
if (!$route->getLabel('sdk.hideClient', false)) {
$sdkPlatforms[] = APP_PLATFORM_CLIENT;
}
}
$temp = [
'summary' => $route->getDesc(),
'operationId' => $route->getLabel('sdk.namespace', 'default') . ucfirst($method),