1
0
Fork 0
mirror of synced 2024-07-01 04:30:59 +12:00

fix: hide oauth in specs

This commit is contained in:
loks0n 2024-01-13 10:09:02 +00:00
parent 56fe939713
commit 521cb963a5
5 changed files with 10 additions and 5 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -312,6 +312,7 @@ App::get('/v1/account/sessions/oauth2/:provider')
->label('error', __DIR__ . '/../../views/general/error.phtml')
->label('scope', 'sessions')
->label('sdk.auth', [])
->label('sdk.hideServer', true)
->label('sdk.namespace', 'account')
->label('sdk.method', 'createOAuth2Session')
->label('sdk.description', '/docs/references/account/create-oauth2-session.md')

View file

@ -153,8 +153,12 @@ class OpenAPI3 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 = [