diff --git a/bin/openapi3/ze-ph-petstore-server.sh b/bin/openapi3/ze-ph-petstore-server.sh new file mode 100755 index 00000000000..a6a47e47027 --- /dev/null +++ b/bin/openapi3/ze-ph-petstore-server.sh @@ -0,0 +1,32 @@ +#!/bin/sh + +SCRIPT="$0" +echo "# START SCRIPT: $SCRIPT" + +while [ -h "$SCRIPT" ] ; do + ls=`ls -ld "$SCRIPT"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + SCRIPT="$link" + else + SCRIPT=`dirname "$SCRIPT"`/"$link" + fi +done + +if [ ! -d "${APP_DIR}" ]; then + APP_DIR=`dirname "$SCRIPT"`/.. + APP_DIR=`cd "${APP_DIR}"; pwd` +fi + +executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" + +if [ ! -f "$executable" ] +then + mvn clean package +fi + +# if you've executed sbt assembly previously it will use that instead. +export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties" +ags="$@ generate -t modules/openapi-generator/src/main/resources/ze-ph -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -l php-ze-ph -o samples/server/petstore/ze-ph" + +java $JAVA_OPTS -jar $executable $ags diff --git a/samples/server/petstore/ze-ph/.openapi-generator/VERSION b/samples/server/petstore/ze-ph/.openapi-generator/VERSION index 855ff9501eb..096bf47efe3 100644 --- a/samples/server/petstore/ze-ph/.openapi-generator/VERSION +++ b/samples/server/petstore/ze-ph/.openapi-generator/VERSION @@ -1 +1 @@ -2.4.0-SNAPSHOT \ No newline at end of file +3.0.0-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 e35f0537afc..4b1717af8e3 100644 --- a/samples/server/petstore/ze-ph/application/config/path_handler.yml +++ b/samples/server/petstore/ze-ph/application/config/path_handler.yml @@ -26,6 +26,7 @@ Articus\PathHandler\Router\FastRouteAnnotation: handlers: - App\Handler\AnotherFakeDummy - App\Handler\Fake + - App\Handler\FakeBodyWithQueryParams - App\Handler\FakeInlineAdditionalProperties - App\Handler\FakeJsonFormData - App\Handler\FakeOuterBoolean @@ -51,6 +52,7 @@ Articus\PathHandler\Router\FastRouteAnnotation: Zend\ServiceManager\AbstractFactory\ConfigAbstractFactory: App\Handler\AnotherFakeDummy: [] App\Handler\Fake: [] + App\Handler\FakeBodyWithQueryParams: [] App\Handler\FakeInlineAdditionalProperties: [] App\Handler\FakeJsonFormData: [] App\Handler\FakeOuterBoolean: [] diff --git a/samples/server/petstore/ze-ph/src/App/DTO/EnumTest.php b/samples/server/petstore/ze-ph/src/App/DTO/EnumTest.php index c3c44c95347..26b41ed7881 100644 --- a/samples/server/petstore/ze-ph/src/App/DTO/EnumTest.php +++ b/samples/server/petstore/ze-ph/src/App/DTO/EnumTest.php @@ -14,6 +14,12 @@ class EnumTest * @var string */ public $enum_string; + /** + * @DTA\Data(field="enum_string_required") + * @DTA\Validator(name="Type", options={"type":"string"}) + * @var string + */ + public $enum_string_required; /** * @DTA\Data(field="enum_integer", nullable=true) * @DTA\Validator(name="Type", options={"type":"int"}) 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 7622b346bcb..110bb4a8166 100644 --- a/samples/server/petstore/ze-ph/src/App/DTO/FormatTest.php +++ b/samples/server/petstore/ze-ph/src/App/DTO/FormatTest.php @@ -70,8 +70,9 @@ class FormatTest public $byte; /** * @DTA\Data(field="binary", nullable=true) - * @DTA\Validator(name="Type", options={"type":"string"}) - * @var string + * @DTA\Strategy(name="Object", options={"type":\SplFileObject::class}) + * @DTA\Validator(name="Dictionary", options={"type":\SplFileObject::class}) + * @var \SplFileObject */ public $binary; /** diff --git a/samples/server/petstore/ze-ph/src/App/DTO/OuterComposite.php b/samples/server/petstore/ze-ph/src/App/DTO/OuterComposite.php index 91e4e596046..916b5edcefb 100644 --- a/samples/server/petstore/ze-ph/src/App/DTO/OuterComposite.php +++ b/samples/server/petstore/ze-ph/src/App/DTO/OuterComposite.php @@ -10,23 +10,20 @@ class OuterComposite { /** * @DTA\Data(field="my_number", nullable=true) - * @DTA\Strategy(name="Object", options={"type":\App\DTO\OuterNumber::class}) - * @DTA\Validator(name="Dictionary", options={"type":\App\DTO\OuterNumber::class}) - * @var \App\DTO\OuterNumber + * @DTA\Validator(name="Type", options={"type":"float"}) + * @var float */ public $my_number; /** * @DTA\Data(field="my_string", nullable=true) - * @DTA\Strategy(name="Object", options={"type":\App\DTO\OuterString::class}) - * @DTA\Validator(name="Dictionary", options={"type":\App\DTO\OuterString::class}) - * @var \App\DTO\OuterString + * @DTA\Validator(name="Type", options={"type":"string"}) + * @var string */ public $my_string; /** * @DTA\Data(field="my_boolean", nullable=true) - * @DTA\Strategy(name="Object", options={"type":\App\DTO\OuterBoolean::class}) - * @DTA\Validator(name="Dictionary", options={"type":\App\DTO\OuterBoolean::class}) - * @var \App\DTO\OuterBoolean + * @DTA\Validator(name="Type", options={"type":"bool"}) + * @var bool */ public $my_boolean; } diff --git a/samples/server/petstore/ze-ph/src/App/Handler/Fake.php b/samples/server/petstore/ze-ph/src/App/Handler/Fake.php index 8e662549a55..cd32e554567 100644 --- a/samples/server/petstore/ze-ph/src/App/Handler/Fake.php +++ b/samples/server/petstore/ze-ph/src/App/Handler/Fake.php @@ -37,10 +37,6 @@ class Fake implements Operation\PatchInterface, Operation\PostInterface, Operati } /** * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - * TODO check if producer is valid, if it has correct priority and if it can be moved to class annotation - * @PHA\Producer(name=PHProducer\Transfer::class, mediaType="application/xml; charset=utf-8") - * TODO check if producer is valid, if it has correct priority and if it can be moved to class annotation - * @PHA\Producer(name=PHProducer\Transfer::class, mediaType="application/json; charset=utf-8") * @param ServerRequestInterface $request * * @throws PHException\HttpCode 500 if the method is not implemented @@ -52,13 +48,6 @@ class Fake implements Operation\PatchInterface, Operation\PostInterface, Operati } /** * To test enum parameters - * @PHA\Attribute(name=PHAttribute\Transfer::class, options={ - * "type":\App\DTO\TestEnumParametersQueryData::class, - * "objectAttr":"queryData", - * "source": PHAttribute\Transfer::SOURCE_GET - * }) - * TODO check if producer is valid, if it has correct priority and if it can be moved to class annotation - * @PHA\Producer(name=PHProducer\Transfer::class, mediaType="*/*") * @param ServerRequestInterface $request * * @throws PHException\HttpCode 500 if the method is not implemented @@ -66,8 +55,6 @@ class Fake implements Operation\PatchInterface, Operation\PostInterface, Operati public function handleGet(ServerRequestInterface $request) { //TODO implement method - /** @var \App\DTO\TestEnumParametersQueryData $queryData */ - $queryData = $request->getAttribute("queryData"); throw new PHException\HttpCode(500, "Not implemented"); } } diff --git a/samples/server/petstore/ze-ph/src/App/Handler/FakeBodyWithQueryParams.php b/samples/server/petstore/ze-ph/src/App/Handler/FakeBodyWithQueryParams.php new file mode 100644 index 00000000000..e9fb79ea154 --- /dev/null +++ b/samples/server/petstore/ze-ph/src/App/Handler/FakeBodyWithQueryParams.php @@ -0,0 +1,33 @@ +getAttribute("bodyData"); + throw new PHException\HttpCode(500, "Not implemented"); + } +} diff --git a/samples/server/petstore/ze-ph/src/App/Handler/FakeInlineAdditionalProperties.php b/samples/server/petstore/ze-ph/src/App/Handler/FakeInlineAdditionalProperties.php index 7f3ed5efb38..0ce2cdbe9bb 100644 --- a/samples/server/petstore/ze-ph/src/App/Handler/FakeInlineAdditionalProperties.php +++ b/samples/server/petstore/ze-ph/src/App/Handler/FakeInlineAdditionalProperties.php @@ -19,6 +19,8 @@ class FakeInlineAdditionalProperties implements Operation\PostInterface * test inline additionalProperties * TODO check if consumer is valid, if it has correct priority and if it can be moved to class annotation * @PHA\Consumer(name=PHConsumer\Json::class, mediaType="application/json") + * TODO check if attribute is valid and can handle your container type + * @PHA\Attribute(name=PHAttribute\Transfer::class, options={"type":string::class,"objectAttr":"bodyData"}) * @param ServerRequestInterface $request * * @throws PHException\HttpCode 500 if the method is not implemented @@ -26,6 +28,8 @@ class FakeInlineAdditionalProperties implements Operation\PostInterface public function handlePost(ServerRequestInterface $request) { //TODO implement method + /** @var string $bodyData */ + $bodyData = $request->getAttribute("bodyData"); throw new PHException\HttpCode(500, "Not implemented"); } } diff --git a/samples/server/petstore/ze-ph/src/App/Handler/FakeOuterBoolean.php b/samples/server/petstore/ze-ph/src/App/Handler/FakeOuterBoolean.php index 59a9c70b520..3013e0bb9d7 100644 --- a/samples/server/petstore/ze-ph/src/App/Handler/FakeOuterBoolean.php +++ b/samples/server/petstore/ze-ph/src/App/Handler/FakeOuterBoolean.php @@ -16,18 +16,17 @@ use Psr\Http\Message\ServerRequestInterface; class FakeOuterBoolean implements Operation\PostInterface { /** - * @PHA\Attribute(name=PHAttribute\Transfer::class, options={"type":\App\DTO\OuterBoolean::class,"objectAttr":"bodyData"}) + * TODO check if producer is valid, if it has correct priority and if it can be moved to class annotation + * @PHA\Producer(name=PHProducer\Transfer::class, mediaType="*/*") * @param ServerRequestInterface $request * * @throws PHException\HttpCode 500 if the method is not implemented * - * @return \App\DTO\OuterBoolean + * @return bool */ public function handlePost(ServerRequestInterface $request) { //TODO implement method - /** @var \App\DTO\OuterBoolean $bodyData */ - $bodyData = $request->getAttribute("bodyData"); 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 index 2eac302e6be..15a413a2250 100644 --- a/samples/server/petstore/ze-ph/src/App/Handler/FakeOuterComposite.php +++ b/samples/server/petstore/ze-ph/src/App/Handler/FakeOuterComposite.php @@ -17,6 +17,8 @@ class FakeOuterComposite implements Operation\PostInterface { /** * @PHA\Attribute(name=PHAttribute\Transfer::class, options={"type":\App\DTO\OuterComposite::class,"objectAttr":"bodyData"}) + * TODO check if producer is valid, if it has correct priority and if it can be moved to class annotation + * @PHA\Producer(name=PHProducer\Transfer::class, mediaType="*/*") * @param ServerRequestInterface $request * * @throws PHException\HttpCode 500 if the method is 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 index 707d63f0912..1ad2a520b82 100644 --- a/samples/server/petstore/ze-ph/src/App/Handler/FakeOuterNumber.php +++ b/samples/server/petstore/ze-ph/src/App/Handler/FakeOuterNumber.php @@ -16,18 +16,17 @@ use Psr\Http\Message\ServerRequestInterface; class FakeOuterNumber implements Operation\PostInterface { /** - * @PHA\Attribute(name=PHAttribute\Transfer::class, options={"type":\App\DTO\OuterNumber::class,"objectAttr":"bodyData"}) + * TODO check if producer is valid, if it has correct priority and if it can be moved to class annotation + * @PHA\Producer(name=PHProducer\Transfer::class, mediaType="*/*") * @param ServerRequestInterface $request * * @throws PHException\HttpCode 500 if the method is not implemented * - * @return \App\DTO\OuterNumber + * @return float */ public function handlePost(ServerRequestInterface $request) { //TODO implement method - /** @var \App\DTO\OuterNumber $bodyData */ - $bodyData = $request->getAttribute("bodyData"); 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 index 6ea0305d23e..311e3e69213 100644 --- a/samples/server/petstore/ze-ph/src/App/Handler/FakeOuterString.php +++ b/samples/server/petstore/ze-ph/src/App/Handler/FakeOuterString.php @@ -16,18 +16,17 @@ use Psr\Http\Message\ServerRequestInterface; class FakeOuterString implements Operation\PostInterface { /** - * @PHA\Attribute(name=PHAttribute\Transfer::class, options={"type":\App\DTO\OuterString::class,"objectAttr":"bodyData"}) + * TODO check if producer is valid, if it has correct priority and if it can be moved to class annotation + * @PHA\Producer(name=PHProducer\Transfer::class, mediaType="*/*") * @param ServerRequestInterface $request * * @throws PHException\HttpCode 500 if the method is not implemented * - * @return \App\DTO\OuterString + * @return string */ public function handlePost(ServerRequestInterface $request) { //TODO implement method - /** @var \App\DTO\OuterString $bodyData */ - $bodyData = $request->getAttribute("bodyData"); throw new PHException\HttpCode(500, "Not implemented"); } } diff --git a/samples/server/petstore/ze-ph/src/App/Handler/Pet.php b/samples/server/petstore/ze-ph/src/App/Handler/Pet.php index 000ebfbd5da..0f69cddc37f 100644 --- a/samples/server/petstore/ze-ph/src/App/Handler/Pet.php +++ b/samples/server/petstore/ze-ph/src/App/Handler/Pet.php @@ -22,10 +22,6 @@ class Pet implements Operation\PostInterface, Operation\PutInterface * TODO check if consumer is valid, if it has correct priority and if it can be moved to class annotation * @PHA\Consumer(name=PHConsumer\Json::class, mediaType="application/xml") * @PHA\Attribute(name=PHAttribute\Transfer::class, options={"type":\App\DTO\Pet::class,"objectAttr":"bodyData"}) - * TODO check if producer is valid, if it has correct priority and if it can be moved to class annotation - * @PHA\Producer(name=PHProducer\Transfer::class, mediaType="application/xml") - * TODO check if producer is valid, if it has correct priority and if it can be moved to class annotation - * @PHA\Producer(name=PHProducer\Transfer::class, mediaType="application/json") * @param ServerRequestInterface $request * * @throws PHException\HttpCode 500 if the method is not implemented @@ -44,10 +40,6 @@ class Pet implements Operation\PostInterface, Operation\PutInterface * TODO check if consumer is valid, if it has correct priority and if it can be moved to class annotation * @PHA\Consumer(name=PHConsumer\Json::class, mediaType="application/xml") * @PHA\Attribute(name=PHAttribute\Transfer::class, options={"type":\App\DTO\Pet::class,"objectAttr":"bodyData"}) - * TODO check if producer is valid, if it has correct priority and if it can be moved to class annotation - * @PHA\Producer(name=PHProducer\Transfer::class, mediaType="application/xml") - * TODO check if producer is valid, if it has correct priority and if it can be moved to class annotation - * @PHA\Producer(name=PHProducer\Transfer::class, mediaType="application/json") * @param ServerRequestInterface $request * * @throws PHException\HttpCode 500 if the method is not implemented diff --git a/samples/server/petstore/ze-ph/src/App/Handler/PetFindByStatus.php b/samples/server/petstore/ze-ph/src/App/Handler/PetFindByStatus.php index 3594902ed92..9369ee2ba0e 100644 --- a/samples/server/petstore/ze-ph/src/App/Handler/PetFindByStatus.php +++ b/samples/server/petstore/ze-ph/src/App/Handler/PetFindByStatus.php @@ -17,11 +17,6 @@ class PetFindByStatus implements Operation\GetInterface { /** * Finds Pets by status - * @PHA\Attribute(name=PHAttribute\Transfer::class, options={ - * "type":\App\DTO\FindPetsByStatusQueryData::class, - * "objectAttr":"queryData", - * "source": PHAttribute\Transfer::SOURCE_GET - * }) * TODO check if producer is valid, if it has correct priority and if it can be moved to class annotation * @PHA\Producer(name=PHProducer\Transfer::class, mediaType="application/xml") * TODO check if producer is valid, if it has correct priority and if it can be moved to class annotation @@ -35,8 +30,6 @@ class PetFindByStatus implements Operation\GetInterface public function handleGet(ServerRequestInterface $request) { //TODO implement method - /** @var \App\DTO\FindPetsByStatusQueryData $queryData */ - $queryData = $request->getAttribute("queryData"); throw new PHException\HttpCode(500, "Not implemented"); } } diff --git a/samples/server/petstore/ze-ph/src/App/Handler/PetFindByTags.php b/samples/server/petstore/ze-ph/src/App/Handler/PetFindByTags.php index 7bfb3a8e7a2..ce480242eb3 100644 --- a/samples/server/petstore/ze-ph/src/App/Handler/PetFindByTags.php +++ b/samples/server/petstore/ze-ph/src/App/Handler/PetFindByTags.php @@ -17,11 +17,6 @@ class PetFindByTags implements Operation\GetInterface { /** * Finds Pets by tags - * @PHA\Attribute(name=PHAttribute\Transfer::class, options={ - * "type":\App\DTO\FindPetsByTagsQueryData::class, - * "objectAttr":"queryData", - * "source": PHAttribute\Transfer::SOURCE_GET - * }) * TODO check if producer is valid, if it has correct priority and if it can be moved to class annotation * @PHA\Producer(name=PHProducer\Transfer::class, mediaType="application/xml") * TODO check if producer is valid, if it has correct priority and if it can be moved to class annotation @@ -35,8 +30,6 @@ class PetFindByTags implements Operation\GetInterface public function handleGet(ServerRequestInterface $request) { //TODO implement method - /** @var \App\DTO\FindPetsByTagsQueryData $queryData */ - $queryData = $request->getAttribute("queryData"); throw new PHException\HttpCode(500, "Not implemented"); } } diff --git a/samples/server/petstore/ze-ph/src/App/Handler/PetPetId.php b/samples/server/petstore/ze-ph/src/App/Handler/PetPetId.php index d6c0afcdd6f..bacc111409f 100644 --- a/samples/server/petstore/ze-ph/src/App/Handler/PetPetId.php +++ b/samples/server/petstore/ze-ph/src/App/Handler/PetPetId.php @@ -17,10 +17,6 @@ class PetPetId implements Operation\DeleteInterface, Operation\GetInterface, Ope { /** * Deletes a pet - * TODO check if producer is valid, if it has correct priority and if it can be moved to class annotation - * @PHA\Producer(name=PHProducer\Transfer::class, mediaType="application/xml") - * TODO check if producer is valid, if it has correct priority and if it can be moved to class annotation - * @PHA\Producer(name=PHProducer\Transfer::class, mediaType="application/json") * @param ServerRequestInterface $request * * @throws PHException\HttpCode 500 if the method is not implemented @@ -49,10 +45,6 @@ class PetPetId implements Operation\DeleteInterface, Operation\GetInterface, Ope } /** * Updates a pet in the store with form data - * TODO check if producer is valid, if it has correct priority and if it can be moved to class annotation - * @PHA\Producer(name=PHProducer\Transfer::class, mediaType="application/xml") - * TODO check if producer is valid, if it has correct priority and if it can be moved to class annotation - * @PHA\Producer(name=PHProducer\Transfer::class, mediaType="application/json") * @param ServerRequestInterface $request * * @throws PHException\HttpCode 500 if the method is not implemented diff --git a/samples/server/petstore/ze-ph/src/App/Handler/StoreOrderOrderId.php b/samples/server/petstore/ze-ph/src/App/Handler/StoreOrderOrderId.php index d552da86d59..7206279d5bd 100644 --- a/samples/server/petstore/ze-ph/src/App/Handler/StoreOrderOrderId.php +++ b/samples/server/petstore/ze-ph/src/App/Handler/StoreOrderOrderId.php @@ -17,10 +17,6 @@ class StoreOrderOrderId implements Operation\DeleteInterface, Operation\GetInter { /** * Delete purchase order by ID - * TODO check if producer is valid, if it has correct priority and if it can be moved to class annotation - * @PHA\Producer(name=PHProducer\Transfer::class, mediaType="application/xml") - * TODO check if producer is valid, if it has correct priority and if it can be moved to class annotation - * @PHA\Producer(name=PHProducer\Transfer::class, mediaType="application/json") * @param ServerRequestInterface $request * * @throws PHException\HttpCode 500 if the method is not implemented diff --git a/samples/server/petstore/ze-ph/src/App/Handler/User.php b/samples/server/petstore/ze-ph/src/App/Handler/User.php index 57b61bc41a1..637300dcb0e 100644 --- a/samples/server/petstore/ze-ph/src/App/Handler/User.php +++ b/samples/server/petstore/ze-ph/src/App/Handler/User.php @@ -18,10 +18,6 @@ class User implements Operation\PostInterface /** * Create user * @PHA\Attribute(name=PHAttribute\Transfer::class, options={"type":\App\DTO\User::class,"objectAttr":"bodyData"}) - * TODO check if producer is valid, if it has correct priority and if it can be moved to class annotation - * @PHA\Producer(name=PHProducer\Transfer::class, mediaType="application/xml") - * TODO check if producer is valid, if it has correct priority and if it can be moved to class annotation - * @PHA\Producer(name=PHProducer\Transfer::class, mediaType="application/json") * @param ServerRequestInterface $request * * @throws PHException\HttpCode 500 if the method is not implemented diff --git a/samples/server/petstore/ze-ph/src/App/Handler/UserCreateWithArray.php b/samples/server/petstore/ze-ph/src/App/Handler/UserCreateWithArray.php index 933ab5dc60d..7ade895a442 100644 --- a/samples/server/petstore/ze-ph/src/App/Handler/UserCreateWithArray.php +++ b/samples/server/petstore/ze-ph/src/App/Handler/UserCreateWithArray.php @@ -19,10 +19,6 @@ class UserCreateWithArray implements Operation\PostInterface * Creates list of users with given input array * TODO check if attribute is valid and can handle your container type * @PHA\Attribute(name=PHAttribute\Transfer::class, options={"type":\App\DTO\User[]::class,"objectAttr":"bodyData"}) - * TODO check if producer is valid, if it has correct priority and if it can be moved to class annotation - * @PHA\Producer(name=PHProducer\Transfer::class, mediaType="application/xml") - * TODO check if producer is valid, if it has correct priority and if it can be moved to class annotation - * @PHA\Producer(name=PHProducer\Transfer::class, mediaType="application/json") * @param ServerRequestInterface $request * * @throws PHException\HttpCode 500 if the method is not implemented diff --git a/samples/server/petstore/ze-ph/src/App/Handler/UserCreateWithList.php b/samples/server/petstore/ze-ph/src/App/Handler/UserCreateWithList.php index ff34eb857d4..6cb9a9ad390 100644 --- a/samples/server/petstore/ze-ph/src/App/Handler/UserCreateWithList.php +++ b/samples/server/petstore/ze-ph/src/App/Handler/UserCreateWithList.php @@ -19,10 +19,6 @@ class UserCreateWithList implements Operation\PostInterface * Creates list of users with given input array * TODO check if attribute is valid and can handle your container type * @PHA\Attribute(name=PHAttribute\Transfer::class, options={"type":\App\DTO\User[]::class,"objectAttr":"bodyData"}) - * TODO check if producer is valid, if it has correct priority and if it can be moved to class annotation - * @PHA\Producer(name=PHProducer\Transfer::class, mediaType="application/xml") - * TODO check if producer is valid, if it has correct priority and if it can be moved to class annotation - * @PHA\Producer(name=PHProducer\Transfer::class, mediaType="application/json") * @param ServerRequestInterface $request * * @throws PHException\HttpCode 500 if the method is not implemented diff --git a/samples/server/petstore/ze-ph/src/App/Handler/UserLogin.php b/samples/server/petstore/ze-ph/src/App/Handler/UserLogin.php index 1a57443068d..ac38c9c284c 100644 --- a/samples/server/petstore/ze-ph/src/App/Handler/UserLogin.php +++ b/samples/server/petstore/ze-ph/src/App/Handler/UserLogin.php @@ -17,11 +17,6 @@ class UserLogin implements Operation\GetInterface { /** * Logs user into the system - * @PHA\Attribute(name=PHAttribute\Transfer::class, options={ - * "type":\App\DTO\LoginUserQueryData::class, - * "objectAttr":"queryData", - * "source": PHAttribute\Transfer::SOURCE_GET - * }) * TODO check if producer is valid, if it has correct priority and if it can be moved to class annotation * @PHA\Producer(name=PHProducer\Transfer::class, mediaType="application/xml") * TODO check if producer is valid, if it has correct priority and if it can be moved to class annotation @@ -35,8 +30,6 @@ class UserLogin implements Operation\GetInterface public function handleGet(ServerRequestInterface $request) { //TODO implement method - /** @var \App\DTO\LoginUserQueryData $queryData */ - $queryData = $request->getAttribute("queryData"); throw new PHException\HttpCode(500, "Not implemented"); } } diff --git a/samples/server/petstore/ze-ph/src/App/Handler/UserLogout.php b/samples/server/petstore/ze-ph/src/App/Handler/UserLogout.php index 96e8116e351..7579773f493 100644 --- a/samples/server/petstore/ze-ph/src/App/Handler/UserLogout.php +++ b/samples/server/petstore/ze-ph/src/App/Handler/UserLogout.php @@ -17,10 +17,6 @@ class UserLogout implements Operation\GetInterface { /** * Logs out current logged in user session - * TODO check if producer is valid, if it has correct priority and if it can be moved to class annotation - * @PHA\Producer(name=PHProducer\Transfer::class, mediaType="application/xml") - * TODO check if producer is valid, if it has correct priority and if it can be moved to class annotation - * @PHA\Producer(name=PHProducer\Transfer::class, mediaType="application/json") * @param ServerRequestInterface $request * * @throws PHException\HttpCode 500 if the method is not implemented diff --git a/samples/server/petstore/ze-ph/src/App/Handler/UserUsername.php b/samples/server/petstore/ze-ph/src/App/Handler/UserUsername.php index 3e36ed9a38e..e6e8b1b73bf 100644 --- a/samples/server/petstore/ze-ph/src/App/Handler/UserUsername.php +++ b/samples/server/petstore/ze-ph/src/App/Handler/UserUsername.php @@ -17,10 +17,6 @@ class UserUsername implements Operation\DeleteInterface, Operation\GetInterface, { /** * Delete user - * TODO check if producer is valid, if it has correct priority and if it can be moved to class annotation - * @PHA\Producer(name=PHProducer\Transfer::class, mediaType="application/xml") - * TODO check if producer is valid, if it has correct priority and if it can be moved to class annotation - * @PHA\Producer(name=PHProducer\Transfer::class, mediaType="application/json") * @param ServerRequestInterface $request * * @throws PHException\HttpCode 500 if the method is not implemented @@ -50,10 +46,6 @@ class UserUsername implements Operation\DeleteInterface, Operation\GetInterface, /** * Updated user * @PHA\Attribute(name=PHAttribute\Transfer::class, options={"type":\App\DTO\User::class,"objectAttr":"bodyData"}) - * TODO check if producer is valid, if it has correct priority and if it can be moved to class annotation - * @PHA\Producer(name=PHProducer\Transfer::class, mediaType="application/xml") - * TODO check if producer is valid, if it has correct priority and if it can be moved to class annotation - * @PHA\Producer(name=PHProducer\Transfer::class, mediaType="application/json") * @param ServerRequestInterface $request * * @throws PHException\HttpCode 500 if the method is not implemented