Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/bundle/ApiPlatform/OpenApiFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -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']);
}

Expand Down
3 changes: 3 additions & 0 deletions src/bundle/Resources/api_platform/schemas/views_schemas.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/lib/Server/Controller/User/UserListController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.',
],
],
),
Expand Down
2 changes: 1 addition & 1 deletion src/lib/Server/Controller/User/UserVerifyController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.',
],
],
),
Expand Down
Loading