Skip to content

Commit d423095

Browse files
authored
Update openapi.md (#2042)
Added 'responses' config to the example: Changing Operations in the OpenAPI Documentation.
1 parent 7990e10 commit d423095

File tree

1 file changed

+21
-1
lines changed

1 file changed

+21
-1
lines changed

core/openapi.md

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -497,7 +497,27 @@ use App\Controller\RandomRabbit;
497497
]
498498
]
499499
])
500-
)
500+
),
501+
responses: [
502+
201 => new Model\Response(
503+
content: new \ArrayObject([
504+
'application/json' => [
505+
'schema' => [
506+
'type' => 'object',
507+
'properties' => [
508+
'status' => ['type' => 'string'],
509+
'description' => ['type' => 'string']
510+
]
511+
],
512+
'example' => [
513+
'status' => 'success',
514+
'description' => 'Rabbit picture created.',
515+
]
516+
]
517+
]
518+
)
519+
)
520+
],
501521
)
502522
)]
503523
class Rabbit

0 commit comments

Comments
 (0)