From ceff3762cc21cafd1c695dad59a73e5241354fbf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pa=C5=ADlo=20Ebermann?= Date: Tue, 13 Jun 2017 18:42:24 +0200 Subject: [PATCH] Update samples for ze-ph. (#5823) --- .../petstore/ze-ph/.swagger-codegen/VERSION | 1 + .../ze-ph/application/config/path_handler.yml | 35 +++++++++++++++++++ .../petstore/ze-ph/src/App/DTO/FormatTest.php | 2 +- .../ze-ph/src/App/DTO/OuterBoolean.php | 12 +++++++ .../ze-ph/src/App/DTO/OuterComposite.php | 33 +++++++++++++++++ .../ze-ph/src/App/DTO/OuterNumber.php | 12 +++++++ .../ze-ph/src/App/DTO/OuterString.php | 12 +++++++ .../src/App/Handler/FakeOuterBoolean.php | 27 ++++++++++++++ .../src/App/Handler/FakeOuterComposite.php | 27 ++++++++++++++ .../ze-ph/src/App/Handler/FakeOuterNumber.php | 27 ++++++++++++++ .../ze-ph/src/App/Handler/FakeOuterString.php | 27 ++++++++++++++ 11 files changed, 214 insertions(+), 1 deletion(-) create mode 100644 samples/server/petstore/ze-ph/.swagger-codegen/VERSION create mode 100644 samples/server/petstore/ze-ph/src/App/DTO/OuterBoolean.php create mode 100644 samples/server/petstore/ze-ph/src/App/DTO/OuterComposite.php create mode 100644 samples/server/petstore/ze-ph/src/App/DTO/OuterNumber.php create mode 100644 samples/server/petstore/ze-ph/src/App/DTO/OuterString.php create mode 100644 samples/server/petstore/ze-ph/src/App/Handler/FakeOuterBoolean.php create mode 100644 samples/server/petstore/ze-ph/src/App/Handler/FakeOuterComposite.php create mode 100644 samples/server/petstore/ze-ph/src/App/Handler/FakeOuterNumber.php create mode 100644 samples/server/petstore/ze-ph/src/App/Handler/FakeOuterString.php diff --git a/samples/server/petstore/ze-ph/.swagger-codegen/VERSION b/samples/server/petstore/ze-ph/.swagger-codegen/VERSION new file mode 100644 index 00000000000..7fea99011a6 --- /dev/null +++ b/samples/server/petstore/ze-ph/.swagger-codegen/VERSION @@ -0,0 +1 @@ +2.2.3-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/ze-ph/application/config/path_handler.yml b/samples/server/petstore/ze-ph/application/config/path_handler.yml index 82576b5de10..2b91ca7d58d 100644 --- a/samples/server/petstore/ze-ph/application/config/path_handler.yml +++ b/samples/server/petstore/ze-ph/application/config/path_handler.yml @@ -7,6 +7,37 @@ path_handler: route: /fake defaults: handler: Fake + may_terminate: true + child_routes: + 'outer': + type: Literal + options: + route: /outer + child_routes: + 'boolean': + type: Literal + options: + route: /boolean + defaults: + handler: FakeOuterBoolean + 'composite': + type: Literal + options: + route: /composite + defaults: + handler: FakeOuterComposite + 'number': + type: Literal + options: + route: /number + defaults: + handler: FakeOuterNumber + 'string': + type: Literal + options: + route: /string + defaults: + handler: FakeOuterString 'pet': type: Literal options: @@ -119,6 +150,10 @@ path_handler: handlers: invokables: Fake: App\Handler\Fake + FakeOuterBoolean: App\Handler\FakeOuterBoolean + FakeOuterComposite: App\Handler\FakeOuterComposite + FakeOuterNumber: App\Handler\FakeOuterNumber + FakeOuterString: App\Handler\FakeOuterString Pet: App\Handler\Pet PetFindByStatus: App\Handler\PetFindByStatus PetFindByTags: App\Handler\PetFindByTags diff --git a/samples/server/petstore/ze-ph/src/App/DTO/FormatTest.php b/samples/server/petstore/ze-ph/src/App/DTO/FormatTest.php index 167e36dc7c7..e9e8a5b763c 100644 --- a/samples/server/petstore/ze-ph/src/App/DTO/FormatTest.php +++ b/samples/server/petstore/ze-ph/src/App/DTO/FormatTest.php @@ -57,7 +57,7 @@ class FormatTest /** * @DTA\Data(field="string", nullable=true) * @DTA\Validator(name="Type", options={"type":"string"}) - * @DTA\Validator(name="Regex", options={"pattern":"/[a-z]/i}) + * @DTA\Validator(name="Regex", options={"pattern":"/[a-z]/i"}) * @var string */ public $string; diff --git a/samples/server/petstore/ze-ph/src/App/DTO/OuterBoolean.php b/samples/server/petstore/ze-ph/src/App/DTO/OuterBoolean.php new file mode 100644 index 00000000000..4746e4941a3 --- /dev/null +++ b/samples/server/petstore/ze-ph/src/App/DTO/OuterBoolean.php @@ -0,0 +1,12 @@ +getAttribute("body"); + throw new PHException\HttpCode(500, "Not implemented"); + } +} diff --git a/samples/server/petstore/ze-ph/src/App/Handler/FakeOuterComposite.php b/samples/server/petstore/ze-ph/src/App/Handler/FakeOuterComposite.php new file mode 100644 index 00000000000..2af69f4c309 --- /dev/null +++ b/samples/server/petstore/ze-ph/src/App/Handler/FakeOuterComposite.php @@ -0,0 +1,27 @@ +getAttribute("body"); + throw new PHException\HttpCode(500, "Not implemented"); + } +} diff --git a/samples/server/petstore/ze-ph/src/App/Handler/FakeOuterNumber.php b/samples/server/petstore/ze-ph/src/App/Handler/FakeOuterNumber.php new file mode 100644 index 00000000000..e3be5060739 --- /dev/null +++ b/samples/server/petstore/ze-ph/src/App/Handler/FakeOuterNumber.php @@ -0,0 +1,27 @@ +getAttribute("body"); + throw new PHException\HttpCode(500, "Not implemented"); + } +} diff --git a/samples/server/petstore/ze-ph/src/App/Handler/FakeOuterString.php b/samples/server/petstore/ze-ph/src/App/Handler/FakeOuterString.php new file mode 100644 index 00000000000..076c33cb82c --- /dev/null +++ b/samples/server/petstore/ze-ph/src/App/Handler/FakeOuterString.php @@ -0,0 +1,27 @@ +getAttribute("body"); + throw new PHException\HttpCode(500, "Not implemented"); + } +}