From cc734c13b72f5fff6b586632c763c939738ab4a4 Mon Sep 17 00:00:00 2001 From: Sarah Ember Date: Thu, 17 Oct 2024 16:07:57 -0700 Subject: [PATCH] Update openapi.md Added 'responses' config to the example: Changing Operations in the OpenAPI Documentation. --- core/openapi.md | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/core/openapi.md b/core/openapi.md index 7b310b9ea1f..8de15d661f7 100644 --- a/core/openapi.md +++ b/core/openapi.md @@ -393,7 +393,27 @@ use App\Controller\RandomRabbit; ] ] ]) - ) + ), + responses: [ + 201 => new Model\Response( + content: new \ArrayObject([ + 'application/json' => [ + 'schema' => [ + 'type' => 'object', + 'properties' => [ + 'status' => ['type' => 'string'], + 'description' => ['type' => 'string'] + ] + ], + 'example' => [ + 'status' => 'success', + 'description' => 'Rabbit picture created.', + ] + ] + ] + ) + ) + ], ) )] class Rabbit