grthtrhthjhtyjytjytkergtrhtrjytjerhrfh4:24 29/09/2026getSchemaPath()) === false) { throw new NotFoundException( '[SchemaController] unable to find JSON Api Schema file: '. $jsonApi->getSchemaPath() ); } $schemaFile = file_get_contents($jsonApi->getSchemaPath()); if ($schemaFile === false) { throw new ApiException( '[SchemaController] unable to read JSON Api Schema file: '. $jsonApi->getSchemaPath() ); } return $response->withHeader(self::CONTENT_TYPE_HEADER, self::CONTENT_TYPE_JSON)->write($schemaFile); } catch (\Exception $e) { $payload = $this->handleExceptionIntoPayloadError($request, $e, isset($payload) ? $payload : []); } return $this->generateJsonApiResponse($request, $response, $payload); } /** * @param ServerRequestInterface $request * @param ResponseInterface $response * @return ResponseInterface|static * @throws InvalidJsonApiResponseException * @throws InvalidArgumentException * @throws NotAcceptableException * @throws UnsupportedMediaTypeException */ public function getSwaggerSchema(ServerRequestInterface $request, ResponseInterface $response) { try { $path = dirname(__DIR__).'/swagger.json'; if (file_exists($path) === false) { throw new NotFoundException( '[SchemaController] unable to find JSON Api Schema file: '. $path ); } $schemaFile = file_get_contents($path); if ($schemaFile === false) { throw new ApiException( '[SchemaController] unable to read JSON Api Schema file: '. $path ); } return $response->withHeader(self::CONTENT_TYPE_HEADER, self::CONTENT_TYPE_JSON)->write($schemaFile); } catch (\Exception $e) { $payload = $this->handleExceptionIntoPayloadError($request, $e, isset($payload) ? $payload : []); } return $this->generateJsonApiResponse($request, $response, $payload); } }