Skip to content

Commit

Permalink
add some missing internal error responses
Browse files Browse the repository at this point in the history
  • Loading branch information
lukmzig committed Dec 10, 2024
1 parent c0d67a9 commit 6153c3a
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 5 deletions.
3 changes: 2 additions & 1 deletion src/Asset/Controller/GetController.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,9 @@ public function __construct(
content: new OneOfAssetJson()
)]
#[DefaultResponses([
HttpResponseCodes::UNAUTHORIZED,
HttpResponseCodes::BAD_REQUEST,
HttpResponseCodes::NOT_FOUND,
HttpResponseCodes::UNAUTHORIZED,
])]
public function getAssetById(int $id): JsonResponse
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,9 @@ public function __construct(
)
)]
#[DefaultResponses([
HttpResponseCodes::UNAUTHORIZED,
HttpResponseCodes::BAD_REQUEST,
HttpResponseCodes::NOT_FOUND,
HttpResponseCodes::UNAUTHORIZED,
])]
public function getAvailableAssetGridColumns(): JsonResponse
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,9 @@ public function __construct(
content: new JsonContent(ref: DetailedConfiguration::class)
)]
#[DefaultResponses([
HttpResponseCodes::UNAUTHORIZED,
HttpResponseCodes::BAD_REQUEST,
HttpResponseCodes::NOT_FOUND,
HttpResponseCodes::UNAUTHORIZED,
])]
public function getAssetGridConfiguration(
int $folderId,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ public function __construct(
content: new CollectionJson(new GenericCollection(Configuration::class))
)]
#[DefaultResponses([
HttpResponseCodes::BAD_REQUEST,
HttpResponseCodes::UNAUTHORIZED,
HttpResponseCodes::NOT_FOUND,
])]
Expand Down
3 changes: 2 additions & 1 deletion src/Asset/Controller/Image/ThumbnailDownloadController.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,9 @@ public function __construct(
headers: [new ContentDisposition()]
)]
#[DefaultResponses([
HttpResponseCodes::UNAUTHORIZED,
HttpResponseCodes::BAD_REQUEST,
HttpResponseCodes::NOT_FOUND,
HttpResponseCodes::UNAUTHORIZED,
])]
public function downloadImageByThumbnail(int $id, string $thumbnailName): BinaryFileResponse
{
Expand Down
3 changes: 2 additions & 1 deletion src/Asset/Controller/TreeController.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,9 @@ public function __construct(
content: new CollectionJson(new AnyOfAsset())
)]
#[DefaultResponses([
HttpResponseCodes::UNAUTHORIZED,
HttpResponseCodes::BAD_REQUEST,
HttpResponseCodes::NOT_FOUND,
HttpResponseCodes::UNAUTHORIZED,
])]
public function getAssetTree(#[MapQueryString] ElementParameters $parameters): JsonResponse
{
Expand Down

0 comments on commit 6153c3a

Please sign in to comment.