diff --git a/src/bundle/ApiPlatform/OpenApiFactory.php b/src/bundle/ApiPlatform/OpenApiFactory.php index faf7385d1..8abc78bbd 100644 --- a/src/bundle/ApiPlatform/OpenApiFactory.php +++ b/src/bundle/ApiPlatform/OpenApiFactory.php @@ -104,8 +104,8 @@ private function processOperationResponses(Operation $operation): Operation $exampleFilePath = $this->kernel->locateResource($responseContent['x-ibexa-example-file']); $exampleFileContent = file_get_contents($exampleFilePath); - - $newContent[$mediaType]['example'] = $exampleFileContent; + $isJson = 'json' === array_slice(explode('.', pathinfo($exampleFilePath, PATHINFO_FILENAME)), -1, 1)[0]; + $newContent[$mediaType]['example'] = $isJson ? json_decode($exampleFileContent ?: '', true, 512, JSON_THROW_ON_ERROR) : $exampleFileContent; unset($newContent[$mediaType]['x-ibexa-example-file']); } diff --git a/src/bundle/Resources/api_platform/schemas/views_schemas.yml b/src/bundle/Resources/api_platform/schemas/views_schemas.yml index e421b0bf4..dd166c6b4 100644 --- a/src/bundle/Resources/api_platform/schemas/views_schemas.yml +++ b/src/bundle/Resources/api_platform/schemas/views_schemas.yml @@ -75,6 +75,9 @@ schemas: performCount: description: If true, search engine should perform count even if that means extra lookup. type: boolean + LocationQuery: + description: This class is used to perform a Location query. + $ref: "#/components/schemas/Query" Criterion: description: Criterion implementations. type: object diff --git a/src/lib/Server/Controller/User/UserListController.php b/src/lib/Server/Controller/User/UserListController.php index 4b9a0df7f..c926568ab 100644 --- a/src/lib/Server/Controller/User/UserListController.php +++ b/src/lib/Server/Controller/User/UserListController.php @@ -61,7 +61,7 @@ ], ], Response::HTTP_NOT_FOUND => [ - 'description' => 'If there are no visibile Users matching the filter.', + 'description' => 'If there are no visible Users matching the filter.', ], ], ), diff --git a/src/lib/Server/Controller/User/UserVerifyController.php b/src/lib/Server/Controller/User/UserVerifyController.php index 4e8d58f0e..1ef4c8637 100644 --- a/src/lib/Server/Controller/User/UserVerifyController.php +++ b/src/lib/Server/Controller/User/UserVerifyController.php @@ -30,7 +30,7 @@ 'description' => 'OK - verifies if there are Users matching the given filter.', ], Response::HTTP_NOT_FOUND => [ - 'description' => 'Error - there are no visibile Users matching the filter.', + 'description' => 'Error - there are no visible Users matching the filter.', ], ], ),