mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-09 06:07:49 +00:00
46 lines
1.1 KiB
PHP
46 lines
1.1 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace FireflyIII\JsonApi\V2\Accounts;
|
|
|
|
use Illuminate\Support\Facades\Log;
|
|
use LaravelJsonApi\Laravel\Http\Requests\ResourceQuery;
|
|
use LaravelJsonApi\Validation\Rule as JsonApiRule;
|
|
|
|
class AccountSingleQuery extends ResourceQuery
|
|
{
|
|
/**
|
|
* Get the validation rules that apply to the request query parameters.
|
|
*/
|
|
public function rules(): array
|
|
{
|
|
Log::debug(__METHOD__);
|
|
|
|
return [
|
|
'fields' => [
|
|
'nullable',
|
|
'array',
|
|
JsonApiRule::fieldSets(),
|
|
],
|
|
'filter' => [
|
|
'nullable',
|
|
'array',
|
|
JsonApiRule::filter()->forget('id'),
|
|
],
|
|
'include' => [
|
|
'nullable',
|
|
'string',
|
|
JsonApiRule::includePaths(),
|
|
],
|
|
'page' => JsonApiRule::notSupported(),
|
|
'sort' => JsonApiRule::notSupported(),
|
|
'withCount' => [
|
|
'nullable',
|
|
'string',
|
|
JsonApiRule::countable(),
|
|
],
|
|
];
|
|
}
|
|
}
|