mirror of
https://github.com/jikan-me/jikan-rest.git
synced 2025-02-20 11:23:35 +08:00
26 lines
494 B
PHP
26 lines
494 B
PHP
<?php
|
|
|
|
namespace App\Dto\Concerns;
|
|
|
|
use App\Rules\Attributes\MaxLimitWithFallback;
|
|
use OpenApi\Annotations as OA;
|
|
use Spatie\LaravelData\Attributes\Validation\IntegerType;
|
|
use Spatie\LaravelData\Attributes\Validation\Min;
|
|
use Spatie\LaravelData\Optional;
|
|
|
|
|
|
/**
|
|
* @OA\Parameter(
|
|
* name="limit",
|
|
* in="query",
|
|
* @OA\Schema(type="integer")
|
|
* ),
|
|
*/
|
|
trait HasLimitParameter
|
|
{
|
|
use PreparesData;
|
|
|
|
#[IntegerType, Min(1), MaxLimitWithFallback]
|
|
public int|Optional $limit;
|
|
}
|