forked from loafle/openapi-generator-original
Update samples for ze-ph. (#5823)
This commit is contained in:
parent
b288991c6c
commit
ceff3762cc
1
samples/server/petstore/ze-ph/.swagger-codegen/VERSION
Normal file
1
samples/server/petstore/ze-ph/.swagger-codegen/VERSION
Normal file
@ -0,0 +1 @@
|
|||||||
|
2.2.3-SNAPSHOT
|
@ -7,6 +7,37 @@ path_handler:
|
|||||||
route: /fake
|
route: /fake
|
||||||
defaults:
|
defaults:
|
||||||
handler: Fake
|
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':
|
'pet':
|
||||||
type: Literal
|
type: Literal
|
||||||
options:
|
options:
|
||||||
@ -119,6 +150,10 @@ path_handler:
|
|||||||
handlers:
|
handlers:
|
||||||
invokables:
|
invokables:
|
||||||
Fake: App\Handler\Fake
|
Fake: App\Handler\Fake
|
||||||
|
FakeOuterBoolean: App\Handler\FakeOuterBoolean
|
||||||
|
FakeOuterComposite: App\Handler\FakeOuterComposite
|
||||||
|
FakeOuterNumber: App\Handler\FakeOuterNumber
|
||||||
|
FakeOuterString: App\Handler\FakeOuterString
|
||||||
Pet: App\Handler\Pet
|
Pet: App\Handler\Pet
|
||||||
PetFindByStatus: App\Handler\PetFindByStatus
|
PetFindByStatus: App\Handler\PetFindByStatus
|
||||||
PetFindByTags: App\Handler\PetFindByTags
|
PetFindByTags: App\Handler\PetFindByTags
|
||||||
|
@ -57,7 +57,7 @@ class FormatTest
|
|||||||
/**
|
/**
|
||||||
* @DTA\Data(field="string", nullable=true)
|
* @DTA\Data(field="string", nullable=true)
|
||||||
* @DTA\Validator(name="Type", options={"type":"string"})
|
* @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
|
* @var string
|
||||||
*/
|
*/
|
||||||
public $string;
|
public $string;
|
||||||
|
12
samples/server/petstore/ze-ph/src/App/DTO/OuterBoolean.php
Normal file
12
samples/server/petstore/ze-ph/src/App/DTO/OuterBoolean.php
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\DTO;
|
||||||
|
|
||||||
|
use Articus\DataTransfer\Annotation as DTA;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*/
|
||||||
|
class OuterBoolean
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
33
samples/server/petstore/ze-ph/src/App/DTO/OuterComposite.php
Normal file
33
samples/server/petstore/ze-ph/src/App/DTO/OuterComposite.php
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\DTO;
|
||||||
|
|
||||||
|
use Articus\DataTransfer\Annotation as DTA;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*/
|
||||||
|
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
|
||||||
|
*/
|
||||||
|
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
|
||||||
|
*/
|
||||||
|
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
|
||||||
|
*/
|
||||||
|
public $my_boolean;
|
||||||
|
}
|
||||||
|
|
12
samples/server/petstore/ze-ph/src/App/DTO/OuterNumber.php
Normal file
12
samples/server/petstore/ze-ph/src/App/DTO/OuterNumber.php
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\DTO;
|
||||||
|
|
||||||
|
use Articus\DataTransfer\Annotation as DTA;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*/
|
||||||
|
class OuterNumber
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
12
samples/server/petstore/ze-ph/src/App/DTO/OuterString.php
Normal file
12
samples/server/petstore/ze-ph/src/App/DTO/OuterString.php
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\DTO;
|
||||||
|
|
||||||
|
use Articus\DataTransfer\Annotation as DTA;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*/
|
||||||
|
class OuterString
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,27 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Handler;
|
||||||
|
|
||||||
|
use Articus\PathHandler\Operation;
|
||||||
|
use Articus\PathHandler\Annotation as PHA;
|
||||||
|
use Articus\PathHandler\Consumer as PHConsumer;
|
||||||
|
use Articus\PathHandler\Producer as PHProducer;
|
||||||
|
use Articus\PathHandler\Attribute as PHAttribute;
|
||||||
|
use Articus\PathHandler\Exception as PHException;
|
||||||
|
use Psr\Http\Message\ServerRequestInterface;
|
||||||
|
|
||||||
|
|
||||||
|
class FakeOuterBoolean implements Operation\PostInterface
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* @PHA\Attribute(name=PHAttribute\Transfer::class, options={"type":\App\DTO\OuterBoolean::class,"objectAttr":"body"})
|
||||||
|
* @return \App\DTO\OuterBoolean
|
||||||
|
*/
|
||||||
|
public function handlePost(ServerRequestInterface $request)
|
||||||
|
{
|
||||||
|
//TODO implement method
|
||||||
|
/** @var \App\DTO\OuterBoolean $body */
|
||||||
|
$body = $request->getAttribute("body");
|
||||||
|
throw new PHException\HttpCode(500, "Not implemented");
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,27 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Handler;
|
||||||
|
|
||||||
|
use Articus\PathHandler\Operation;
|
||||||
|
use Articus\PathHandler\Annotation as PHA;
|
||||||
|
use Articus\PathHandler\Consumer as PHConsumer;
|
||||||
|
use Articus\PathHandler\Producer as PHProducer;
|
||||||
|
use Articus\PathHandler\Attribute as PHAttribute;
|
||||||
|
use Articus\PathHandler\Exception as PHException;
|
||||||
|
use Psr\Http\Message\ServerRequestInterface;
|
||||||
|
|
||||||
|
|
||||||
|
class FakeOuterComposite implements Operation\PostInterface
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* @PHA\Attribute(name=PHAttribute\Transfer::class, options={"type":\App\DTO\OuterComposite::class,"objectAttr":"body"})
|
||||||
|
* @return \App\DTO\OuterComposite
|
||||||
|
*/
|
||||||
|
public function handlePost(ServerRequestInterface $request)
|
||||||
|
{
|
||||||
|
//TODO implement method
|
||||||
|
/** @var \App\DTO\OuterComposite $body */
|
||||||
|
$body = $request->getAttribute("body");
|
||||||
|
throw new PHException\HttpCode(500, "Not implemented");
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,27 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Handler;
|
||||||
|
|
||||||
|
use Articus\PathHandler\Operation;
|
||||||
|
use Articus\PathHandler\Annotation as PHA;
|
||||||
|
use Articus\PathHandler\Consumer as PHConsumer;
|
||||||
|
use Articus\PathHandler\Producer as PHProducer;
|
||||||
|
use Articus\PathHandler\Attribute as PHAttribute;
|
||||||
|
use Articus\PathHandler\Exception as PHException;
|
||||||
|
use Psr\Http\Message\ServerRequestInterface;
|
||||||
|
|
||||||
|
|
||||||
|
class FakeOuterNumber implements Operation\PostInterface
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* @PHA\Attribute(name=PHAttribute\Transfer::class, options={"type":\App\DTO\OuterNumber::class,"objectAttr":"body"})
|
||||||
|
* @return \App\DTO\OuterNumber
|
||||||
|
*/
|
||||||
|
public function handlePost(ServerRequestInterface $request)
|
||||||
|
{
|
||||||
|
//TODO implement method
|
||||||
|
/** @var \App\DTO\OuterNumber $body */
|
||||||
|
$body = $request->getAttribute("body");
|
||||||
|
throw new PHException\HttpCode(500, "Not implemented");
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,27 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Handler;
|
||||||
|
|
||||||
|
use Articus\PathHandler\Operation;
|
||||||
|
use Articus\PathHandler\Annotation as PHA;
|
||||||
|
use Articus\PathHandler\Consumer as PHConsumer;
|
||||||
|
use Articus\PathHandler\Producer as PHProducer;
|
||||||
|
use Articus\PathHandler\Attribute as PHAttribute;
|
||||||
|
use Articus\PathHandler\Exception as PHException;
|
||||||
|
use Psr\Http\Message\ServerRequestInterface;
|
||||||
|
|
||||||
|
|
||||||
|
class FakeOuterString implements Operation\PostInterface
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* @PHA\Attribute(name=PHAttribute\Transfer::class, options={"type":\App\DTO\OuterString::class,"objectAttr":"body"})
|
||||||
|
* @return \App\DTO\OuterString
|
||||||
|
*/
|
||||||
|
public function handlePost(ServerRequestInterface $request)
|
||||||
|
{
|
||||||
|
//TODO implement method
|
||||||
|
/** @var \App\DTO\OuterString $body */
|
||||||
|
$body = $request->getAttribute("body");
|
||||||
|
throw new PHException\HttpCode(500, "Not implemented");
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user