-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProblemDetailsInvalidRequestBody.php
More file actions
41 lines (36 loc) · 1.08 KB
/
ProblemDetailsInvalidRequestBody.php
File metadata and controls
41 lines (36 loc) · 1.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<?php
declare(strict_types=1);
/*
* This file is part of the StixxOpenApiCommandBundle package.
*
* (c) Stixx
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Stixx\OpenApiCommandBundle\Model;
use Nelmio\ApiDocBundle\Attribute\Model;
use OpenApi\Attributes as OA;
#[OA\Schema(
title: 'InvalidRequestBody',
properties: [
new OA\Property(property: 'violations', type: 'array', items: new OA\Items(ref: new Model(type: Violation::class)), maxItems: 100),
],
example: [
'type' => 'about:blank',
'title' => 'The request body contains errors.',
'status' => 400,
'detail' => 'Validation failed.',
'violations' => [
[
'propertyPath' => 'foo',
'message' => 'This value should not be blank.',
'code' => 'c1ac8c7d-eab5-458f-a950-fcf121d23059',
'constraint' => 'NotBlank',
],
],
]
)]
final class ProblemDetailsInvalidRequestBody extends ProblemDetails
{
}