if (self::API
[$api]['apiKey'
]) { return ['ApiKey' =>
[]];
} return ['oAuth' =>
['write'
]];
} private function enrichComponents(Components
$components, string
$api): void
{ $components->
merge($this->
getDefaultSchemas());
$components->
merge($this->
createSecurityScheme($api));
$components->
merge($this->
createDefaultResponses());
} /**
* @return Schema[]
*/
private function getDefaultSchemas(): array
{ $defaults =
[ 'success' =>
new Schema([ 'schema' => 'success',
'type' => 'object',