private readonly array
$cspTemplates ) { } #[Route(path: '/store-api/_info/openapi3.json', defaults: ['auth_required' => '%shopware.api.api_browser.auth_required_str%'], name: 'store-api.info.openapi3', methods: ['GET'])]
public function info(Request
$request): JsonResponse
{ $apiType =
$request->query->
getAlpha('type', DefinitionService::TYPE_JSON_API
);
$apiType =
$this->definitionService->
toApiType($apiType);
if ($apiType === null
) { throw RoutingException::
invalidRequestParameter('type'
);
} $data =
$this->definitionService->
generate(OpenApi3Generator::FORMAT, DefinitionService::STORE_API,
$apiType);
return new JsonResponse($data);
} #[Route(path: '/store-api/_info/open-api-schema.json', defaults: ['auth_required' => '%shopware.api.api_browser.auth_required_str%'], name: 'store-api.info.open-api-schema', methods: ['GET'])]
public function openApiSchema(): JsonResponse
{ $data =
$this->definitionService->
getSchema(OpenApi3Generator::FORMAT, DefinitionService::STORE_API
);