From eb4307b24485a0d22d86ce8bf165364a6947c390 Mon Sep 17 00:00:00 2001 From: clementvtrd <84911237+clementvtrd@users.noreply.github.com> Date: Thu, 8 Dec 2022 11:36:56 +0100 Subject: [PATCH] feature: add a JsonContent attributes fill the content property of the request body --- src/OpenApi/Attributes/JsonContent.php | 29 ++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 src/OpenApi/Attributes/JsonContent.php diff --git a/src/OpenApi/Attributes/JsonContent.php b/src/OpenApi/Attributes/JsonContent.php new file mode 100644 index 0000000..77fe4e3 --- /dev/null +++ b/src/OpenApi/Attributes/JsonContent.php @@ -0,0 +1,29 @@ +jsonSerialize()), + example: iterator_to_array($schema->getExamples()), + title: $schema->getTitle(), + description: $schema->getDescription(), + ); + } +}