yii2-swagger
yii2-swagger copied to clipboard
Where Bearer key?
Have a problem. Bearer not write before key!
@SWG\SecurityScheme(
securityDefinition="Bearer",
type="apiKey",
name="Authorization",
in="header"
),
Result:
-H "Authorization: r6IesHXXyGqhePR_Rg3o5ULCbgn1eHMn"
but must be a
-H "Authorization: Bearer r6IesHXXyGqhePR_Rg3o5ULCbgn1eHMn"
Sorry for my english ;)
tl;dr: Stop using this package. It doesnt support 3.0 version of zircote/swagger-php.
Its available only for openapi 3.0 schema. You must specify additional parameter "bearerFormat". This means you cannot use SWG annotations and you must use OA annotations instead. https://swagger.io/docs/specification/authentication/bearer-authentication/