decorated->__invoke($context); $this->addRefreshToken($openApi); return $openApi; } private function addRefreshToken(OpenApi $openApi): void { $openApi ->getPaths() ->addPath( '/auth/refresh', (new Model\PathItem())->withPost( (new Model\Operation('postRefreshToken')) ->withTags(['Login check']) ->withResponses([ Response::HTTP_OK => [ 'description' => 'Refresh token', 'content' => [ 'application/json' => [ 'schema' => [ 'type' => 'object', 'properties' => [ 'token' => [ 'type' => 'string', 'readOnly' => true, 'nullable' => false, ], 'refreshToken' => [ 'type' => 'string', 'readOnly' => true, 'nullable' => false, ] ], 'required' => ['token', 'refreshToken'], ], ], ], ], ]) ->withSummary('Create refresh token') ->withRequestBody( (new Model\RequestBody()) ->withDescription('The refresh token data') ->withContent( new \ArrayObject([ 'application/json' => new Model\MediaType(new \ArrayObject(new \ArrayObject([ 'type' => 'object', 'properties' => [ 'refreshToken' => [ 'type' => 'string', 'nullable' => false, ], ], 'required' => ['refreshToken'], ]))) ])) ->withRequired(true) ) )); } }