[Slim] Add PHP CodeSniffer to check coding style (#897)

* [Slim] Add PHP CodeSniffer package

* [Slim] Add phpcsStandard generator option

We follow PSR-2 coding style guide in PHP generators. It might be convenient
for users to specify own coding standard without modifying templates. That's
why I've added this option.

At first, I thought to add option validation and accept only standards from
predefined list. But this option also can be a full path to the standard's
root directory, I've changed my mind. User should use this option with caution.

Ref to all PHP CodeSniffer CLI options:
https://github.com/squizlabs/PHP_CodeSniffer/wiki/Usage

* [Slim] Extend readme with PHP CodeSniffer docs

* [Slim] Format templates to meet PSR-2

* [Slim] Refresh samples
This commit is contained in:
Yuriy Belenko
2018-08-26 15:26:09 +05:00
committed by GitHub
parent 4401407c7c
commit 15cec0ae09
107 changed files with 1231 additions and 1084 deletions

View File

@@ -35,8 +35,11 @@ import java.util.Map;
public class PhpSlimServerCodegen extends AbstractPhpCodegen { public class PhpSlimServerCodegen extends AbstractPhpCodegen {
private static final Logger LOGGER = LoggerFactory.getLogger(PhpSlimServerCodegen.class); private static final Logger LOGGER = LoggerFactory.getLogger(PhpSlimServerCodegen.class);
public static final String PHPCS_STANDARD = "phpcsStandard";
protected String groupId = "org.openapitools"; protected String groupId = "org.openapitools";
protected String artifactId = "openapi-server"; protected String artifactId = "openapi-server";
protected String phpcsStandard = "PSR12";
public PhpSlimServerCodegen() { public PhpSlimServerCodegen() {
super(); super();
@@ -70,6 +73,9 @@ public class PhpSlimServerCodegen extends AbstractPhpCodegen {
break; break;
} }
} }
cliOptions.add(new CliOption(PHPCS_STANDARD, "PHP CodeSniffer <standard> option. Accepts name or path of the coding standard to use.")
.defaultValue("PSR12"));
} }
@Override @Override
@@ -109,6 +115,12 @@ public class PhpSlimServerCodegen extends AbstractPhpCodegen {
public void processOpts() { public void processOpts() {
super.processOpts(); super.processOpts();
if (additionalProperties.containsKey(PHPCS_STANDARD)) {
this.setPhpcsStandard((String) additionalProperties.get(PHPCS_STANDARD));
} else {
additionalProperties.put(PHPCS_STANDARD, phpcsStandard);
}
supportingFiles.add(new SupportingFile("README.mustache", "", "README.md")); supportingFiles.add(new SupportingFile("README.mustache", "", "README.md"));
supportingFiles.add(new SupportingFile("composer.mustache", "", "composer.json")); supportingFiles.add(new SupportingFile("composer.mustache", "", "composer.json"));
supportingFiles.add(new SupportingFile("index.mustache", "", "index.php")); supportingFiles.add(new SupportingFile("index.mustache", "", "index.php"));
@@ -148,4 +160,8 @@ public class PhpSlimServerCodegen extends AbstractPhpCodegen {
return objs; return objs;
} }
public void setPhpcsStandard(String phpcsStandard) {
this.phpcsStandard = phpcsStandard;
}
} }

View File

@@ -44,7 +44,8 @@ namespace {{invokerPackage}};
* @author OpenAPI Generator team * @author OpenAPI Generator team
* @link https://github.com/openapitools/openapi-generator * @link https://github.com/openapitools/openapi-generator
*/ */
abstract class AbstractApiController { abstract class AbstractApiController
{
/** /**
* @var \Interop\Container\ContainerInterface Slim app container instance * @var \Interop\Container\ContainerInterface Slim app container instance
@@ -56,8 +57,8 @@ abstract class AbstractApiController {
* *
* @param \Interop\Container\ContainerInterface $container Slim app container instance * @param \Interop\Container\ContainerInterface $container Slim app container instance
*/ */
public function __construct($container) { public function __construct($container)
{
$this->container = $container; $this->container = $container;
} }
} }

View File

@@ -30,15 +30,17 @@ $ php -S localhost:8888 -t php-slim-server
## Run tests ## Run tests
This package uses PHPUnit 4.8 for unit testing. This package uses PHPUnit 4.8 for unit testing and PHP Codesniffer to check source code against user defined coding standard(`phpcsStandard` generator config option).
[Test folder]({{testBasePath}}) contains templates which you can fill with real test assertions. [Test folder]({{testBasePath}}) contains templates which you can fill with real test assertions.
How to write tests read at [PHPUnit Manual - Chapter 2. Writing Tests for PHPUnit](https://phpunit.de/manual/4.8/en/writing-tests-for-phpunit.html). How to write tests read at [PHPUnit Manual - Chapter 2. Writing Tests for PHPUnit](https://phpunit.de/manual/4.8/en/writing-tests-for-phpunit.html).
How to configure PHP CodeSniffer read at [PHP CodeSniffer Documentation](https://github.com/squizlabs/PHP_CodeSniffer/wiki).
Command | Tool | Target Command | Tool | Target
---- | ---- | ---- ---- | ---- | ----
`$ composer test` | PHPUnit | All tests `$ composer test` | PHPUnit | All tests
`$ composer run test-apis` | PHPUnit | Apis tests `$ composer run test-apis` | PHPUnit | Apis tests
`$ composer run test-models` | PHPUnit | Models tests `$ composer run test-models` | PHPUnit | Models tests
`$ composer run phpcs` | PHP CodeSniffer | All files
{{#generateApiDocs}} {{#generateApiDocs}}
## API Endpoints ## API Endpoints

View File

@@ -51,7 +51,8 @@ use Tuupola\Middleware\HttpBasicAuthentication;
* @author OpenAPI Generator team * @author OpenAPI Generator team
* @link https://github.com/openapitools/openapi-generator * @link https://github.com/openapitools/openapi-generator
*/ */
class SlimRouter { class SlimRouter
{
/** /**
* @var $slimApp Slim\App instance * @var $slimApp Slim\App instance
@@ -64,7 +65,8 @@ class SlimRouter {
* @param ContainerInterface|array $container Either a ContainerInterface or an associative array of app settings * @param ContainerInterface|array $container Either a ContainerInterface or an associative array of app settings
* @throws InvalidArgumentException when no container is provided that implements ContainerInterface * @throws InvalidArgumentException when no container is provided that implements ContainerInterface
*/ */
public function __construct($container = []) { public function __construct($container = [])
{
$app = new App($container); $app = new App($container);
$basicAuth = new HttpBasicAuthentication([ $basicAuth = new HttpBasicAuthentication([
@@ -80,7 +82,8 @@ class SlimRouter {
{{#operations}} {{#operations}}
{{#operation}} {{#operation}}
$app->{{httpMethod}}( $app->{{httpMethod}}(
'{{{basePathWithoutHost}}}{{{path}}}', {{classname}}::class . ':{{operationId}}' '{{{basePathWithoutHost}}}{{{path}}}',
{{classname}}::class . ':{{operationId}}'
{{#hasAuthMethods}} {{#hasAuthMethods}}
{{#authMethods}} {{#authMethods}}
{{#isBasic}} {{#isBasic}}
@@ -101,7 +104,8 @@ class SlimRouter {
* Returns Slim Framework instance * Returns Slim Framework instance
* @return App * @return App
*/ */
public function getSlimApp() { public function getSlimApp()
{
return $this->slimApp; return $this->slimApp;
} }
} }

View File

@@ -46,14 +46,19 @@ use {{invokerPackage}}\AbstractApiController;
* @author OpenAPI Generator team * @author OpenAPI Generator team
* @link https://github.com/openapitools/openapi-generator * @link https://github.com/openapitools/openapi-generator
*/ */
class {{classname}} extends AbstractApiController { class {{classname}} extends AbstractApiController
{
{{#operations}} {{#operations}}
{{#operation}} {{#operation}}
/** /**
* {{httpMethod}} {{operationId}} * {{httpMethod}} {{operationId}}
{{#summary}}
* Summary: {{summary}} * Summary: {{summary}}
{{/summary}}
{{#notes}}
* Notes: {{notes}} * Notes: {{notes}}
{{/notes}}
{{#hasProduces}} {{#hasProduces}}
* Output-Formats: [{{#produces}}{{{mediaType}}}{{#hasMore}}, {{/hasMore}}{{/produces}}] * Output-Formats: [{{#produces}}{{{mediaType}}}{{#hasMore}}, {{/hasMore}}{{/produces}}]
{{/hasProduces}} {{/hasProduces}}
@@ -62,7 +67,8 @@ class {{classname}} extends AbstractApiController {
* @param \Psr\Http\Message\ResponseInterface $response Response * @param \Psr\Http\Message\ResponseInterface $response Response
* @param array|null $args Path arguments * @param array|null $args Path arguments
*/ */
public function {{operationId}}($request, $response, $args) { public function {{operationId}}($request, $response, $args)
{
{{#hasHeaderParams}} {{#hasHeaderParams}}
$headers = $request->getHeaders(); $headers = $request->getHeaders();
{{#headerParams}} {{#headerParams}}
@@ -96,7 +102,6 @@ class {{classname}} extends AbstractApiController {
$response->write('How about implementing {{nickname}} as a {{httpMethod}} method ?'); $response->write('How about implementing {{nickname}} as a {{httpMethod}} method ?');
return $response; return $response;
} }
{{#hasMore}}{{/hasMore}}
{{/operation}} {{/operation}}
{{/operations}} {{/operations}}
} }

View File

@@ -45,34 +45,35 @@ use {{apiPackage}}\{{classname}};
* @link https://github.com/openapitools/openapi-generator * @link https://github.com/openapitools/openapi-generator
* @coversDefaultClass \{{modelPackage}}\{{classname}} * @coversDefaultClass \{{modelPackage}}\{{classname}}
*/ */
{{#operations}}class {{classname}}Test extends \PHPUnit_Framework_TestCase { {{#operations}}class {{classname}}Test extends \PHPUnit_Framework_TestCase
{
/** /**
* Setup before running any test cases * Setup before running any test cases
*/ */
public static function setUpBeforeClass() { public static function setUpBeforeClass()
{
} }
/** /**
* Setup before running each test case * Setup before running each test case
*/ */
public function setUp() { public function setUp()
{
} }
/** /**
* Clean up after running each test case * Clean up after running each test case
*/ */
public function tearDown() { public function tearDown()
{
} }
/** /**
* Clean up after running all test cases * Clean up after running all test cases
*/ */
public static function tearDownAfterClass() { public static function tearDownAfterClass()
{
} }
{{#operation}} {{#operation}}
@@ -82,8 +83,8 @@ use {{apiPackage}}\{{classname}};
* {{{summary}}}. * {{{summary}}}.
* @covers ::{{{operationId}}} * @covers ::{{{operationId}}}
*/ */
public function test{{operationIdCamelCase}}() { public function test{{operationIdCamelCase}}()
{
} }
{{/operation}} {{/operation}}
} }

View File

@@ -6,7 +6,8 @@
"tuupola/slim-basic-auth": "^3.0.0" "tuupola/slim-basic-auth": "^3.0.0"
}, },
"require-dev": { "require-dev": {
"phpunit/phpunit": "^4.8" "phpunit/phpunit": "^4.8",
"squizlabs/php_codesniffer": "^3.0"
}, },
"autoload": { "autoload": {
"psr-4": { "{{escapedInvokerPackage}}\\": "{{srcBasePath}}/" } "psr-4": { "{{escapedInvokerPackage}}\\": "{{srcBasePath}}/" }
@@ -20,6 +21,7 @@
"@test-models" "@test-models"
], ],
"test-apis": "phpunit --testsuite Apis", "test-apis": "phpunit --testsuite Apis",
"test-models": "phpunit --testsuite Models" "test-models": "phpunit --testsuite Models",
"phpcs": "phpcs ./ --ignore=vendor --warning-severity=0 --standard={{phpcsStandard}}"
} }
} }

View File

@@ -7,12 +7,12 @@ namespace {{modelPackage}};
/** /**
* {{classname}} * {{classname}}
*/ */
class {{classname}} { class {{classname}}
{
{{#vars}} {{#vars}}
/** @var {{dataType}} ${{name}} {{#description}}{{description}}{{/description}}*/ /** @var {{dataType}} ${{name}} {{#description}}{{description}}{{/description}}*/
private ${{name}}; private ${{name}};
{{/vars}} {{/vars}}
} }
{{/model}}{{/models}} {{/model}}{{/models}}

View File

@@ -47,40 +47,42 @@ use {{modelPackage}}\{{classname}};
* @link https://github.com/openapitools/openapi-generator * @link https://github.com/openapitools/openapi-generator
* @coversDefaultClass \{{modelPackage}}\{{classname}} * @coversDefaultClass \{{modelPackage}}\{{classname}}
*/ */
class {{classname}}Test extends \PHPUnit_Framework_TestCase { class {{classname}}Test extends \PHPUnit_Framework_TestCase
{
/** /**
* Setup before running any test cases * Setup before running any test cases
*/ */
public static function setUpBeforeClass() { public static function setUpBeforeClass()
{
} }
/** /**
* Setup before running each test case * Setup before running each test case
*/ */
public function setUp() { public function setUp()
{
} }
/** /**
* Clean up after running each test case * Clean up after running each test case
*/ */
public function tearDown() { public function tearDown()
{
} }
/** /**
* Clean up after running all test cases * Clean up after running all test cases
*/ */
public static function tearDownAfterClass() { public static function tearDownAfterClass()
{
} }
/** /**
* Test "{{classname}}" * Test "{{classname}}"
*/ */
public function test{{classname}}() { public function test{{classname}}()
{
$test{{classname}} = new {{classname}}(); $test{{classname}} = new {{classname}}();
} }
{{#vars}} {{#vars}}
@@ -88,8 +90,8 @@ class {{classname}}Test extends \PHPUnit_Framework_TestCase {
/** /**
* Test attribute "{{name}}" * Test attribute "{{name}}"
*/ */
public function testProperty{{nameInCamelCase}}() { public function testProperty{{nameInCamelCase}}()
{
} }
{{/vars}} {{/vars}}
} }

View File

@@ -19,6 +19,7 @@ package org.openapitools.codegen.options;
import org.openapitools.codegen.CodegenConstants; import org.openapitools.codegen.CodegenConstants;
import org.openapitools.codegen.languages.AbstractPhpCodegen; import org.openapitools.codegen.languages.AbstractPhpCodegen;
import org.openapitools.codegen.languages.PhpSlimServerCodegen;
import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableMap;
@@ -38,6 +39,7 @@ public class PhpSlimServerOptionsProvider implements OptionsProvider {
public static final String ENSURE_UNIQUE_PARAMS_VALUE = "true"; public static final String ENSURE_UNIQUE_PARAMS_VALUE = "true";
public static final String ALLOW_UNICODE_IDENTIFIERS_VALUE = "false"; public static final String ALLOW_UNICODE_IDENTIFIERS_VALUE = "false";
public static final String PREPEND_FORM_OR_BODY_PARAMETERS_VALUE = "true"; public static final String PREPEND_FORM_OR_BODY_PARAMETERS_VALUE = "true";
public static final String PHPCS_STANDARD_VALUE = "PSR12";
@Override @Override
public String getLanguage() { public String getLanguage() {
@@ -60,6 +62,7 @@ public class PhpSlimServerOptionsProvider implements OptionsProvider {
.put(CodegenConstants.ENSURE_UNIQUE_PARAMS, ENSURE_UNIQUE_PARAMS_VALUE) .put(CodegenConstants.ENSURE_UNIQUE_PARAMS, ENSURE_UNIQUE_PARAMS_VALUE)
.put(CodegenConstants.ALLOW_UNICODE_IDENTIFIERS, ALLOW_UNICODE_IDENTIFIERS_VALUE) .put(CodegenConstants.ALLOW_UNICODE_IDENTIFIERS, ALLOW_UNICODE_IDENTIFIERS_VALUE)
.put(CodegenConstants.PREPEND_FORM_OR_BODY_PARAMETERS, PREPEND_FORM_OR_BODY_PARAMETERS_VALUE) .put(CodegenConstants.PREPEND_FORM_OR_BODY_PARAMETERS, PREPEND_FORM_OR_BODY_PARAMETERS_VALUE)
.put(PhpSlimServerCodegen.PHPCS_STANDARD, PHPCS_STANDARD_VALUE)
.build(); .build();
} }

View File

@@ -63,6 +63,8 @@ public class PhpSlimServerOptionsTest extends AbstractOptionsTest {
times = 1; times = 1;
clientCodegen.setSortParamsByRequiredFlag(Boolean.valueOf(PhpSlimServerOptionsProvider.SORT_PARAMS_VALUE)); clientCodegen.setSortParamsByRequiredFlag(Boolean.valueOf(PhpSlimServerOptionsProvider.SORT_PARAMS_VALUE));
times = 1; times = 1;
clientCodegen.setPhpcsStandard(PhpSlimServerOptionsProvider.PHPCS_STANDARD_VALUE);
times = 1;
}}; }};
} }
} }

View File

@@ -30,15 +30,17 @@ $ php -S localhost:8888 -t php-slim-server
## Run tests ## Run tests
This package uses PHPUnit 4.8 for unit testing. This package uses PHPUnit 4.8 for unit testing and PHP Codesniffer to check source code against user defined coding standard(`phpcsStandard` generator config option).
[Test folder](test) contains templates which you can fill with real test assertions. [Test folder](test) contains templates which you can fill with real test assertions.
How to write tests read at [PHPUnit Manual - Chapter 2. Writing Tests for PHPUnit](https://phpunit.de/manual/4.8/en/writing-tests-for-phpunit.html). How to write tests read at [PHPUnit Manual - Chapter 2. Writing Tests for PHPUnit](https://phpunit.de/manual/4.8/en/writing-tests-for-phpunit.html).
How to configure PHP CodeSniffer read at [PHP CodeSniffer Documentation](https://github.com/squizlabs/PHP_CodeSniffer/wiki).
Command | Tool | Target Command | Tool | Target
---- | ---- | ---- ---- | ---- | ----
`$ composer test` | PHPUnit | All tests `$ composer test` | PHPUnit | All tests
`$ composer run test-apis` | PHPUnit | Apis tests `$ composer run test-apis` | PHPUnit | Apis tests
`$ composer run test-models` | PHPUnit | Models tests `$ composer run test-models` | PHPUnit | Models tests
`$ composer run phpcs` | PHP CodeSniffer | All files
## API Endpoints ## API Endpoints

View File

@@ -6,7 +6,8 @@
"tuupola/slim-basic-auth": "^3.0.0" "tuupola/slim-basic-auth": "^3.0.0"
}, },
"require-dev": { "require-dev": {
"phpunit/phpunit": "^4.8" "phpunit/phpunit": "^4.8",
"squizlabs/php_codesniffer": "^3.0"
}, },
"autoload": { "autoload": {
"psr-4": { "OpenAPIServer\\": "lib/" } "psr-4": { "OpenAPIServer\\": "lib/" }
@@ -20,6 +21,7 @@
"@test-models" "@test-models"
], ],
"test-apis": "phpunit --testsuite Apis", "test-apis": "phpunit --testsuite Apis",
"test-models": "phpunit --testsuite Models" "test-models": "phpunit --testsuite Models",
"phpcs": "phpcs ./ --ignore=vendor --warning-severity=0 --standard=PSR12"
} }
} }

View File

@@ -36,7 +36,8 @@ namespace OpenAPIServer;
* @author OpenAPI Generator team * @author OpenAPI Generator team
* @link https://github.com/openapitools/openapi-generator * @link https://github.com/openapitools/openapi-generator
*/ */
abstract class AbstractApiController { abstract class AbstractApiController
{
/** /**
* @var \Interop\Container\ContainerInterface Slim app container instance * @var \Interop\Container\ContainerInterface Slim app container instance
@@ -48,8 +49,8 @@ abstract class AbstractApiController {
* *
* @param \Interop\Container\ContainerInterface $container Slim app container instance * @param \Interop\Container\ContainerInterface $container Slim app container instance
*/ */
public function __construct($container) { public function __construct($container)
{
$this->container = $container; $this->container = $container;
} }
} }

View File

@@ -38,7 +38,8 @@ use OpenAPIServer\AbstractApiController;
* @author OpenAPI Generator team * @author OpenAPI Generator team
* @link https://github.com/openapitools/openapi-generator * @link https://github.com/openapitools/openapi-generator
*/ */
class FakeApi extends AbstractApiController { class FakeApi extends AbstractApiController
{
/** /**
* PUT testCodeInjectEndRnNR * PUT testCodeInjectEndRnNR
@@ -49,10 +50,10 @@ class FakeApi extends AbstractApiController {
* @param \Psr\Http\Message\ResponseInterface $response Response * @param \Psr\Http\Message\ResponseInterface $response Response
* @param array|null $args Path arguments * @param array|null $args Path arguments
*/ */
public function testCodeInjectEndRnNR($request, $response, $args) { public function testCodeInjectEndRnNR($request, $response, $args)
{
$body = $request->getParsedBody(); $body = $request->getParsedBody();
$response->write('How about implementing testCodeInjectEndRnNR as a PUT method ?'); $response->write('How about implementing testCodeInjectEndRnNR as a PUT method ?');
return $response; return $response;
} }
} }

View File

@@ -7,9 +7,9 @@ namespace OpenAPIServer\Model;
/** /**
* ModelReturn * ModelReturn
*/ */
class ModelReturn { class ModelReturn
{
/** @var int $return property description *_/ &#39; \&quot; &#x3D;end -- \\r\\n \\n \\r*/ /** @var int $return property description *_/ &#39; \&quot; &#x3D;end -- \\r\\n \\n \\r*/
private $return; private $return;
} }

View File

@@ -42,7 +42,8 @@ use Tuupola\Middleware\HttpBasicAuthentication;
* @author OpenAPI Generator team * @author OpenAPI Generator team
* @link https://github.com/openapitools/openapi-generator * @link https://github.com/openapitools/openapi-generator
*/ */
class SlimRouter { class SlimRouter
{
/** /**
* @var $slimApp Slim\App instance * @var $slimApp Slim\App instance
@@ -55,7 +56,8 @@ class SlimRouter {
* @param ContainerInterface|array $container Either a ContainerInterface or an associative array of app settings * @param ContainerInterface|array $container Either a ContainerInterface or an associative array of app settings
* @throws InvalidArgumentException when no container is provided that implements ContainerInterface * @throws InvalidArgumentException when no container is provided that implements ContainerInterface
*/ */
public function __construct($container = []) { public function __construct($container = [])
{
$app = new App($container); $app = new App($container);
$basicAuth = new HttpBasicAuthentication([ $basicAuth = new HttpBasicAuthentication([
@@ -68,7 +70,8 @@ class SlimRouter {
]); ]);
$app->PUT( $app->PUT(
'/ ' \" =end -- \\r\\n \\n \\r/v2 *_/ ' \" =end -- \\r\\n \\n \\r/fake', FakeApi::class . ':testCodeInjectEndRnNR' '/ ' \" =end -- \\r\\n \\n \\r/v2 *_/ ' \" =end -- \\r\\n \\n \\r/fake',
FakeApi::class . ':testCodeInjectEndRnNR'
); );
$this->slimApp = $app; $this->slimApp = $app;
@@ -78,7 +81,8 @@ class SlimRouter {
* Returns Slim Framework instance * Returns Slim Framework instance
* @return App * @return App
*/ */
public function getSlimApp() { public function getSlimApp()
{
return $this->slimApp; return $this->slimApp;
} }
} }

View File

@@ -37,34 +37,35 @@ use OpenAPIServer\Api\FakeApi;
* @link https://github.com/openapitools/openapi-generator * @link https://github.com/openapitools/openapi-generator
* @coversDefaultClass \OpenAPIServer\Model\FakeApi * @coversDefaultClass \OpenAPIServer\Model\FakeApi
*/ */
class FakeApiTest extends \PHPUnit_Framework_TestCase { class FakeApiTest extends \PHPUnit_Framework_TestCase
{
/** /**
* Setup before running any test cases * Setup before running any test cases
*/ */
public static function setUpBeforeClass() { public static function setUpBeforeClass()
{
} }
/** /**
* Setup before running each test case * Setup before running each test case
*/ */
public function setUp() { public function setUp()
{
} }
/** /**
* Clean up after running each test case * Clean up after running each test case
*/ */
public function tearDown() { public function tearDown()
{
} }
/** /**
* Clean up after running all test cases * Clean up after running all test cases
*/ */
public static function tearDownAfterClass() { public static function tearDownAfterClass()
{
} }
/** /**
@@ -73,7 +74,7 @@ class FakeApiTest extends \PHPUnit_Framework_TestCase {
* To test code injection *_/ ' \" =end -- \\r\\n \\n \\r. * To test code injection *_/ ' \" =end -- \\r\\n \\n \\r.
* @covers ::testCodeInjectEndRnNR * @covers ::testCodeInjectEndRnNR
*/ */
public function testTestCodeInjectEndRnNR() { public function testTestCodeInjectEndRnNR()
{
} }
} }

View File

@@ -37,48 +37,49 @@ use OpenAPIServer\Model\ModelReturn;
* @link https://github.com/openapitools/openapi-generator * @link https://github.com/openapitools/openapi-generator
* @coversDefaultClass \OpenAPIServer\Model\ModelReturn * @coversDefaultClass \OpenAPIServer\Model\ModelReturn
*/ */
class ModelReturnTest extends \PHPUnit_Framework_TestCase { class ModelReturnTest extends \PHPUnit_Framework_TestCase
{
/** /**
* Setup before running any test cases * Setup before running any test cases
*/ */
public static function setUpBeforeClass() { public static function setUpBeforeClass()
{
} }
/** /**
* Setup before running each test case * Setup before running each test case
*/ */
public function setUp() { public function setUp()
{
} }
/** /**
* Clean up after running each test case * Clean up after running each test case
*/ */
public function tearDown() { public function tearDown()
{
} }
/** /**
* Clean up after running all test cases * Clean up after running all test cases
*/ */
public static function tearDownAfterClass() { public static function tearDownAfterClass()
{
} }
/** /**
* Test "ModelReturn" * Test "ModelReturn"
*/ */
public function testModelReturn() { public function testModelReturn()
{
$testModelReturn = new ModelReturn(); $testModelReturn = new ModelReturn();
} }
/** /**
* Test attribute "return" * Test attribute "return"
*/ */
public function testPropertyReturn() { public function testPropertyReturn()
{
} }
} }

View File

@@ -30,15 +30,17 @@ $ php -S localhost:8888 -t php-slim-server
## Run tests ## Run tests
This package uses PHPUnit 4.8 for unit testing. This package uses PHPUnit 4.8 for unit testing and PHP Codesniffer to check source code against user defined coding standard(`phpcsStandard` generator config option).
[Test folder](test) contains templates which you can fill with real test assertions. [Test folder](test) contains templates which you can fill with real test assertions.
How to write tests read at [PHPUnit Manual - Chapter 2. Writing Tests for PHPUnit](https://phpunit.de/manual/4.8/en/writing-tests-for-phpunit.html). How to write tests read at [PHPUnit Manual - Chapter 2. Writing Tests for PHPUnit](https://phpunit.de/manual/4.8/en/writing-tests-for-phpunit.html).
How to configure PHP CodeSniffer read at [PHP CodeSniffer Documentation](https://github.com/squizlabs/PHP_CodeSniffer/wiki).
Command | Tool | Target Command | Tool | Target
---- | ---- | ---- ---- | ---- | ----
`$ composer test` | PHPUnit | All tests `$ composer test` | PHPUnit | All tests
`$ composer run test-apis` | PHPUnit | Apis tests `$ composer run test-apis` | PHPUnit | Apis tests
`$ composer run test-models` | PHPUnit | Models tests `$ composer run test-models` | PHPUnit | Models tests
`$ composer run phpcs` | PHP CodeSniffer | All files
## API Endpoints ## API Endpoints

View File

@@ -6,7 +6,8 @@
"tuupola/slim-basic-auth": "^3.0.0" "tuupola/slim-basic-auth": "^3.0.0"
}, },
"require-dev": { "require-dev": {
"phpunit/phpunit": "^4.8" "phpunit/phpunit": "^4.8",
"squizlabs/php_codesniffer": "^3.0"
}, },
"autoload": { "autoload": {
"psr-4": { "OpenAPIServer\\": "lib/" } "psr-4": { "OpenAPIServer\\": "lib/" }
@@ -20,6 +21,7 @@
"@test-models" "@test-models"
], ],
"test-apis": "phpunit --testsuite Apis", "test-apis": "phpunit --testsuite Apis",
"test-models": "phpunit --testsuite Models" "test-models": "phpunit --testsuite Models",
"phpcs": "phpcs ./ --ignore=vendor --warning-severity=0 --standard=PSR12"
} }
} }

View File

@@ -35,7 +35,8 @@ namespace OpenAPIServer;
* @author OpenAPI Generator team * @author OpenAPI Generator team
* @link https://github.com/openapitools/openapi-generator * @link https://github.com/openapitools/openapi-generator
*/ */
abstract class AbstractApiController { abstract class AbstractApiController
{
/** /**
* @var \Interop\Container\ContainerInterface Slim app container instance * @var \Interop\Container\ContainerInterface Slim app container instance
@@ -47,8 +48,8 @@ abstract class AbstractApiController {
* *
* @param \Interop\Container\ContainerInterface $container Slim app container instance * @param \Interop\Container\ContainerInterface $container Slim app container instance
*/ */
public function __construct($container) { public function __construct($container)
{
$this->container = $container; $this->container = $container;
} }
} }

View File

@@ -37,7 +37,8 @@ use OpenAPIServer\AbstractApiController;
* @author OpenAPI Generator team * @author OpenAPI Generator team
* @link https://github.com/openapitools/openapi-generator * @link https://github.com/openapitools/openapi-generator
*/ */
class AnotherFakeApi extends AbstractApiController { class AnotherFakeApi extends AbstractApiController
{
/** /**
* PATCH call123TestSpecialTags * PATCH call123TestSpecialTags
@@ -49,10 +50,10 @@ class AnotherFakeApi extends AbstractApiController {
* @param \Psr\Http\Message\ResponseInterface $response Response * @param \Psr\Http\Message\ResponseInterface $response Response
* @param array|null $args Path arguments * @param array|null $args Path arguments
*/ */
public function call123TestSpecialTags($request, $response, $args) { public function call123TestSpecialTags($request, $response, $args)
{
$body = $request->getParsedBody(); $body = $request->getParsedBody();
$response->write('How about implementing call123TestSpecialTags as a PATCH method ?'); $response->write('How about implementing call123TestSpecialTags as a PATCH method ?');
return $response; return $response;
} }
} }

View File

@@ -37,11 +37,11 @@ use OpenAPIServer\AbstractApiController;
* @author OpenAPI Generator team * @author OpenAPI Generator team
* @link https://github.com/openapitools/openapi-generator * @link https://github.com/openapitools/openapi-generator
*/ */
class FakeApi extends AbstractApiController { class FakeApi extends AbstractApiController
{
/** /**
* POST fakeOuterBooleanSerialize * POST fakeOuterBooleanSerialize
* Summary:
* Notes: Test serialization of outer boolean types * Notes: Test serialization of outer boolean types
* Output-Formats: [*_/_*] * Output-Formats: [*_/_*]
* *
@@ -49,7 +49,8 @@ class FakeApi extends AbstractApiController {
* @param \Psr\Http\Message\ResponseInterface $response Response * @param \Psr\Http\Message\ResponseInterface $response Response
* @param array|null $args Path arguments * @param array|null $args Path arguments
*/ */
public function fakeOuterBooleanSerialize($request, $response, $args) { public function fakeOuterBooleanSerialize($request, $response, $args)
{
$body = $request->getParsedBody(); $body = $request->getParsedBody();
$response->write('How about implementing fakeOuterBooleanSerialize as a POST method ?'); $response->write('How about implementing fakeOuterBooleanSerialize as a POST method ?');
return $response; return $response;
@@ -57,7 +58,6 @@ class FakeApi extends AbstractApiController {
/** /**
* POST fakeOuterCompositeSerialize * POST fakeOuterCompositeSerialize
* Summary:
* Notes: Test serialization of object with outer number type * Notes: Test serialization of object with outer number type
* Output-Formats: [*_/_*] * Output-Formats: [*_/_*]
* *
@@ -65,7 +65,8 @@ class FakeApi extends AbstractApiController {
* @param \Psr\Http\Message\ResponseInterface $response Response * @param \Psr\Http\Message\ResponseInterface $response Response
* @param array|null $args Path arguments * @param array|null $args Path arguments
*/ */
public function fakeOuterCompositeSerialize($request, $response, $args) { public function fakeOuterCompositeSerialize($request, $response, $args)
{
$body = $request->getParsedBody(); $body = $request->getParsedBody();
$response->write('How about implementing fakeOuterCompositeSerialize as a POST method ?'); $response->write('How about implementing fakeOuterCompositeSerialize as a POST method ?');
return $response; return $response;
@@ -73,7 +74,6 @@ class FakeApi extends AbstractApiController {
/** /**
* POST fakeOuterNumberSerialize * POST fakeOuterNumberSerialize
* Summary:
* Notes: Test serialization of outer number types * Notes: Test serialization of outer number types
* Output-Formats: [*_/_*] * Output-Formats: [*_/_*]
* *
@@ -81,7 +81,8 @@ class FakeApi extends AbstractApiController {
* @param \Psr\Http\Message\ResponseInterface $response Response * @param \Psr\Http\Message\ResponseInterface $response Response
* @param array|null $args Path arguments * @param array|null $args Path arguments
*/ */
public function fakeOuterNumberSerialize($request, $response, $args) { public function fakeOuterNumberSerialize($request, $response, $args)
{
$body = $request->getParsedBody(); $body = $request->getParsedBody();
$response->write('How about implementing fakeOuterNumberSerialize as a POST method ?'); $response->write('How about implementing fakeOuterNumberSerialize as a POST method ?');
return $response; return $response;
@@ -89,7 +90,6 @@ class FakeApi extends AbstractApiController {
/** /**
* POST fakeOuterStringSerialize * POST fakeOuterStringSerialize
* Summary:
* Notes: Test serialization of outer string types * Notes: Test serialization of outer string types
* Output-Formats: [*_/_*] * Output-Formats: [*_/_*]
* *
@@ -97,7 +97,8 @@ class FakeApi extends AbstractApiController {
* @param \Psr\Http\Message\ResponseInterface $response Response * @param \Psr\Http\Message\ResponseInterface $response Response
* @param array|null $args Path arguments * @param array|null $args Path arguments
*/ */
public function fakeOuterStringSerialize($request, $response, $args) { public function fakeOuterStringSerialize($request, $response, $args)
{
$body = $request->getParsedBody(); $body = $request->getParsedBody();
$response->write('How about implementing fakeOuterStringSerialize as a POST method ?'); $response->write('How about implementing fakeOuterStringSerialize as a POST method ?');
return $response; return $response;
@@ -105,14 +106,14 @@ class FakeApi extends AbstractApiController {
/** /**
* PUT testBodyWithFileSchema * PUT testBodyWithFileSchema
* Summary:
* Notes: For this test, the body for this request much reference a schema named &#x60;File&#x60;. * Notes: For this test, the body for this request much reference a schema named &#x60;File&#x60;.
* *
* @param \Psr\Http\Message\ServerRequestInterface $request Request * @param \Psr\Http\Message\ServerRequestInterface $request Request
* @param \Psr\Http\Message\ResponseInterface $response Response * @param \Psr\Http\Message\ResponseInterface $response Response
* @param array|null $args Path arguments * @param array|null $args Path arguments
*/ */
public function testBodyWithFileSchema($request, $response, $args) { public function testBodyWithFileSchema($request, $response, $args)
{
$body = $request->getParsedBody(); $body = $request->getParsedBody();
$response->write('How about implementing testBodyWithFileSchema as a PUT method ?'); $response->write('How about implementing testBodyWithFileSchema as a PUT method ?');
return $response; return $response;
@@ -120,14 +121,13 @@ class FakeApi extends AbstractApiController {
/** /**
* PUT testBodyWithQueryParams * PUT testBodyWithQueryParams
* Summary:
* Notes:
* *
* @param \Psr\Http\Message\ServerRequestInterface $request Request * @param \Psr\Http\Message\ServerRequestInterface $request Request
* @param \Psr\Http\Message\ResponseInterface $response Response * @param \Psr\Http\Message\ResponseInterface $response Response
* @param array|null $args Path arguments * @param array|null $args Path arguments
*/ */
public function testBodyWithQueryParams($request, $response, $args) { public function testBodyWithQueryParams($request, $response, $args)
{
$queryParams = $request->getQueryParams(); $queryParams = $request->getQueryParams();
$query = $request->getQueryParam('query'); $query = $request->getQueryParam('query');
$body = $request->getParsedBody(); $body = $request->getParsedBody();
@@ -145,7 +145,8 @@ class FakeApi extends AbstractApiController {
* @param \Psr\Http\Message\ResponseInterface $response Response * @param \Psr\Http\Message\ResponseInterface $response Response
* @param array|null $args Path arguments * @param array|null $args Path arguments
*/ */
public function testClientModel($request, $response, $args) { public function testClientModel($request, $response, $args)
{
$body = $request->getParsedBody(); $body = $request->getParsedBody();
$response->write('How about implementing testClientModel as a PATCH method ?'); $response->write('How about implementing testClientModel as a PATCH method ?');
return $response; return $response;
@@ -160,7 +161,8 @@ class FakeApi extends AbstractApiController {
* @param \Psr\Http\Message\ResponseInterface $response Response * @param \Psr\Http\Message\ResponseInterface $response Response
* @param array|null $args Path arguments * @param array|null $args Path arguments
*/ */
public function testEndpointParameters($request, $response, $args) { public function testEndpointParameters($request, $response, $args)
{
$integer = $request->getParsedBodyParam('integer'); $integer = $request->getParsedBodyParam('integer');
$int32 = $request->getParsedBodyParam('int32'); $int32 = $request->getParsedBodyParam('int32');
$int64 = $request->getParsedBodyParam('int64'); $int64 = $request->getParsedBodyParam('int64');
@@ -188,7 +190,8 @@ class FakeApi extends AbstractApiController {
* @param \Psr\Http\Message\ResponseInterface $response Response * @param \Psr\Http\Message\ResponseInterface $response Response
* @param array|null $args Path arguments * @param array|null $args Path arguments
*/ */
public function testEnumParameters($request, $response, $args) { public function testEnumParameters($request, $response, $args)
{
$headers = $request->getHeaders(); $headers = $request->getHeaders();
$enumHeaderStringArray = $request->hasHeader('enum_header_string_array') ? $headers['enum_header_string_array'] : null; $enumHeaderStringArray = $request->hasHeader('enum_header_string_array') ? $headers['enum_header_string_array'] : null;
$enumHeaderString = $request->hasHeader('enum_header_string') ? $headers['enum_header_string'] : null; $enumHeaderString = $request->hasHeader('enum_header_string') ? $headers['enum_header_string'] : null;
@@ -206,13 +209,13 @@ class FakeApi extends AbstractApiController {
/** /**
* POST testInlineAdditionalProperties * POST testInlineAdditionalProperties
* Summary: test inline additionalProperties * Summary: test inline additionalProperties
* Notes:
* *
* @param \Psr\Http\Message\ServerRequestInterface $request Request * @param \Psr\Http\Message\ServerRequestInterface $request Request
* @param \Psr\Http\Message\ResponseInterface $response Response * @param \Psr\Http\Message\ResponseInterface $response Response
* @param array|null $args Path arguments * @param array|null $args Path arguments
*/ */
public function testInlineAdditionalProperties($request, $response, $args) { public function testInlineAdditionalProperties($request, $response, $args)
{
$body = $request->getParsedBody(); $body = $request->getParsedBody();
$response->write('How about implementing testInlineAdditionalProperties as a POST method ?'); $response->write('How about implementing testInlineAdditionalProperties as a POST method ?');
return $response; return $response;
@@ -221,17 +224,16 @@ class FakeApi extends AbstractApiController {
/** /**
* GET testJsonFormData * GET testJsonFormData
* Summary: test json serialization of form data * Summary: test json serialization of form data
* Notes:
* *
* @param \Psr\Http\Message\ServerRequestInterface $request Request * @param \Psr\Http\Message\ServerRequestInterface $request Request
* @param \Psr\Http\Message\ResponseInterface $response Response * @param \Psr\Http\Message\ResponseInterface $response Response
* @param array|null $args Path arguments * @param array|null $args Path arguments
*/ */
public function testJsonFormData($request, $response, $args) { public function testJsonFormData($request, $response, $args)
{
$param = $request->getParsedBodyParam('param'); $param = $request->getParsedBodyParam('param');
$param2 = $request->getParsedBodyParam('param2'); $param2 = $request->getParsedBodyParam('param2');
$response->write('How about implementing testJsonFormData as a GET method ?'); $response->write('How about implementing testJsonFormData as a GET method ?');
return $response; return $response;
} }
} }

View File

@@ -37,7 +37,8 @@ use OpenAPIServer\AbstractApiController;
* @author OpenAPI Generator team * @author OpenAPI Generator team
* @link https://github.com/openapitools/openapi-generator * @link https://github.com/openapitools/openapi-generator
*/ */
class FakeClassnameTags123Api extends AbstractApiController { class FakeClassnameTags123Api extends AbstractApiController
{
/** /**
* PATCH testClassname * PATCH testClassname
@@ -49,10 +50,10 @@ class FakeClassnameTags123Api extends AbstractApiController {
* @param \Psr\Http\Message\ResponseInterface $response Response * @param \Psr\Http\Message\ResponseInterface $response Response
* @param array|null $args Path arguments * @param array|null $args Path arguments
*/ */
public function testClassname($request, $response, $args) { public function testClassname($request, $response, $args)
{
$body = $request->getParsedBody(); $body = $request->getParsedBody();
$response->write('How about implementing testClassname as a PATCH method ?'); $response->write('How about implementing testClassname as a PATCH method ?');
return $response; return $response;
} }
} }

View File

@@ -37,18 +37,19 @@ use OpenAPIServer\AbstractApiController;
* @author OpenAPI Generator team * @author OpenAPI Generator team
* @link https://github.com/openapitools/openapi-generator * @link https://github.com/openapitools/openapi-generator
*/ */
class PetApi extends AbstractApiController { class PetApi extends AbstractApiController
{
/** /**
* POST addPet * POST addPet
* Summary: Add a new pet to the store * Summary: Add a new pet to the store
* Notes:
* *
* @param \Psr\Http\Message\ServerRequestInterface $request Request * @param \Psr\Http\Message\ServerRequestInterface $request Request
* @param \Psr\Http\Message\ResponseInterface $response Response * @param \Psr\Http\Message\ResponseInterface $response Response
* @param array|null $args Path arguments * @param array|null $args Path arguments
*/ */
public function addPet($request, $response, $args) { public function addPet($request, $response, $args)
{
$body = $request->getParsedBody(); $body = $request->getParsedBody();
$response->write('How about implementing addPet as a POST method ?'); $response->write('How about implementing addPet as a POST method ?');
return $response; return $response;
@@ -57,13 +58,13 @@ class PetApi extends AbstractApiController {
/** /**
* DELETE deletePet * DELETE deletePet
* Summary: Deletes a pet * Summary: Deletes a pet
* Notes:
* *
* @param \Psr\Http\Message\ServerRequestInterface $request Request * @param \Psr\Http\Message\ServerRequestInterface $request Request
* @param \Psr\Http\Message\ResponseInterface $response Response * @param \Psr\Http\Message\ResponseInterface $response Response
* @param array|null $args Path arguments * @param array|null $args Path arguments
*/ */
public function deletePet($request, $response, $args) { public function deletePet($request, $response, $args)
{
$headers = $request->getHeaders(); $headers = $request->getHeaders();
$apiKey = $request->hasHeader('api_key') ? $headers['api_key'] : null; $apiKey = $request->hasHeader('api_key') ? $headers['api_key'] : null;
$petId = $args['petId']; $petId = $args['petId'];
@@ -81,7 +82,8 @@ class PetApi extends AbstractApiController {
* @param \Psr\Http\Message\ResponseInterface $response Response * @param \Psr\Http\Message\ResponseInterface $response Response
* @param array|null $args Path arguments * @param array|null $args Path arguments
*/ */
public function findPetsByStatus($request, $response, $args) { public function findPetsByStatus($request, $response, $args)
{
$queryParams = $request->getQueryParams(); $queryParams = $request->getQueryParams();
$status = $request->getQueryParam('status'); $status = $request->getQueryParam('status');
$response->write('How about implementing findPetsByStatus as a GET method ?'); $response->write('How about implementing findPetsByStatus as a GET method ?');
@@ -98,7 +100,8 @@ class PetApi extends AbstractApiController {
* @param \Psr\Http\Message\ResponseInterface $response Response * @param \Psr\Http\Message\ResponseInterface $response Response
* @param array|null $args Path arguments * @param array|null $args Path arguments
*/ */
public function findPetsByTags($request, $response, $args) { public function findPetsByTags($request, $response, $args)
{
$queryParams = $request->getQueryParams(); $queryParams = $request->getQueryParams();
$tags = $request->getQueryParam('tags'); $tags = $request->getQueryParam('tags');
$response->write('How about implementing findPetsByTags as a GET method ?'); $response->write('How about implementing findPetsByTags as a GET method ?');
@@ -115,7 +118,8 @@ class PetApi extends AbstractApiController {
* @param \Psr\Http\Message\ResponseInterface $response Response * @param \Psr\Http\Message\ResponseInterface $response Response
* @param array|null $args Path arguments * @param array|null $args Path arguments
*/ */
public function getPetById($request, $response, $args) { public function getPetById($request, $response, $args)
{
$petId = $args['petId']; $petId = $args['petId'];
$response->write('How about implementing getPetById as a GET method ?'); $response->write('How about implementing getPetById as a GET method ?');
return $response; return $response;
@@ -124,13 +128,13 @@ class PetApi extends AbstractApiController {
/** /**
* PUT updatePet * PUT updatePet
* Summary: Update an existing pet * Summary: Update an existing pet
* Notes:
* *
* @param \Psr\Http\Message\ServerRequestInterface $request Request * @param \Psr\Http\Message\ServerRequestInterface $request Request
* @param \Psr\Http\Message\ResponseInterface $response Response * @param \Psr\Http\Message\ResponseInterface $response Response
* @param array|null $args Path arguments * @param array|null $args Path arguments
*/ */
public function updatePet($request, $response, $args) { public function updatePet($request, $response, $args)
{
$body = $request->getParsedBody(); $body = $request->getParsedBody();
$response->write('How about implementing updatePet as a PUT method ?'); $response->write('How about implementing updatePet as a PUT method ?');
return $response; return $response;
@@ -139,13 +143,13 @@ class PetApi extends AbstractApiController {
/** /**
* POST updatePetWithForm * POST updatePetWithForm
* Summary: Updates a pet in the store with form data * Summary: Updates a pet in the store with form data
* Notes:
* *
* @param \Psr\Http\Message\ServerRequestInterface $request Request * @param \Psr\Http\Message\ServerRequestInterface $request Request
* @param \Psr\Http\Message\ResponseInterface $response Response * @param \Psr\Http\Message\ResponseInterface $response Response
* @param array|null $args Path arguments * @param array|null $args Path arguments
*/ */
public function updatePetWithForm($request, $response, $args) { public function updatePetWithForm($request, $response, $args)
{
$petId = $args['petId']; $petId = $args['petId'];
$name = $request->getParsedBodyParam('name'); $name = $request->getParsedBodyParam('name');
$status = $request->getParsedBodyParam('status'); $status = $request->getParsedBodyParam('status');
@@ -156,14 +160,14 @@ class PetApi extends AbstractApiController {
/** /**
* POST uploadFile * POST uploadFile
* Summary: uploads an image * Summary: uploads an image
* Notes:
* Output-Formats: [application/json] * Output-Formats: [application/json]
* *
* @param \Psr\Http\Message\ServerRequestInterface $request Request * @param \Psr\Http\Message\ServerRequestInterface $request Request
* @param \Psr\Http\Message\ResponseInterface $response Response * @param \Psr\Http\Message\ResponseInterface $response Response
* @param array|null $args Path arguments * @param array|null $args Path arguments
*/ */
public function uploadFile($request, $response, $args) { public function uploadFile($request, $response, $args)
{
$petId = $args['petId']; $petId = $args['petId'];
$additionalMetadata = $request->getParsedBodyParam('additionalMetadata'); $additionalMetadata = $request->getParsedBodyParam('additionalMetadata');
$file = (key_exists('file', $request->getUploadedFiles())) ? $request->getUploadedFiles()['file'] : null; $file = (key_exists('file', $request->getUploadedFiles())) ? $request->getUploadedFiles()['file'] : null;
@@ -174,19 +178,18 @@ class PetApi extends AbstractApiController {
/** /**
* POST uploadFileWithRequiredFile * POST uploadFileWithRequiredFile
* Summary: uploads an image (required) * Summary: uploads an image (required)
* Notes:
* Output-Formats: [application/json] * Output-Formats: [application/json]
* *
* @param \Psr\Http\Message\ServerRequestInterface $request Request * @param \Psr\Http\Message\ServerRequestInterface $request Request
* @param \Psr\Http\Message\ResponseInterface $response Response * @param \Psr\Http\Message\ResponseInterface $response Response
* @param array|null $args Path arguments * @param array|null $args Path arguments
*/ */
public function uploadFileWithRequiredFile($request, $response, $args) { public function uploadFileWithRequiredFile($request, $response, $args)
{
$petId = $args['petId']; $petId = $args['petId'];
$additionalMetadata = $request->getParsedBodyParam('additionalMetadata'); $additionalMetadata = $request->getParsedBodyParam('additionalMetadata');
$requiredFile = (key_exists('requiredFile', $request->getUploadedFiles())) ? $request->getUploadedFiles()['requiredFile'] : null; $requiredFile = (key_exists('requiredFile', $request->getUploadedFiles())) ? $request->getUploadedFiles()['requiredFile'] : null;
$response->write('How about implementing uploadFileWithRequiredFile as a POST method ?'); $response->write('How about implementing uploadFileWithRequiredFile as a POST method ?');
return $response; return $response;
} }
} }

View File

@@ -37,7 +37,8 @@ use OpenAPIServer\AbstractApiController;
* @author OpenAPI Generator team * @author OpenAPI Generator team
* @link https://github.com/openapitools/openapi-generator * @link https://github.com/openapitools/openapi-generator
*/ */
class StoreApi extends AbstractApiController { class StoreApi extends AbstractApiController
{
/** /**
* DELETE deleteOrder * DELETE deleteOrder
@@ -48,7 +49,8 @@ class StoreApi extends AbstractApiController {
* @param \Psr\Http\Message\ResponseInterface $response Response * @param \Psr\Http\Message\ResponseInterface $response Response
* @param array|null $args Path arguments * @param array|null $args Path arguments
*/ */
public function deleteOrder($request, $response, $args) { public function deleteOrder($request, $response, $args)
{
$orderId = $args['order_id']; $orderId = $args['order_id'];
$response->write('How about implementing deleteOrder as a DELETE method ?'); $response->write('How about implementing deleteOrder as a DELETE method ?');
return $response; return $response;
@@ -64,7 +66,8 @@ class StoreApi extends AbstractApiController {
* @param \Psr\Http\Message\ResponseInterface $response Response * @param \Psr\Http\Message\ResponseInterface $response Response
* @param array|null $args Path arguments * @param array|null $args Path arguments
*/ */
public function getInventory($request, $response, $args) { public function getInventory($request, $response, $args)
{
$response->write('How about implementing getInventory as a GET method ?'); $response->write('How about implementing getInventory as a GET method ?');
return $response; return $response;
} }
@@ -79,7 +82,8 @@ class StoreApi extends AbstractApiController {
* @param \Psr\Http\Message\ResponseInterface $response Response * @param \Psr\Http\Message\ResponseInterface $response Response
* @param array|null $args Path arguments * @param array|null $args Path arguments
*/ */
public function getOrderById($request, $response, $args) { public function getOrderById($request, $response, $args)
{
$orderId = $args['order_id']; $orderId = $args['order_id'];
$response->write('How about implementing getOrderById as a GET method ?'); $response->write('How about implementing getOrderById as a GET method ?');
return $response; return $response;
@@ -88,17 +92,16 @@ class StoreApi extends AbstractApiController {
/** /**
* POST placeOrder * POST placeOrder
* Summary: Place an order for a pet * Summary: Place an order for a pet
* Notes:
* Output-Formats: [application/xml, application/json] * Output-Formats: [application/xml, application/json]
* *
* @param \Psr\Http\Message\ServerRequestInterface $request Request * @param \Psr\Http\Message\ServerRequestInterface $request Request
* @param \Psr\Http\Message\ResponseInterface $response Response * @param \Psr\Http\Message\ResponseInterface $response Response
* @param array|null $args Path arguments * @param array|null $args Path arguments
*/ */
public function placeOrder($request, $response, $args) { public function placeOrder($request, $response, $args)
{
$body = $request->getParsedBody(); $body = $request->getParsedBody();
$response->write('How about implementing placeOrder as a POST method ?'); $response->write('How about implementing placeOrder as a POST method ?');
return $response; return $response;
} }
} }

View File

@@ -37,7 +37,8 @@ use OpenAPIServer\AbstractApiController;
* @author OpenAPI Generator team * @author OpenAPI Generator team
* @link https://github.com/openapitools/openapi-generator * @link https://github.com/openapitools/openapi-generator
*/ */
class UserApi extends AbstractApiController { class UserApi extends AbstractApiController
{
/** /**
* POST createUser * POST createUser
@@ -48,7 +49,8 @@ class UserApi extends AbstractApiController {
* @param \Psr\Http\Message\ResponseInterface $response Response * @param \Psr\Http\Message\ResponseInterface $response Response
* @param array|null $args Path arguments * @param array|null $args Path arguments
*/ */
public function createUser($request, $response, $args) { public function createUser($request, $response, $args)
{
$body = $request->getParsedBody(); $body = $request->getParsedBody();
$response->write('How about implementing createUser as a POST method ?'); $response->write('How about implementing createUser as a POST method ?');
return $response; return $response;
@@ -57,13 +59,13 @@ class UserApi extends AbstractApiController {
/** /**
* POST createUsersWithArrayInput * POST createUsersWithArrayInput
* Summary: Creates list of users with given input array * Summary: Creates list of users with given input array
* Notes:
* *
* @param \Psr\Http\Message\ServerRequestInterface $request Request * @param \Psr\Http\Message\ServerRequestInterface $request Request
* @param \Psr\Http\Message\ResponseInterface $response Response * @param \Psr\Http\Message\ResponseInterface $response Response
* @param array|null $args Path arguments * @param array|null $args Path arguments
*/ */
public function createUsersWithArrayInput($request, $response, $args) { public function createUsersWithArrayInput($request, $response, $args)
{
$body = $request->getParsedBody(); $body = $request->getParsedBody();
$response->write('How about implementing createUsersWithArrayInput as a POST method ?'); $response->write('How about implementing createUsersWithArrayInput as a POST method ?');
return $response; return $response;
@@ -72,13 +74,13 @@ class UserApi extends AbstractApiController {
/** /**
* POST createUsersWithListInput * POST createUsersWithListInput
* Summary: Creates list of users with given input array * Summary: Creates list of users with given input array
* Notes:
* *
* @param \Psr\Http\Message\ServerRequestInterface $request Request * @param \Psr\Http\Message\ServerRequestInterface $request Request
* @param \Psr\Http\Message\ResponseInterface $response Response * @param \Psr\Http\Message\ResponseInterface $response Response
* @param array|null $args Path arguments * @param array|null $args Path arguments
*/ */
public function createUsersWithListInput($request, $response, $args) { public function createUsersWithListInput($request, $response, $args)
{
$body = $request->getParsedBody(); $body = $request->getParsedBody();
$response->write('How about implementing createUsersWithListInput as a POST method ?'); $response->write('How about implementing createUsersWithListInput as a POST method ?');
return $response; return $response;
@@ -93,7 +95,8 @@ class UserApi extends AbstractApiController {
* @param \Psr\Http\Message\ResponseInterface $response Response * @param \Psr\Http\Message\ResponseInterface $response Response
* @param array|null $args Path arguments * @param array|null $args Path arguments
*/ */
public function deleteUser($request, $response, $args) { public function deleteUser($request, $response, $args)
{
$username = $args['username']; $username = $args['username'];
$response->write('How about implementing deleteUser as a DELETE method ?'); $response->write('How about implementing deleteUser as a DELETE method ?');
return $response; return $response;
@@ -102,14 +105,14 @@ class UserApi extends AbstractApiController {
/** /**
* GET getUserByName * GET getUserByName
* Summary: Get user by user name * Summary: Get user by user name
* Notes:
* Output-Formats: [application/xml, application/json] * Output-Formats: [application/xml, application/json]
* *
* @param \Psr\Http\Message\ServerRequestInterface $request Request * @param \Psr\Http\Message\ServerRequestInterface $request Request
* @param \Psr\Http\Message\ResponseInterface $response Response * @param \Psr\Http\Message\ResponseInterface $response Response
* @param array|null $args Path arguments * @param array|null $args Path arguments
*/ */
public function getUserByName($request, $response, $args) { public function getUserByName($request, $response, $args)
{
$username = $args['username']; $username = $args['username'];
$response->write('How about implementing getUserByName as a GET method ?'); $response->write('How about implementing getUserByName as a GET method ?');
return $response; return $response;
@@ -118,14 +121,14 @@ class UserApi extends AbstractApiController {
/** /**
* GET loginUser * GET loginUser
* Summary: Logs user into the system * Summary: Logs user into the system
* Notes:
* Output-Formats: [application/xml, application/json] * Output-Formats: [application/xml, application/json]
* *
* @param \Psr\Http\Message\ServerRequestInterface $request Request * @param \Psr\Http\Message\ServerRequestInterface $request Request
* @param \Psr\Http\Message\ResponseInterface $response Response * @param \Psr\Http\Message\ResponseInterface $response Response
* @param array|null $args Path arguments * @param array|null $args Path arguments
*/ */
public function loginUser($request, $response, $args) { public function loginUser($request, $response, $args)
{
$queryParams = $request->getQueryParams(); $queryParams = $request->getQueryParams();
$username = $request->getQueryParam('username'); $username = $request->getQueryParam('username');
$password = $request->getQueryParam('password'); $password = $request->getQueryParam('password');
@@ -136,13 +139,13 @@ class UserApi extends AbstractApiController {
/** /**
* GET logoutUser * GET logoutUser
* Summary: Logs out current logged in user session * Summary: Logs out current logged in user session
* Notes:
* *
* @param \Psr\Http\Message\ServerRequestInterface $request Request * @param \Psr\Http\Message\ServerRequestInterface $request Request
* @param \Psr\Http\Message\ResponseInterface $response Response * @param \Psr\Http\Message\ResponseInterface $response Response
* @param array|null $args Path arguments * @param array|null $args Path arguments
*/ */
public function logoutUser($request, $response, $args) { public function logoutUser($request, $response, $args)
{
$response->write('How about implementing logoutUser as a GET method ?'); $response->write('How about implementing logoutUser as a GET method ?');
return $response; return $response;
} }
@@ -156,11 +159,11 @@ class UserApi extends AbstractApiController {
* @param \Psr\Http\Message\ResponseInterface $response Response * @param \Psr\Http\Message\ResponseInterface $response Response
* @param array|null $args Path arguments * @param array|null $args Path arguments
*/ */
public function updateUser($request, $response, $args) { public function updateUser($request, $response, $args)
{
$username = $args['username']; $username = $args['username'];
$body = $request->getParsedBody(); $body = $request->getParsedBody();
$response->write('How about implementing updateUser as a PUT method ?'); $response->write('How about implementing updateUser as a PUT method ?');
return $response; return $response;
} }
} }

View File

@@ -7,12 +7,12 @@ namespace OpenAPIServer\Model;
/** /**
* AdditionalPropertiesClass * AdditionalPropertiesClass
*/ */
class AdditionalPropertiesClass { class AdditionalPropertiesClass
{
/** @var map[string,string] $mapProperty */ /** @var map[string,string] $mapProperty */
private $mapProperty; private $mapProperty;
/** @var map[string,map[string,string]] $mapOfMapProperty */ /** @var map[string,map[string,string]] $mapOfMapProperty */
private $mapOfMapProperty; private $mapOfMapProperty;
} }

View File

@@ -7,12 +7,12 @@ namespace OpenAPIServer\Model;
/** /**
* Animal * Animal
*/ */
class Animal { class Animal
{
/** @var string $className */ /** @var string $className */
private $className; private $className;
/** @var string $color */ /** @var string $color */
private $color; private $color;
} }

View File

@@ -7,6 +7,6 @@ namespace OpenAPIServer\Model;
/** /**
* AnimalFarm * AnimalFarm
*/ */
class AnimalFarm { class AnimalFarm
{
} }

View File

@@ -7,7 +7,8 @@ namespace OpenAPIServer\Model;
/** /**
* ApiResponse * ApiResponse
*/ */
class ApiResponse { class ApiResponse
{
/** @var int $code */ /** @var int $code */
private $code; private $code;
@@ -17,5 +18,4 @@ class ApiResponse {
/** @var string $message */ /** @var string $message */
private $message; private $message;
} }

View File

@@ -7,9 +7,9 @@ namespace OpenAPIServer\Model;
/** /**
* ArrayOfArrayOfNumberOnly * ArrayOfArrayOfNumberOnly
*/ */
class ArrayOfArrayOfNumberOnly { class ArrayOfArrayOfNumberOnly
{
/** @var float[][] $arrayArrayNumber */ /** @var float[][] $arrayArrayNumber */
private $arrayArrayNumber; private $arrayArrayNumber;
} }

View File

@@ -7,9 +7,9 @@ namespace OpenAPIServer\Model;
/** /**
* ArrayOfNumberOnly * ArrayOfNumberOnly
*/ */
class ArrayOfNumberOnly { class ArrayOfNumberOnly
{
/** @var float[] $arrayNumber */ /** @var float[] $arrayNumber */
private $arrayNumber; private $arrayNumber;
} }

View File

@@ -7,7 +7,8 @@ namespace OpenAPIServer\Model;
/** /**
* ArrayTest * ArrayTest
*/ */
class ArrayTest { class ArrayTest
{
/** @var string[] $arrayOfString */ /** @var string[] $arrayOfString */
private $arrayOfString; private $arrayOfString;
@@ -17,5 +18,4 @@ class ArrayTest {
/** @var \OpenAPIServer\Model\ReadOnlyFirst[][] $arrayArrayOfModel */ /** @var \OpenAPIServer\Model\ReadOnlyFirst[][] $arrayArrayOfModel */
private $arrayArrayOfModel; private $arrayArrayOfModel;
} }

View File

@@ -7,7 +7,8 @@ namespace OpenAPIServer\Model;
/** /**
* Capitalization * Capitalization
*/ */
class Capitalization { class Capitalization
{
/** @var string $smallCamel */ /** @var string $smallCamel */
private $smallCamel; private $smallCamel;
@@ -26,5 +27,4 @@ class Capitalization {
/** @var string $aTTNAME Name of the pet*/ /** @var string $aTTNAME Name of the pet*/
private $aTTNAME; private $aTTNAME;
} }

View File

@@ -7,7 +7,8 @@ namespace OpenAPIServer\Model;
/** /**
* Cat * Cat
*/ */
class Cat { class Cat
{
/** @var string $className */ /** @var string $className */
private $className; private $className;
@@ -17,5 +18,4 @@ class Cat {
/** @var bool $declawed */ /** @var bool $declawed */
private $declawed; private $declawed;
} }

View File

@@ -7,12 +7,12 @@ namespace OpenAPIServer\Model;
/** /**
* Category * Category
*/ */
class Category { class Category
{
/** @var int $id */ /** @var int $id */
private $id; private $id;
/** @var string $name */ /** @var string $name */
private $name; private $name;
} }

View File

@@ -7,9 +7,9 @@ namespace OpenAPIServer\Model;
/** /**
* ClassModel * ClassModel
*/ */
class ClassModel { class ClassModel
{
/** @var string $class */ /** @var string $class */
private $class; private $class;
} }

View File

@@ -7,9 +7,9 @@ namespace OpenAPIServer\Model;
/** /**
* Client * Client
*/ */
class Client { class Client
{
/** @var string $client */ /** @var string $client */
private $client; private $client;
} }

View File

@@ -7,7 +7,8 @@ namespace OpenAPIServer\Model;
/** /**
* Dog * Dog
*/ */
class Dog { class Dog
{
/** @var string $className */ /** @var string $className */
private $className; private $className;
@@ -17,5 +18,4 @@ class Dog {
/** @var string $breed */ /** @var string $breed */
private $breed; private $breed;
} }

View File

@@ -7,12 +7,12 @@ namespace OpenAPIServer\Model;
/** /**
* EnumArrays * EnumArrays
*/ */
class EnumArrays { class EnumArrays
{
/** @var string $justSymbol */ /** @var string $justSymbol */
private $justSymbol; private $justSymbol;
/** @var string[] $arrayEnum */ /** @var string[] $arrayEnum */
private $arrayEnum; private $arrayEnum;
} }

View File

@@ -7,6 +7,6 @@ namespace OpenAPIServer\Model;
/** /**
* EnumClass * EnumClass
*/ */
class EnumClass { class EnumClass
{
} }

View File

@@ -7,7 +7,8 @@ namespace OpenAPIServer\Model;
/** /**
* EnumTest * EnumTest
*/ */
class EnumTest { class EnumTest
{
/** @var string $enumString */ /** @var string $enumString */
private $enumString; private $enumString;
@@ -23,5 +24,4 @@ class EnumTest {
/** @var \OpenAPIServer\Model\OuterEnum $outerEnum */ /** @var \OpenAPIServer\Model\OuterEnum $outerEnum */
private $outerEnum; private $outerEnum;
} }

View File

@@ -7,9 +7,9 @@ namespace OpenAPIServer\Model;
/** /**
* File * File
*/ */
class File { class File
{
/** @var string $sourceURI Test capitalization*/ /** @var string $sourceURI Test capitalization*/
private $sourceURI; private $sourceURI;
} }

View File

@@ -7,12 +7,12 @@ namespace OpenAPIServer\Model;
/** /**
* FileSchemaTestClass * FileSchemaTestClass
*/ */
class FileSchemaTestClass { class FileSchemaTestClass
{
/** @var \OpenAPIServer\Model\File $file */ /** @var \OpenAPIServer\Model\File $file */
private $file; private $file;
/** @var \OpenAPIServer\Model\File[] $files */ /** @var \OpenAPIServer\Model\File[] $files */
private $files; private $files;
} }

View File

@@ -7,7 +7,8 @@ namespace OpenAPIServer\Model;
/** /**
* FormatTest * FormatTest
*/ */
class FormatTest { class FormatTest
{
/** @var int $integer */ /** @var int $integer */
private $integer; private $integer;
@@ -47,5 +48,4 @@ class FormatTest {
/** @var string $password */ /** @var string $password */
private $password; private $password;
} }

View File

@@ -7,12 +7,12 @@ namespace OpenAPIServer\Model;
/** /**
* HasOnlyReadOnly * HasOnlyReadOnly
*/ */
class HasOnlyReadOnly { class HasOnlyReadOnly
{
/** @var string $bar */ /** @var string $bar */
private $bar; private $bar;
/** @var string $foo */ /** @var string $foo */
private $foo; private $foo;
} }

View File

@@ -7,7 +7,8 @@ namespace OpenAPIServer\Model;
/** /**
* MapTest * MapTest
*/ */
class MapTest { class MapTest
{
/** @var map[string,map[string,string]] $mapMapOfString */ /** @var map[string,map[string,string]] $mapMapOfString */
private $mapMapOfString; private $mapMapOfString;
@@ -20,5 +21,4 @@ class MapTest {
/** @var \OpenAPIServer\Model\StringBooleanMap $indirectMap */ /** @var \OpenAPIServer\Model\StringBooleanMap $indirectMap */
private $indirectMap; private $indirectMap;
} }

View File

@@ -7,7 +7,8 @@ namespace OpenAPIServer\Model;
/** /**
* MixedPropertiesAndAdditionalPropertiesClass * MixedPropertiesAndAdditionalPropertiesClass
*/ */
class MixedPropertiesAndAdditionalPropertiesClass { class MixedPropertiesAndAdditionalPropertiesClass
{
/** @var string $uuid */ /** @var string $uuid */
private $uuid; private $uuid;
@@ -17,5 +18,4 @@ class MixedPropertiesAndAdditionalPropertiesClass {
/** @var map[string,\OpenAPIServer\Model\Animal] $map */ /** @var map[string,\OpenAPIServer\Model\Animal] $map */
private $map; private $map;
} }

View File

@@ -7,12 +7,12 @@ namespace OpenAPIServer\Model;
/** /**
* Model200Response * Model200Response
*/ */
class Model200Response { class Model200Response
{
/** @var int $name */ /** @var int $name */
private $name; private $name;
/** @var string $class */ /** @var string $class */
private $class; private $class;
} }

View File

@@ -7,9 +7,9 @@ namespace OpenAPIServer\Model;
/** /**
* ModelList * ModelList
*/ */
class ModelList { class ModelList
{
/** @var string $_123list */ /** @var string $_123list */
private $_123list; private $_123list;
} }

View File

@@ -7,9 +7,9 @@ namespace OpenAPIServer\Model;
/** /**
* ModelReturn * ModelReturn
*/ */
class ModelReturn { class ModelReturn
{
/** @var int $return */ /** @var int $return */
private $return; private $return;
} }

View File

@@ -7,7 +7,8 @@ namespace OpenAPIServer\Model;
/** /**
* Name * Name
*/ */
class Name { class Name
{
/** @var int $name */ /** @var int $name */
private $name; private $name;
@@ -20,5 +21,4 @@ class Name {
/** @var int $_123number */ /** @var int $_123number */
private $_123number; private $_123number;
} }

View File

@@ -7,9 +7,9 @@ namespace OpenAPIServer\Model;
/** /**
* NumberOnly * NumberOnly
*/ */
class NumberOnly { class NumberOnly
{
/** @var float $justNumber */ /** @var float $justNumber */
private $justNumber; private $justNumber;
} }

View File

@@ -7,7 +7,8 @@ namespace OpenAPIServer\Model;
/** /**
* Order * Order
*/ */
class Order { class Order
{
/** @var int $id */ /** @var int $id */
private $id; private $id;
@@ -26,5 +27,4 @@ class Order {
/** @var bool $complete */ /** @var bool $complete */
private $complete; private $complete;
} }

View File

@@ -7,7 +7,8 @@ namespace OpenAPIServer\Model;
/** /**
* OuterComposite * OuterComposite
*/ */
class OuterComposite { class OuterComposite
{
/** @var float $myNumber */ /** @var float $myNumber */
private $myNumber; private $myNumber;
@@ -17,5 +18,4 @@ class OuterComposite {
/** @var bool $myBoolean */ /** @var bool $myBoolean */
private $myBoolean; private $myBoolean;
} }

View File

@@ -7,6 +7,6 @@ namespace OpenAPIServer\Model;
/** /**
* OuterEnum * OuterEnum
*/ */
class OuterEnum { class OuterEnum
{
} }

View File

@@ -7,7 +7,8 @@ namespace OpenAPIServer\Model;
/** /**
* Pet * Pet
*/ */
class Pet { class Pet
{
/** @var int $id */ /** @var int $id */
private $id; private $id;
@@ -26,5 +27,4 @@ class Pet {
/** @var string $status pet status in the store*/ /** @var string $status pet status in the store*/
private $status; private $status;
} }

View File

@@ -7,12 +7,12 @@ namespace OpenAPIServer\Model;
/** /**
* ReadOnlyFirst * ReadOnlyFirst
*/ */
class ReadOnlyFirst { class ReadOnlyFirst
{
/** @var string $bar */ /** @var string $bar */
private $bar; private $bar;
/** @var string $baz */ /** @var string $baz */
private $baz; private $baz;
} }

View File

@@ -7,9 +7,9 @@ namespace OpenAPIServer\Model;
/** /**
* SpecialModelName * SpecialModelName
*/ */
class SpecialModelName { class SpecialModelName
{
/** @var int $specialPropertyName */ /** @var int $specialPropertyName */
private $specialPropertyName; private $specialPropertyName;
} }

View File

@@ -7,6 +7,6 @@ namespace OpenAPIServer\Model;
/** /**
* StringBooleanMap * StringBooleanMap
*/ */
class StringBooleanMap { class StringBooleanMap
{
} }

View File

@@ -7,12 +7,12 @@ namespace OpenAPIServer\Model;
/** /**
* Tag * Tag
*/ */
class Tag { class Tag
{
/** @var int $id */ /** @var int $id */
private $id; private $id;
/** @var string $name */ /** @var string $name */
private $name; private $name;
} }

View File

@@ -7,7 +7,8 @@ namespace OpenAPIServer\Model;
/** /**
* User * User
*/ */
class User { class User
{
/** @var int $id */ /** @var int $id */
private $id; private $id;
@@ -32,5 +33,4 @@ class User {
/** @var int $userStatus User Status*/ /** @var int $userStatus User Status*/
private $userStatus; private $userStatus;
} }

View File

@@ -46,7 +46,8 @@ use Tuupola\Middleware\HttpBasicAuthentication;
* @author OpenAPI Generator team * @author OpenAPI Generator team
* @link https://github.com/openapitools/openapi-generator * @link https://github.com/openapitools/openapi-generator
*/ */
class SlimRouter { class SlimRouter
{
/** /**
* @var $slimApp Slim\App instance * @var $slimApp Slim\App instance
@@ -59,7 +60,8 @@ class SlimRouter {
* @param ContainerInterface|array $container Either a ContainerInterface or an associative array of app settings * @param ContainerInterface|array $container Either a ContainerInterface or an associative array of app settings
* @throws InvalidArgumentException when no container is provided that implements ContainerInterface * @throws InvalidArgumentException when no container is provided that implements ContainerInterface
*/ */
public function __construct($container = []) { public function __construct($container = [])
{
$app = new App($container); $app = new App($container);
$basicAuth = new HttpBasicAuthentication([ $basicAuth = new HttpBasicAuthentication([
@@ -72,108 +74,142 @@ class SlimRouter {
]); ]);
$app->PATCH( $app->PATCH(
'/v2/another-fake/dummy', AnotherFakeApi::class . ':call123TestSpecialTags' '/v2/another-fake/dummy',
AnotherFakeApi::class . ':call123TestSpecialTags'
); );
$app->POST( $app->POST(
'/v2/fake/outer/boolean', FakeApi::class . ':fakeOuterBooleanSerialize' '/v2/fake/outer/boolean',
FakeApi::class . ':fakeOuterBooleanSerialize'
); );
$app->POST( $app->POST(
'/v2/fake/outer/composite', FakeApi::class . ':fakeOuterCompositeSerialize' '/v2/fake/outer/composite',
FakeApi::class . ':fakeOuterCompositeSerialize'
); );
$app->POST( $app->POST(
'/v2/fake/outer/number', FakeApi::class . ':fakeOuterNumberSerialize' '/v2/fake/outer/number',
FakeApi::class . ':fakeOuterNumberSerialize'
); );
$app->POST( $app->POST(
'/v2/fake/outer/string', FakeApi::class . ':fakeOuterStringSerialize' '/v2/fake/outer/string',
FakeApi::class . ':fakeOuterStringSerialize'
); );
$app->PUT( $app->PUT(
'/v2/fake/body-with-file-schema', FakeApi::class . ':testBodyWithFileSchema' '/v2/fake/body-with-file-schema',
FakeApi::class . ':testBodyWithFileSchema'
); );
$app->PUT( $app->PUT(
'/v2/fake/body-with-query-params', FakeApi::class . ':testBodyWithQueryParams' '/v2/fake/body-with-query-params',
FakeApi::class . ':testBodyWithQueryParams'
); );
$app->PATCH( $app->PATCH(
'/v2/fake', FakeApi::class . ':testClientModel' '/v2/fake',
FakeApi::class . ':testClientModel'
); );
$app->POST( $app->POST(
'/v2/fake', FakeApi::class . ':testEndpointParameters' '/v2/fake',
FakeApi::class . ':testEndpointParameters'
)->add( )->add(
$basicAuth $basicAuth
); );
$app->GET( $app->GET(
'/v2/fake', FakeApi::class . ':testEnumParameters' '/v2/fake',
FakeApi::class . ':testEnumParameters'
); );
$app->POST( $app->POST(
'/v2/fake/inline-additionalProperties', FakeApi::class . ':testInlineAdditionalProperties' '/v2/fake/inline-additionalProperties',
FakeApi::class . ':testInlineAdditionalProperties'
); );
$app->GET( $app->GET(
'/v2/fake/jsonFormData', FakeApi::class . ':testJsonFormData' '/v2/fake/jsonFormData',
FakeApi::class . ':testJsonFormData'
); );
$app->PATCH( $app->PATCH(
'/v2/fake_classname_test', FakeClassnameTags123Api::class . ':testClassname' '/v2/fake_classname_test',
FakeClassnameTags123Api::class . ':testClassname'
); );
$app->POST( $app->POST(
'/v2/pet', PetApi::class . ':addPet' '/v2/pet',
PetApi::class . ':addPet'
); );
$app->GET( $app->GET(
'/v2/pet/findByStatus', PetApi::class . ':findPetsByStatus' '/v2/pet/findByStatus',
PetApi::class . ':findPetsByStatus'
); );
$app->GET( $app->GET(
'/v2/pet/findByTags', PetApi::class . ':findPetsByTags' '/v2/pet/findByTags',
PetApi::class . ':findPetsByTags'
); );
$app->PUT( $app->PUT(
'/v2/pet', PetApi::class . ':updatePet' '/v2/pet',
PetApi::class . ':updatePet'
); );
$app->DELETE( $app->DELETE(
'/v2/pet/{petId}', PetApi::class . ':deletePet' '/v2/pet/{petId}',
PetApi::class . ':deletePet'
); );
$app->GET( $app->GET(
'/v2/pet/{petId}', PetApi::class . ':getPetById' '/v2/pet/{petId}',
PetApi::class . ':getPetById'
); );
$app->POST( $app->POST(
'/v2/pet/{petId}', PetApi::class . ':updatePetWithForm' '/v2/pet/{petId}',
PetApi::class . ':updatePetWithForm'
); );
$app->POST( $app->POST(
'/v2/pet/{petId}/uploadImage', PetApi::class . ':uploadFile' '/v2/pet/{petId}/uploadImage',
PetApi::class . ':uploadFile'
); );
$app->POST( $app->POST(
'/v2/fake/{petId}/uploadImageWithRequiredFile', PetApi::class . ':uploadFileWithRequiredFile' '/v2/fake/{petId}/uploadImageWithRequiredFile',
PetApi::class . ':uploadFileWithRequiredFile'
); );
$app->GET( $app->GET(
'/v2/store/inventory', StoreApi::class . ':getInventory' '/v2/store/inventory',
StoreApi::class . ':getInventory'
); );
$app->POST( $app->POST(
'/v2/store/order', StoreApi::class . ':placeOrder' '/v2/store/order',
StoreApi::class . ':placeOrder'
); );
$app->DELETE( $app->DELETE(
'/v2/store/order/{order_id}', StoreApi::class . ':deleteOrder' '/v2/store/order/{order_id}',
StoreApi::class . ':deleteOrder'
); );
$app->GET( $app->GET(
'/v2/store/order/{order_id}', StoreApi::class . ':getOrderById' '/v2/store/order/{order_id}',
StoreApi::class . ':getOrderById'
); );
$app->POST( $app->POST(
'/v2/user', UserApi::class . ':createUser' '/v2/user',
UserApi::class . ':createUser'
); );
$app->POST( $app->POST(
'/v2/user/createWithArray', UserApi::class . ':createUsersWithArrayInput' '/v2/user/createWithArray',
UserApi::class . ':createUsersWithArrayInput'
); );
$app->POST( $app->POST(
'/v2/user/createWithList', UserApi::class . ':createUsersWithListInput' '/v2/user/createWithList',
UserApi::class . ':createUsersWithListInput'
); );
$app->GET( $app->GET(
'/v2/user/login', UserApi::class . ':loginUser' '/v2/user/login',
UserApi::class . ':loginUser'
); );
$app->GET( $app->GET(
'/v2/user/logout', UserApi::class . ':logoutUser' '/v2/user/logout',
UserApi::class . ':logoutUser'
); );
$app->DELETE( $app->DELETE(
'/v2/user/{username}', UserApi::class . ':deleteUser' '/v2/user/{username}',
UserApi::class . ':deleteUser'
); );
$app->GET( $app->GET(
'/v2/user/{username}', UserApi::class . ':getUserByName' '/v2/user/{username}',
UserApi::class . ':getUserByName'
); );
$app->PUT( $app->PUT(
'/v2/user/{username}', UserApi::class . ':updateUser' '/v2/user/{username}',
UserApi::class . ':updateUser'
); );
$this->slimApp = $app; $this->slimApp = $app;
@@ -183,7 +219,8 @@ class SlimRouter {
* Returns Slim Framework instance * Returns Slim Framework instance
* @return App * @return App
*/ */
public function getSlimApp() { public function getSlimApp()
{
return $this->slimApp; return $this->slimApp;
} }
} }

View File

@@ -36,43 +36,44 @@ use OpenAPIServer\Api\AnotherFakeApi;
* @link https://github.com/openapitools/openapi-generator * @link https://github.com/openapitools/openapi-generator
* @coversDefaultClass \OpenAPIServer\Model\AnotherFakeApi * @coversDefaultClass \OpenAPIServer\Model\AnotherFakeApi
*/ */
class AnotherFakeApiTest extends \PHPUnit_Framework_TestCase { class AnotherFakeApiTest extends \PHPUnit_Framework_TestCase
{
/** /**
* Setup before running any test cases * Setup before running any test cases
*/ */
public static function setUpBeforeClass() { public static function setUpBeforeClass()
{
} }
/** /**
* Setup before running each test case * Setup before running each test case
*/ */
public function setUp() { public function setUp()
{
} }
/** /**
* Clean up after running each test case * Clean up after running each test case
*/ */
public function tearDown() { public function tearDown()
{
} }
/** /**
* Clean up after running all test cases * Clean up after running all test cases
*/ */
public static function tearDownAfterClass() { public static function tearDownAfterClass()
{
} }
/** /**
* Test case for testSpecialTags * Test case for call123TestSpecialTags
* *
* To test special tags. * To test special tags.
* @covers ::testSpecialTags * @covers ::call123TestSpecialTags
*/ */
public function testTestSpecialTags() { public function testCall123TestSpecialTags()
{
} }
} }

View File

@@ -36,34 +36,35 @@ use OpenAPIServer\Api\FakeApi;
* @link https://github.com/openapitools/openapi-generator * @link https://github.com/openapitools/openapi-generator
* @coversDefaultClass \OpenAPIServer\Model\FakeApi * @coversDefaultClass \OpenAPIServer\Model\FakeApi
*/ */
class FakeApiTest extends \PHPUnit_Framework_TestCase { class FakeApiTest extends \PHPUnit_Framework_TestCase
{
/** /**
* Setup before running any test cases * Setup before running any test cases
*/ */
public static function setUpBeforeClass() { public static function setUpBeforeClass()
{
} }
/** /**
* Setup before running each test case * Setup before running each test case
*/ */
public function setUp() { public function setUp()
{
} }
/** /**
* Clean up after running each test case * Clean up after running each test case
*/ */
public function tearDown() { public function tearDown()
{
} }
/** /**
* Clean up after running all test cases * Clean up after running all test cases
*/ */
public static function tearDownAfterClass() { public static function tearDownAfterClass()
{
} }
/** /**
@@ -72,8 +73,8 @@ class FakeApiTest extends \PHPUnit_Framework_TestCase {
* . * .
* @covers ::fakeOuterBooleanSerialize * @covers ::fakeOuterBooleanSerialize
*/ */
public function testFakeOuterBooleanSerialize() { public function testFakeOuterBooleanSerialize()
{
} }
/** /**
@@ -82,8 +83,8 @@ class FakeApiTest extends \PHPUnit_Framework_TestCase {
* . * .
* @covers ::fakeOuterCompositeSerialize * @covers ::fakeOuterCompositeSerialize
*/ */
public function testFakeOuterCompositeSerialize() { public function testFakeOuterCompositeSerialize()
{
} }
/** /**
@@ -92,8 +93,8 @@ class FakeApiTest extends \PHPUnit_Framework_TestCase {
* . * .
* @covers ::fakeOuterNumberSerialize * @covers ::fakeOuterNumberSerialize
*/ */
public function testFakeOuterNumberSerialize() { public function testFakeOuterNumberSerialize()
{
} }
/** /**
@@ -102,8 +103,8 @@ class FakeApiTest extends \PHPUnit_Framework_TestCase {
* . * .
* @covers ::fakeOuterStringSerialize * @covers ::fakeOuterStringSerialize
*/ */
public function testFakeOuterStringSerialize() { public function testFakeOuterStringSerialize()
{
} }
/** /**
@@ -112,8 +113,8 @@ class FakeApiTest extends \PHPUnit_Framework_TestCase {
* . * .
* @covers ::testBodyWithFileSchema * @covers ::testBodyWithFileSchema
*/ */
public function testTestBodyWithFileSchema() { public function testTestBodyWithFileSchema()
{
} }
/** /**
@@ -122,8 +123,8 @@ class FakeApiTest extends \PHPUnit_Framework_TestCase {
* . * .
* @covers ::testBodyWithQueryParams * @covers ::testBodyWithQueryParams
*/ */
public function testTestBodyWithQueryParams() { public function testTestBodyWithQueryParams()
{
} }
/** /**
@@ -132,8 +133,8 @@ class FakeApiTest extends \PHPUnit_Framework_TestCase {
* To test \"client\" model. * To test \"client\" model.
* @covers ::testClientModel * @covers ::testClientModel
*/ */
public function testTestClientModel() { public function testTestClientModel()
{
} }
/** /**
@@ -142,8 +143,8 @@ class FakeApiTest extends \PHPUnit_Framework_TestCase {
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트. * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트.
* @covers ::testEndpointParameters * @covers ::testEndpointParameters
*/ */
public function testTestEndpointParameters() { public function testTestEndpointParameters()
{
} }
/** /**
@@ -152,8 +153,8 @@ class FakeApiTest extends \PHPUnit_Framework_TestCase {
* To test enum parameters. * To test enum parameters.
* @covers ::testEnumParameters * @covers ::testEnumParameters
*/ */
public function testTestEnumParameters() { public function testTestEnumParameters()
{
} }
/** /**
@@ -162,8 +163,8 @@ class FakeApiTest extends \PHPUnit_Framework_TestCase {
* test inline additionalProperties. * test inline additionalProperties.
* @covers ::testInlineAdditionalProperties * @covers ::testInlineAdditionalProperties
*/ */
public function testTestInlineAdditionalProperties() { public function testTestInlineAdditionalProperties()
{
} }
/** /**
@@ -172,7 +173,7 @@ class FakeApiTest extends \PHPUnit_Framework_TestCase {
* test json serialization of form data. * test json serialization of form data.
* @covers ::testJsonFormData * @covers ::testJsonFormData
*/ */
public function testTestJsonFormData() { public function testTestJsonFormData()
{
} }
} }

View File

@@ -36,34 +36,35 @@ use OpenAPIServer\Api\FakeClassnameTags123Api;
* @link https://github.com/openapitools/openapi-generator * @link https://github.com/openapitools/openapi-generator
* @coversDefaultClass \OpenAPIServer\Model\FakeClassnameTags123Api * @coversDefaultClass \OpenAPIServer\Model\FakeClassnameTags123Api
*/ */
class FakeClassnameTags123ApiTest extends \PHPUnit_Framework_TestCase { class FakeClassnameTags123ApiTest extends \PHPUnit_Framework_TestCase
{
/** /**
* Setup before running any test cases * Setup before running any test cases
*/ */
public static function setUpBeforeClass() { public static function setUpBeforeClass()
{
} }
/** /**
* Setup before running each test case * Setup before running each test case
*/ */
public function setUp() { public function setUp()
{
} }
/** /**
* Clean up after running each test case * Clean up after running each test case
*/ */
public function tearDown() { public function tearDown()
{
} }
/** /**
* Clean up after running all test cases * Clean up after running all test cases
*/ */
public static function tearDownAfterClass() { public static function tearDownAfterClass()
{
} }
/** /**
@@ -72,7 +73,7 @@ class FakeClassnameTags123ApiTest extends \PHPUnit_Framework_TestCase {
* To test class name in snake case. * To test class name in snake case.
* @covers ::testClassname * @covers ::testClassname
*/ */
public function testTestClassname() { public function testTestClassname()
{
} }
} }

View File

@@ -36,34 +36,35 @@ use OpenAPIServer\Api\PetApi;
* @link https://github.com/openapitools/openapi-generator * @link https://github.com/openapitools/openapi-generator
* @coversDefaultClass \OpenAPIServer\Model\PetApi * @coversDefaultClass \OpenAPIServer\Model\PetApi
*/ */
class PetApiTest extends \PHPUnit_Framework_TestCase { class PetApiTest extends \PHPUnit_Framework_TestCase
{
/** /**
* Setup before running any test cases * Setup before running any test cases
*/ */
public static function setUpBeforeClass() { public static function setUpBeforeClass()
{
} }
/** /**
* Setup before running each test case * Setup before running each test case
*/ */
public function setUp() { public function setUp()
{
} }
/** /**
* Clean up after running each test case * Clean up after running each test case
*/ */
public function tearDown() { public function tearDown()
{
} }
/** /**
* Clean up after running all test cases * Clean up after running all test cases
*/ */
public static function tearDownAfterClass() { public static function tearDownAfterClass()
{
} }
/** /**
@@ -72,8 +73,8 @@ class PetApiTest extends \PHPUnit_Framework_TestCase {
* Add a new pet to the store. * Add a new pet to the store.
* @covers ::addPet * @covers ::addPet
*/ */
public function testAddPet() { public function testAddPet()
{
} }
/** /**
@@ -82,8 +83,8 @@ class PetApiTest extends \PHPUnit_Framework_TestCase {
* Deletes a pet. * Deletes a pet.
* @covers ::deletePet * @covers ::deletePet
*/ */
public function testDeletePet() { public function testDeletePet()
{
} }
/** /**
@@ -92,8 +93,8 @@ class PetApiTest extends \PHPUnit_Framework_TestCase {
* Finds Pets by status. * Finds Pets by status.
* @covers ::findPetsByStatus * @covers ::findPetsByStatus
*/ */
public function testFindPetsByStatus() { public function testFindPetsByStatus()
{
} }
/** /**
@@ -102,8 +103,8 @@ class PetApiTest extends \PHPUnit_Framework_TestCase {
* Finds Pets by tags. * Finds Pets by tags.
* @covers ::findPetsByTags * @covers ::findPetsByTags
*/ */
public function testFindPetsByTags() { public function testFindPetsByTags()
{
} }
/** /**
@@ -112,8 +113,8 @@ class PetApiTest extends \PHPUnit_Framework_TestCase {
* Find pet by ID. * Find pet by ID.
* @covers ::getPetById * @covers ::getPetById
*/ */
public function testGetPetById() { public function testGetPetById()
{
} }
/** /**
@@ -122,8 +123,8 @@ class PetApiTest extends \PHPUnit_Framework_TestCase {
* Update an existing pet. * Update an existing pet.
* @covers ::updatePet * @covers ::updatePet
*/ */
public function testUpdatePet() { public function testUpdatePet()
{
} }
/** /**
@@ -132,8 +133,8 @@ class PetApiTest extends \PHPUnit_Framework_TestCase {
* Updates a pet in the store with form data. * Updates a pet in the store with form data.
* @covers ::updatePetWithForm * @covers ::updatePetWithForm
*/ */
public function testUpdatePetWithForm() { public function testUpdatePetWithForm()
{
} }
/** /**
@@ -142,8 +143,8 @@ class PetApiTest extends \PHPUnit_Framework_TestCase {
* uploads an image. * uploads an image.
* @covers ::uploadFile * @covers ::uploadFile
*/ */
public function testUploadFile() { public function testUploadFile()
{
} }
/** /**
@@ -152,7 +153,7 @@ class PetApiTest extends \PHPUnit_Framework_TestCase {
* uploads an image (required). * uploads an image (required).
* @covers ::uploadFileWithRequiredFile * @covers ::uploadFileWithRequiredFile
*/ */
public function testUploadFileWithRequiredFile() { public function testUploadFileWithRequiredFile()
{
} }
} }

View File

@@ -36,34 +36,35 @@ use OpenAPIServer\Api\StoreApi;
* @link https://github.com/openapitools/openapi-generator * @link https://github.com/openapitools/openapi-generator
* @coversDefaultClass \OpenAPIServer\Model\StoreApi * @coversDefaultClass \OpenAPIServer\Model\StoreApi
*/ */
class StoreApiTest extends \PHPUnit_Framework_TestCase { class StoreApiTest extends \PHPUnit_Framework_TestCase
{
/** /**
* Setup before running any test cases * Setup before running any test cases
*/ */
public static function setUpBeforeClass() { public static function setUpBeforeClass()
{
} }
/** /**
* Setup before running each test case * Setup before running each test case
*/ */
public function setUp() { public function setUp()
{
} }
/** /**
* Clean up after running each test case * Clean up after running each test case
*/ */
public function tearDown() { public function tearDown()
{
} }
/** /**
* Clean up after running all test cases * Clean up after running all test cases
*/ */
public static function tearDownAfterClass() { public static function tearDownAfterClass()
{
} }
/** /**
@@ -72,8 +73,8 @@ class StoreApiTest extends \PHPUnit_Framework_TestCase {
* Delete purchase order by ID. * Delete purchase order by ID.
* @covers ::deleteOrder * @covers ::deleteOrder
*/ */
public function testDeleteOrder() { public function testDeleteOrder()
{
} }
/** /**
@@ -82,8 +83,8 @@ class StoreApiTest extends \PHPUnit_Framework_TestCase {
* Returns pet inventories by status. * Returns pet inventories by status.
* @covers ::getInventory * @covers ::getInventory
*/ */
public function testGetInventory() { public function testGetInventory()
{
} }
/** /**
@@ -92,8 +93,8 @@ class StoreApiTest extends \PHPUnit_Framework_TestCase {
* Find purchase order by ID. * Find purchase order by ID.
* @covers ::getOrderById * @covers ::getOrderById
*/ */
public function testGetOrderById() { public function testGetOrderById()
{
} }
/** /**
@@ -102,7 +103,7 @@ class StoreApiTest extends \PHPUnit_Framework_TestCase {
* Place an order for a pet. * Place an order for a pet.
* @covers ::placeOrder * @covers ::placeOrder
*/ */
public function testPlaceOrder() { public function testPlaceOrder()
{
} }
} }

View File

@@ -36,34 +36,35 @@ use OpenAPIServer\Api\UserApi;
* @link https://github.com/openapitools/openapi-generator * @link https://github.com/openapitools/openapi-generator
* @coversDefaultClass \OpenAPIServer\Model\UserApi * @coversDefaultClass \OpenAPIServer\Model\UserApi
*/ */
class UserApiTest extends \PHPUnit_Framework_TestCase { class UserApiTest extends \PHPUnit_Framework_TestCase
{
/** /**
* Setup before running any test cases * Setup before running any test cases
*/ */
public static function setUpBeforeClass() { public static function setUpBeforeClass()
{
} }
/** /**
* Setup before running each test case * Setup before running each test case
*/ */
public function setUp() { public function setUp()
{
} }
/** /**
* Clean up after running each test case * Clean up after running each test case
*/ */
public function tearDown() { public function tearDown()
{
} }
/** /**
* Clean up after running all test cases * Clean up after running all test cases
*/ */
public static function tearDownAfterClass() { public static function tearDownAfterClass()
{
} }
/** /**
@@ -72,8 +73,8 @@ class UserApiTest extends \PHPUnit_Framework_TestCase {
* Create user. * Create user.
* @covers ::createUser * @covers ::createUser
*/ */
public function testCreateUser() { public function testCreateUser()
{
} }
/** /**
@@ -82,8 +83,8 @@ class UserApiTest extends \PHPUnit_Framework_TestCase {
* Creates list of users with given input array. * Creates list of users with given input array.
* @covers ::createUsersWithArrayInput * @covers ::createUsersWithArrayInput
*/ */
public function testCreateUsersWithArrayInput() { public function testCreateUsersWithArrayInput()
{
} }
/** /**
@@ -92,8 +93,8 @@ class UserApiTest extends \PHPUnit_Framework_TestCase {
* Creates list of users with given input array. * Creates list of users with given input array.
* @covers ::createUsersWithListInput * @covers ::createUsersWithListInput
*/ */
public function testCreateUsersWithListInput() { public function testCreateUsersWithListInput()
{
} }
/** /**
@@ -102,8 +103,8 @@ class UserApiTest extends \PHPUnit_Framework_TestCase {
* Delete user. * Delete user.
* @covers ::deleteUser * @covers ::deleteUser
*/ */
public function testDeleteUser() { public function testDeleteUser()
{
} }
/** /**
@@ -112,8 +113,8 @@ class UserApiTest extends \PHPUnit_Framework_TestCase {
* Get user by user name. * Get user by user name.
* @covers ::getUserByName * @covers ::getUserByName
*/ */
public function testGetUserByName() { public function testGetUserByName()
{
} }
/** /**
@@ -122,8 +123,8 @@ class UserApiTest extends \PHPUnit_Framework_TestCase {
* Logs user into the system. * Logs user into the system.
* @covers ::loginUser * @covers ::loginUser
*/ */
public function testLoginUser() { public function testLoginUser()
{
} }
/** /**
@@ -132,8 +133,8 @@ class UserApiTest extends \PHPUnit_Framework_TestCase {
* Logs out current logged in user session. * Logs out current logged in user session.
* @covers ::logoutUser * @covers ::logoutUser
*/ */
public function testLogoutUser() { public function testLogoutUser()
{
} }
/** /**
@@ -142,7 +143,7 @@ class UserApiTest extends \PHPUnit_Framework_TestCase {
* Updated user. * Updated user.
* @covers ::updateUser * @covers ::updateUser
*/ */
public function testUpdateUser() { public function testUpdateUser()
{
} }
} }

View File

@@ -36,55 +36,56 @@ use OpenAPIServer\Model\AdditionalPropertiesClass;
* @link https://github.com/openapitools/openapi-generator * @link https://github.com/openapitools/openapi-generator
* @coversDefaultClass \OpenAPIServer\Model\AdditionalPropertiesClass * @coversDefaultClass \OpenAPIServer\Model\AdditionalPropertiesClass
*/ */
class AdditionalPropertiesClassTest extends \PHPUnit_Framework_TestCase { class AdditionalPropertiesClassTest extends \PHPUnit_Framework_TestCase
{
/** /**
* Setup before running any test cases * Setup before running any test cases
*/ */
public static function setUpBeforeClass() { public static function setUpBeforeClass()
{
} }
/** /**
* Setup before running each test case * Setup before running each test case
*/ */
public function setUp() { public function setUp()
{
} }
/** /**
* Clean up after running each test case * Clean up after running each test case
*/ */
public function tearDown() { public function tearDown()
{
} }
/** /**
* Clean up after running all test cases * Clean up after running all test cases
*/ */
public static function tearDownAfterClass() { public static function tearDownAfterClass()
{
} }
/** /**
* Test "AdditionalPropertiesClass" * Test "AdditionalPropertiesClass"
*/ */
public function testAdditionalPropertiesClass() { public function testAdditionalPropertiesClass()
{
$testAdditionalPropertiesClass = new AdditionalPropertiesClass(); $testAdditionalPropertiesClass = new AdditionalPropertiesClass();
} }
/** /**
* Test attribute "mapProperty" * Test attribute "mapProperty"
*/ */
public function testPropertyMapProperty() { public function testPropertyMapProperty()
{
} }
/** /**
* Test attribute "mapOfMapProperty" * Test attribute "mapOfMapProperty"
*/ */
public function testPropertyMapOfMapProperty() { public function testPropertyMapOfMapProperty()
{
} }
} }

View File

@@ -36,41 +36,42 @@ use OpenAPIServer\Model\AnimalFarm;
* @link https://github.com/openapitools/openapi-generator * @link https://github.com/openapitools/openapi-generator
* @coversDefaultClass \OpenAPIServer\Model\AnimalFarm * @coversDefaultClass \OpenAPIServer\Model\AnimalFarm
*/ */
class AnimalFarmTest extends \PHPUnit_Framework_TestCase { class AnimalFarmTest extends \PHPUnit_Framework_TestCase
{
/** /**
* Setup before running any test cases * Setup before running any test cases
*/ */
public static function setUpBeforeClass() { public static function setUpBeforeClass()
{
} }
/** /**
* Setup before running each test case * Setup before running each test case
*/ */
public function setUp() { public function setUp()
{
} }
/** /**
* Clean up after running each test case * Clean up after running each test case
*/ */
public function tearDown() { public function tearDown()
{
} }
/** /**
* Clean up after running all test cases * Clean up after running all test cases
*/ */
public static function tearDownAfterClass() { public static function tearDownAfterClass()
{
} }
/** /**
* Test "AnimalFarm" * Test "AnimalFarm"
*/ */
public function testAnimalFarm() { public function testAnimalFarm()
{
$testAnimalFarm = new AnimalFarm(); $testAnimalFarm = new AnimalFarm();
} }
} }

View File

@@ -36,55 +36,56 @@ use OpenAPIServer\Model\Animal;
* @link https://github.com/openapitools/openapi-generator * @link https://github.com/openapitools/openapi-generator
* @coversDefaultClass \OpenAPIServer\Model\Animal * @coversDefaultClass \OpenAPIServer\Model\Animal
*/ */
class AnimalTest extends \PHPUnit_Framework_TestCase { class AnimalTest extends \PHPUnit_Framework_TestCase
{
/** /**
* Setup before running any test cases * Setup before running any test cases
*/ */
public static function setUpBeforeClass() { public static function setUpBeforeClass()
{
} }
/** /**
* Setup before running each test case * Setup before running each test case
*/ */
public function setUp() { public function setUp()
{
} }
/** /**
* Clean up after running each test case * Clean up after running each test case
*/ */
public function tearDown() { public function tearDown()
{
} }
/** /**
* Clean up after running all test cases * Clean up after running all test cases
*/ */
public static function tearDownAfterClass() { public static function tearDownAfterClass()
{
} }
/** /**
* Test "Animal" * Test "Animal"
*/ */
public function testAnimal() { public function testAnimal()
{
$testAnimal = new Animal(); $testAnimal = new Animal();
} }
/** /**
* Test attribute "className" * Test attribute "className"
*/ */
public function testPropertyClassName() { public function testPropertyClassName()
{
} }
/** /**
* Test attribute "color" * Test attribute "color"
*/ */
public function testPropertyColor() { public function testPropertyColor()
{
} }
} }

View File

@@ -36,62 +36,63 @@ use OpenAPIServer\Model\ApiResponse;
* @link https://github.com/openapitools/openapi-generator * @link https://github.com/openapitools/openapi-generator
* @coversDefaultClass \OpenAPIServer\Model\ApiResponse * @coversDefaultClass \OpenAPIServer\Model\ApiResponse
*/ */
class ApiResponseTest extends \PHPUnit_Framework_TestCase { class ApiResponseTest extends \PHPUnit_Framework_TestCase
{
/** /**
* Setup before running any test cases * Setup before running any test cases
*/ */
public static function setUpBeforeClass() { public static function setUpBeforeClass()
{
} }
/** /**
* Setup before running each test case * Setup before running each test case
*/ */
public function setUp() { public function setUp()
{
} }
/** /**
* Clean up after running each test case * Clean up after running each test case
*/ */
public function tearDown() { public function tearDown()
{
} }
/** /**
* Clean up after running all test cases * Clean up after running all test cases
*/ */
public static function tearDownAfterClass() { public static function tearDownAfterClass()
{
} }
/** /**
* Test "ApiResponse" * Test "ApiResponse"
*/ */
public function testApiResponse() { public function testApiResponse()
{
$testApiResponse = new ApiResponse(); $testApiResponse = new ApiResponse();
} }
/** /**
* Test attribute "code" * Test attribute "code"
*/ */
public function testPropertyCode() { public function testPropertyCode()
{
} }
/** /**
* Test attribute "type" * Test attribute "type"
*/ */
public function testPropertyType() { public function testPropertyType()
{
} }
/** /**
* Test attribute "message" * Test attribute "message"
*/ */
public function testPropertyMessage() { public function testPropertyMessage()
{
} }
} }

View File

@@ -36,48 +36,49 @@ use OpenAPIServer\Model\ArrayOfArrayOfNumberOnly;
* @link https://github.com/openapitools/openapi-generator * @link https://github.com/openapitools/openapi-generator
* @coversDefaultClass \OpenAPIServer\Model\ArrayOfArrayOfNumberOnly * @coversDefaultClass \OpenAPIServer\Model\ArrayOfArrayOfNumberOnly
*/ */
class ArrayOfArrayOfNumberOnlyTest extends \PHPUnit_Framework_TestCase { class ArrayOfArrayOfNumberOnlyTest extends \PHPUnit_Framework_TestCase
{
/** /**
* Setup before running any test cases * Setup before running any test cases
*/ */
public static function setUpBeforeClass() { public static function setUpBeforeClass()
{
} }
/** /**
* Setup before running each test case * Setup before running each test case
*/ */
public function setUp() { public function setUp()
{
} }
/** /**
* Clean up after running each test case * Clean up after running each test case
*/ */
public function tearDown() { public function tearDown()
{
} }
/** /**
* Clean up after running all test cases * Clean up after running all test cases
*/ */
public static function tearDownAfterClass() { public static function tearDownAfterClass()
{
} }
/** /**
* Test "ArrayOfArrayOfNumberOnly" * Test "ArrayOfArrayOfNumberOnly"
*/ */
public function testArrayOfArrayOfNumberOnly() { public function testArrayOfArrayOfNumberOnly()
{
$testArrayOfArrayOfNumberOnly = new ArrayOfArrayOfNumberOnly(); $testArrayOfArrayOfNumberOnly = new ArrayOfArrayOfNumberOnly();
} }
/** /**
* Test attribute "arrayArrayNumber" * Test attribute "arrayArrayNumber"
*/ */
public function testPropertyArrayArrayNumber() { public function testPropertyArrayArrayNumber()
{
} }
} }

View File

@@ -36,48 +36,49 @@ use OpenAPIServer\Model\ArrayOfNumberOnly;
* @link https://github.com/openapitools/openapi-generator * @link https://github.com/openapitools/openapi-generator
* @coversDefaultClass \OpenAPIServer\Model\ArrayOfNumberOnly * @coversDefaultClass \OpenAPIServer\Model\ArrayOfNumberOnly
*/ */
class ArrayOfNumberOnlyTest extends \PHPUnit_Framework_TestCase { class ArrayOfNumberOnlyTest extends \PHPUnit_Framework_TestCase
{
/** /**
* Setup before running any test cases * Setup before running any test cases
*/ */
public static function setUpBeforeClass() { public static function setUpBeforeClass()
{
} }
/** /**
* Setup before running each test case * Setup before running each test case
*/ */
public function setUp() { public function setUp()
{
} }
/** /**
* Clean up after running each test case * Clean up after running each test case
*/ */
public function tearDown() { public function tearDown()
{
} }
/** /**
* Clean up after running all test cases * Clean up after running all test cases
*/ */
public static function tearDownAfterClass() { public static function tearDownAfterClass()
{
} }
/** /**
* Test "ArrayOfNumberOnly" * Test "ArrayOfNumberOnly"
*/ */
public function testArrayOfNumberOnly() { public function testArrayOfNumberOnly()
{
$testArrayOfNumberOnly = new ArrayOfNumberOnly(); $testArrayOfNumberOnly = new ArrayOfNumberOnly();
} }
/** /**
* Test attribute "arrayNumber" * Test attribute "arrayNumber"
*/ */
public function testPropertyArrayNumber() { public function testPropertyArrayNumber()
{
} }
} }

View File

@@ -36,62 +36,63 @@ use OpenAPIServer\Model\ArrayTest;
* @link https://github.com/openapitools/openapi-generator * @link https://github.com/openapitools/openapi-generator
* @coversDefaultClass \OpenAPIServer\Model\ArrayTest * @coversDefaultClass \OpenAPIServer\Model\ArrayTest
*/ */
class ArrayTestTest extends \PHPUnit_Framework_TestCase { class ArrayTestTest extends \PHPUnit_Framework_TestCase
{
/** /**
* Setup before running any test cases * Setup before running any test cases
*/ */
public static function setUpBeforeClass() { public static function setUpBeforeClass()
{
} }
/** /**
* Setup before running each test case * Setup before running each test case
*/ */
public function setUp() { public function setUp()
{
} }
/** /**
* Clean up after running each test case * Clean up after running each test case
*/ */
public function tearDown() { public function tearDown()
{
} }
/** /**
* Clean up after running all test cases * Clean up after running all test cases
*/ */
public static function tearDownAfterClass() { public static function tearDownAfterClass()
{
} }
/** /**
* Test "ArrayTest" * Test "ArrayTest"
*/ */
public function testArrayTest() { public function testArrayTest()
{
$testArrayTest = new ArrayTest(); $testArrayTest = new ArrayTest();
} }
/** /**
* Test attribute "arrayOfString" * Test attribute "arrayOfString"
*/ */
public function testPropertyArrayOfString() { public function testPropertyArrayOfString()
{
} }
/** /**
* Test attribute "arrayArrayOfInteger" * Test attribute "arrayArrayOfInteger"
*/ */
public function testPropertyArrayArrayOfInteger() { public function testPropertyArrayArrayOfInteger()
{
} }
/** /**
* Test attribute "arrayArrayOfModel" * Test attribute "arrayArrayOfModel"
*/ */
public function testPropertyArrayArrayOfModel() { public function testPropertyArrayArrayOfModel()
{
} }
} }

View File

@@ -36,83 +36,84 @@ use OpenAPIServer\Model\Capitalization;
* @link https://github.com/openapitools/openapi-generator * @link https://github.com/openapitools/openapi-generator
* @coversDefaultClass \OpenAPIServer\Model\Capitalization * @coversDefaultClass \OpenAPIServer\Model\Capitalization
*/ */
class CapitalizationTest extends \PHPUnit_Framework_TestCase { class CapitalizationTest extends \PHPUnit_Framework_TestCase
{
/** /**
* Setup before running any test cases * Setup before running any test cases
*/ */
public static function setUpBeforeClass() { public static function setUpBeforeClass()
{
} }
/** /**
* Setup before running each test case * Setup before running each test case
*/ */
public function setUp() { public function setUp()
{
} }
/** /**
* Clean up after running each test case * Clean up after running each test case
*/ */
public function tearDown() { public function tearDown()
{
} }
/** /**
* Clean up after running all test cases * Clean up after running all test cases
*/ */
public static function tearDownAfterClass() { public static function tearDownAfterClass()
{
} }
/** /**
* Test "Capitalization" * Test "Capitalization"
*/ */
public function testCapitalization() { public function testCapitalization()
{
$testCapitalization = new Capitalization(); $testCapitalization = new Capitalization();
} }
/** /**
* Test attribute "smallCamel" * Test attribute "smallCamel"
*/ */
public function testPropertySmallCamel() { public function testPropertySmallCamel()
{
} }
/** /**
* Test attribute "capitalCamel" * Test attribute "capitalCamel"
*/ */
public function testPropertyCapitalCamel() { public function testPropertyCapitalCamel()
{
} }
/** /**
* Test attribute "smallSnake" * Test attribute "smallSnake"
*/ */
public function testPropertySmallSnake() { public function testPropertySmallSnake()
{
} }
/** /**
* Test attribute "capitalSnake" * Test attribute "capitalSnake"
*/ */
public function testPropertyCapitalSnake() { public function testPropertyCapitalSnake()
{
} }
/** /**
* Test attribute "sCAETHFlowPoints" * Test attribute "sCAETHFlowPoints"
*/ */
public function testPropertySCAETHFlowPoints() { public function testPropertySCAETHFlowPoints()
{
} }
/** /**
* Test attribute "aTTNAME" * Test attribute "aTTNAME"
*/ */
public function testPropertyATTNAME() { public function testPropertyATTNAME()
{
} }
} }

View File

@@ -36,62 +36,63 @@ use OpenAPIServer\Model\Cat;
* @link https://github.com/openapitools/openapi-generator * @link https://github.com/openapitools/openapi-generator
* @coversDefaultClass \OpenAPIServer\Model\Cat * @coversDefaultClass \OpenAPIServer\Model\Cat
*/ */
class CatTest extends \PHPUnit_Framework_TestCase { class CatTest extends \PHPUnit_Framework_TestCase
{
/** /**
* Setup before running any test cases * Setup before running any test cases
*/ */
public static function setUpBeforeClass() { public static function setUpBeforeClass()
{
} }
/** /**
* Setup before running each test case * Setup before running each test case
*/ */
public function setUp() { public function setUp()
{
} }
/** /**
* Clean up after running each test case * Clean up after running each test case
*/ */
public function tearDown() { public function tearDown()
{
} }
/** /**
* Clean up after running all test cases * Clean up after running all test cases
*/ */
public static function tearDownAfterClass() { public static function tearDownAfterClass()
{
} }
/** /**
* Test "Cat" * Test "Cat"
*/ */
public function testCat() { public function testCat()
{
$testCat = new Cat(); $testCat = new Cat();
} }
/** /**
* Test attribute "className" * Test attribute "className"
*/ */
public function testPropertyClassName() { public function testPropertyClassName()
{
} }
/** /**
* Test attribute "color" * Test attribute "color"
*/ */
public function testPropertyColor() { public function testPropertyColor()
{
} }
/** /**
* Test attribute "declawed" * Test attribute "declawed"
*/ */
public function testPropertyDeclawed() { public function testPropertyDeclawed()
{
} }
} }

View File

@@ -36,55 +36,56 @@ use OpenAPIServer\Model\Category;
* @link https://github.com/openapitools/openapi-generator * @link https://github.com/openapitools/openapi-generator
* @coversDefaultClass \OpenAPIServer\Model\Category * @coversDefaultClass \OpenAPIServer\Model\Category
*/ */
class CategoryTest extends \PHPUnit_Framework_TestCase { class CategoryTest extends \PHPUnit_Framework_TestCase
{
/** /**
* Setup before running any test cases * Setup before running any test cases
*/ */
public static function setUpBeforeClass() { public static function setUpBeforeClass()
{
} }
/** /**
* Setup before running each test case * Setup before running each test case
*/ */
public function setUp() { public function setUp()
{
} }
/** /**
* Clean up after running each test case * Clean up after running each test case
*/ */
public function tearDown() { public function tearDown()
{
} }
/** /**
* Clean up after running all test cases * Clean up after running all test cases
*/ */
public static function tearDownAfterClass() { public static function tearDownAfterClass()
{
} }
/** /**
* Test "Category" * Test "Category"
*/ */
public function testCategory() { public function testCategory()
{
$testCategory = new Category(); $testCategory = new Category();
} }
/** /**
* Test attribute "id" * Test attribute "id"
*/ */
public function testPropertyId() { public function testPropertyId()
{
} }
/** /**
* Test attribute "name" * Test attribute "name"
*/ */
public function testPropertyName() { public function testPropertyName()
{
} }
} }

View File

@@ -36,48 +36,49 @@ use OpenAPIServer\Model\ClassModel;
* @link https://github.com/openapitools/openapi-generator * @link https://github.com/openapitools/openapi-generator
* @coversDefaultClass \OpenAPIServer\Model\ClassModel * @coversDefaultClass \OpenAPIServer\Model\ClassModel
*/ */
class ClassModelTest extends \PHPUnit_Framework_TestCase { class ClassModelTest extends \PHPUnit_Framework_TestCase
{
/** /**
* Setup before running any test cases * Setup before running any test cases
*/ */
public static function setUpBeforeClass() { public static function setUpBeforeClass()
{
} }
/** /**
* Setup before running each test case * Setup before running each test case
*/ */
public function setUp() { public function setUp()
{
} }
/** /**
* Clean up after running each test case * Clean up after running each test case
*/ */
public function tearDown() { public function tearDown()
{
} }
/** /**
* Clean up after running all test cases * Clean up after running all test cases
*/ */
public static function tearDownAfterClass() { public static function tearDownAfterClass()
{
} }
/** /**
* Test "ClassModel" * Test "ClassModel"
*/ */
public function testClassModel() { public function testClassModel()
{
$testClassModel = new ClassModel(); $testClassModel = new ClassModel();
} }
/** /**
* Test attribute "class" * Test attribute "class"
*/ */
public function testPropertyClass() { public function testPropertyClass()
{
} }
} }

View File

@@ -36,48 +36,49 @@ use OpenAPIServer\Model\Client;
* @link https://github.com/openapitools/openapi-generator * @link https://github.com/openapitools/openapi-generator
* @coversDefaultClass \OpenAPIServer\Model\Client * @coversDefaultClass \OpenAPIServer\Model\Client
*/ */
class ClientTest extends \PHPUnit_Framework_TestCase { class ClientTest extends \PHPUnit_Framework_TestCase
{
/** /**
* Setup before running any test cases * Setup before running any test cases
*/ */
public static function setUpBeforeClass() { public static function setUpBeforeClass()
{
} }
/** /**
* Setup before running each test case * Setup before running each test case
*/ */
public function setUp() { public function setUp()
{
} }
/** /**
* Clean up after running each test case * Clean up after running each test case
*/ */
public function tearDown() { public function tearDown()
{
} }
/** /**
* Clean up after running all test cases * Clean up after running all test cases
*/ */
public static function tearDownAfterClass() { public static function tearDownAfterClass()
{
} }
/** /**
* Test "Client" * Test "Client"
*/ */
public function testClient() { public function testClient()
{
$testClient = new Client(); $testClient = new Client();
} }
/** /**
* Test attribute "client" * Test attribute "client"
*/ */
public function testPropertyClient() { public function testPropertyClient()
{
} }
} }

View File

@@ -36,62 +36,63 @@ use OpenAPIServer\Model\Dog;
* @link https://github.com/openapitools/openapi-generator * @link https://github.com/openapitools/openapi-generator
* @coversDefaultClass \OpenAPIServer\Model\Dog * @coversDefaultClass \OpenAPIServer\Model\Dog
*/ */
class DogTest extends \PHPUnit_Framework_TestCase { class DogTest extends \PHPUnit_Framework_TestCase
{
/** /**
* Setup before running any test cases * Setup before running any test cases
*/ */
public static function setUpBeforeClass() { public static function setUpBeforeClass()
{
} }
/** /**
* Setup before running each test case * Setup before running each test case
*/ */
public function setUp() { public function setUp()
{
} }
/** /**
* Clean up after running each test case * Clean up after running each test case
*/ */
public function tearDown() { public function tearDown()
{
} }
/** /**
* Clean up after running all test cases * Clean up after running all test cases
*/ */
public static function tearDownAfterClass() { public static function tearDownAfterClass()
{
} }
/** /**
* Test "Dog" * Test "Dog"
*/ */
public function testDog() { public function testDog()
{
$testDog = new Dog(); $testDog = new Dog();
} }
/** /**
* Test attribute "className" * Test attribute "className"
*/ */
public function testPropertyClassName() { public function testPropertyClassName()
{
} }
/** /**
* Test attribute "color" * Test attribute "color"
*/ */
public function testPropertyColor() { public function testPropertyColor()
{
} }
/** /**
* Test attribute "breed" * Test attribute "breed"
*/ */
public function testPropertyBreed() { public function testPropertyBreed()
{
} }
} }

View File

@@ -36,55 +36,56 @@ use OpenAPIServer\Model\EnumArrays;
* @link https://github.com/openapitools/openapi-generator * @link https://github.com/openapitools/openapi-generator
* @coversDefaultClass \OpenAPIServer\Model\EnumArrays * @coversDefaultClass \OpenAPIServer\Model\EnumArrays
*/ */
class EnumArraysTest extends \PHPUnit_Framework_TestCase { class EnumArraysTest extends \PHPUnit_Framework_TestCase
{
/** /**
* Setup before running any test cases * Setup before running any test cases
*/ */
public static function setUpBeforeClass() { public static function setUpBeforeClass()
{
} }
/** /**
* Setup before running each test case * Setup before running each test case
*/ */
public function setUp() { public function setUp()
{
} }
/** /**
* Clean up after running each test case * Clean up after running each test case
*/ */
public function tearDown() { public function tearDown()
{
} }
/** /**
* Clean up after running all test cases * Clean up after running all test cases
*/ */
public static function tearDownAfterClass() { public static function tearDownAfterClass()
{
} }
/** /**
* Test "EnumArrays" * Test "EnumArrays"
*/ */
public function testEnumArrays() { public function testEnumArrays()
{
$testEnumArrays = new EnumArrays(); $testEnumArrays = new EnumArrays();
} }
/** /**
* Test attribute "justSymbol" * Test attribute "justSymbol"
*/ */
public function testPropertyJustSymbol() { public function testPropertyJustSymbol()
{
} }
/** /**
* Test attribute "arrayEnum" * Test attribute "arrayEnum"
*/ */
public function testPropertyArrayEnum() { public function testPropertyArrayEnum()
{
} }
} }

View File

@@ -36,41 +36,42 @@ use OpenAPIServer\Model\EnumClass;
* @link https://github.com/openapitools/openapi-generator * @link https://github.com/openapitools/openapi-generator
* @coversDefaultClass \OpenAPIServer\Model\EnumClass * @coversDefaultClass \OpenAPIServer\Model\EnumClass
*/ */
class EnumClassTest extends \PHPUnit_Framework_TestCase { class EnumClassTest extends \PHPUnit_Framework_TestCase
{
/** /**
* Setup before running any test cases * Setup before running any test cases
*/ */
public static function setUpBeforeClass() { public static function setUpBeforeClass()
{
} }
/** /**
* Setup before running each test case * Setup before running each test case
*/ */
public function setUp() { public function setUp()
{
} }
/** /**
* Clean up after running each test case * Clean up after running each test case
*/ */
public function tearDown() { public function tearDown()
{
} }
/** /**
* Clean up after running all test cases * Clean up after running all test cases
*/ */
public static function tearDownAfterClass() { public static function tearDownAfterClass()
{
} }
/** /**
* Test "EnumClass" * Test "EnumClass"
*/ */
public function testEnumClass() { public function testEnumClass()
{
$testEnumClass = new EnumClass(); $testEnumClass = new EnumClass();
} }
} }

View File

@@ -36,76 +36,77 @@ use OpenAPIServer\Model\EnumTest;
* @link https://github.com/openapitools/openapi-generator * @link https://github.com/openapitools/openapi-generator
* @coversDefaultClass \OpenAPIServer\Model\EnumTest * @coversDefaultClass \OpenAPIServer\Model\EnumTest
*/ */
class EnumTestTest extends \PHPUnit_Framework_TestCase { class EnumTestTest extends \PHPUnit_Framework_TestCase
{
/** /**
* Setup before running any test cases * Setup before running any test cases
*/ */
public static function setUpBeforeClass() { public static function setUpBeforeClass()
{
} }
/** /**
* Setup before running each test case * Setup before running each test case
*/ */
public function setUp() { public function setUp()
{
} }
/** /**
* Clean up after running each test case * Clean up after running each test case
*/ */
public function tearDown() { public function tearDown()
{
} }
/** /**
* Clean up after running all test cases * Clean up after running all test cases
*/ */
public static function tearDownAfterClass() { public static function tearDownAfterClass()
{
} }
/** /**
* Test "EnumTest" * Test "EnumTest"
*/ */
public function testEnumTest() { public function testEnumTest()
{
$testEnumTest = new EnumTest(); $testEnumTest = new EnumTest();
} }
/** /**
* Test attribute "enumString" * Test attribute "enumString"
*/ */
public function testPropertyEnumString() { public function testPropertyEnumString()
{
} }
/** /**
* Test attribute "enumStringRequired" * Test attribute "enumStringRequired"
*/ */
public function testPropertyEnumStringRequired() { public function testPropertyEnumStringRequired()
{
} }
/** /**
* Test attribute "enumInteger" * Test attribute "enumInteger"
*/ */
public function testPropertyEnumInteger() { public function testPropertyEnumInteger()
{
} }
/** /**
* Test attribute "enumNumber" * Test attribute "enumNumber"
*/ */
public function testPropertyEnumNumber() { public function testPropertyEnumNumber()
{
} }
/** /**
* Test attribute "outerEnum" * Test attribute "outerEnum"
*/ */
public function testPropertyOuterEnum() { public function testPropertyOuterEnum()
{
} }
} }

View File

@@ -36,55 +36,56 @@ use OpenAPIServer\Model\FileSchemaTestClass;
* @link https://github.com/openapitools/openapi-generator * @link https://github.com/openapitools/openapi-generator
* @coversDefaultClass \OpenAPIServer\Model\FileSchemaTestClass * @coversDefaultClass \OpenAPIServer\Model\FileSchemaTestClass
*/ */
class FileSchemaTestClassTest extends \PHPUnit_Framework_TestCase { class FileSchemaTestClassTest extends \PHPUnit_Framework_TestCase
{
/** /**
* Setup before running any test cases * Setup before running any test cases
*/ */
public static function setUpBeforeClass() { public static function setUpBeforeClass()
{
} }
/** /**
* Setup before running each test case * Setup before running each test case
*/ */
public function setUp() { public function setUp()
{
} }
/** /**
* Clean up after running each test case * Clean up after running each test case
*/ */
public function tearDown() { public function tearDown()
{
} }
/** /**
* Clean up after running all test cases * Clean up after running all test cases
*/ */
public static function tearDownAfterClass() { public static function tearDownAfterClass()
{
} }
/** /**
* Test "FileSchemaTestClass" * Test "FileSchemaTestClass"
*/ */
public function testFileSchemaTestClass() { public function testFileSchemaTestClass()
{
$testFileSchemaTestClass = new FileSchemaTestClass(); $testFileSchemaTestClass = new FileSchemaTestClass();
} }
/** /**
* Test attribute "file" * Test attribute "file"
*/ */
public function testPropertyFile() { public function testPropertyFile()
{
} }
/** /**
* Test attribute "files" * Test attribute "files"
*/ */
public function testPropertyFiles() { public function testPropertyFiles()
{
} }
} }

View File

@@ -36,48 +36,49 @@ use OpenAPIServer\Model\File;
* @link https://github.com/openapitools/openapi-generator * @link https://github.com/openapitools/openapi-generator
* @coversDefaultClass \OpenAPIServer\Model\File * @coversDefaultClass \OpenAPIServer\Model\File
*/ */
class FileTest extends \PHPUnit_Framework_TestCase { class FileTest extends \PHPUnit_Framework_TestCase
{
/** /**
* Setup before running any test cases * Setup before running any test cases
*/ */
public static function setUpBeforeClass() { public static function setUpBeforeClass()
{
} }
/** /**
* Setup before running each test case * Setup before running each test case
*/ */
public function setUp() { public function setUp()
{
} }
/** /**
* Clean up after running each test case * Clean up after running each test case
*/ */
public function tearDown() { public function tearDown()
{
} }
/** /**
* Clean up after running all test cases * Clean up after running all test cases
*/ */
public static function tearDownAfterClass() { public static function tearDownAfterClass()
{
} }
/** /**
* Test "File" * Test "File"
*/ */
public function testFile() { public function testFile()
{
$testFile = new File(); $testFile = new File();
} }
/** /**
* Test attribute "sourceURI" * Test attribute "sourceURI"
*/ */
public function testPropertySourceURI() { public function testPropertySourceURI()
{
} }
} }

View File

@@ -36,132 +36,133 @@ use OpenAPIServer\Model\FormatTest;
* @link https://github.com/openapitools/openapi-generator * @link https://github.com/openapitools/openapi-generator
* @coversDefaultClass \OpenAPIServer\Model\FormatTest * @coversDefaultClass \OpenAPIServer\Model\FormatTest
*/ */
class FormatTestTest extends \PHPUnit_Framework_TestCase { class FormatTestTest extends \PHPUnit_Framework_TestCase
{
/** /**
* Setup before running any test cases * Setup before running any test cases
*/ */
public static function setUpBeforeClass() { public static function setUpBeforeClass()
{
} }
/** /**
* Setup before running each test case * Setup before running each test case
*/ */
public function setUp() { public function setUp()
{
} }
/** /**
* Clean up after running each test case * Clean up after running each test case
*/ */
public function tearDown() { public function tearDown()
{
} }
/** /**
* Clean up after running all test cases * Clean up after running all test cases
*/ */
public static function tearDownAfterClass() { public static function tearDownAfterClass()
{
} }
/** /**
* Test "FormatTest" * Test "FormatTest"
*/ */
public function testFormatTest() { public function testFormatTest()
{
$testFormatTest = new FormatTest(); $testFormatTest = new FormatTest();
} }
/** /**
* Test attribute "integer" * Test attribute "integer"
*/ */
public function testPropertyInteger() { public function testPropertyInteger()
{
} }
/** /**
* Test attribute "int32" * Test attribute "int32"
*/ */
public function testPropertyInt32() { public function testPropertyInt32()
{
} }
/** /**
* Test attribute "int64" * Test attribute "int64"
*/ */
public function testPropertyInt64() { public function testPropertyInt64()
{
} }
/** /**
* Test attribute "number" * Test attribute "number"
*/ */
public function testPropertyNumber() { public function testPropertyNumber()
{
} }
/** /**
* Test attribute "float" * Test attribute "float"
*/ */
public function testPropertyFloat() { public function testPropertyFloat()
{
} }
/** /**
* Test attribute "double" * Test attribute "double"
*/ */
public function testPropertyDouble() { public function testPropertyDouble()
{
} }
/** /**
* Test attribute "string" * Test attribute "string"
*/ */
public function testPropertyString() { public function testPropertyString()
{
} }
/** /**
* Test attribute "byte" * Test attribute "byte"
*/ */
public function testPropertyByte() { public function testPropertyByte()
{
} }
/** /**
* Test attribute "binary" * Test attribute "binary"
*/ */
public function testPropertyBinary() { public function testPropertyBinary()
{
} }
/** /**
* Test attribute "date" * Test attribute "date"
*/ */
public function testPropertyDate() { public function testPropertyDate()
{
} }
/** /**
* Test attribute "dateTime" * Test attribute "dateTime"
*/ */
public function testPropertyDateTime() { public function testPropertyDateTime()
{
} }
/** /**
* Test attribute "uuid" * Test attribute "uuid"
*/ */
public function testPropertyUuid() { public function testPropertyUuid()
{
} }
/** /**
* Test attribute "password" * Test attribute "password"
*/ */
public function testPropertyPassword() { public function testPropertyPassword()
{
} }
} }

View File

@@ -36,55 +36,56 @@ use OpenAPIServer\Model\HasOnlyReadOnly;
* @link https://github.com/openapitools/openapi-generator * @link https://github.com/openapitools/openapi-generator
* @coversDefaultClass \OpenAPIServer\Model\HasOnlyReadOnly * @coversDefaultClass \OpenAPIServer\Model\HasOnlyReadOnly
*/ */
class HasOnlyReadOnlyTest extends \PHPUnit_Framework_TestCase { class HasOnlyReadOnlyTest extends \PHPUnit_Framework_TestCase
{
/** /**
* Setup before running any test cases * Setup before running any test cases
*/ */
public static function setUpBeforeClass() { public static function setUpBeforeClass()
{
} }
/** /**
* Setup before running each test case * Setup before running each test case
*/ */
public function setUp() { public function setUp()
{
} }
/** /**
* Clean up after running each test case * Clean up after running each test case
*/ */
public function tearDown() { public function tearDown()
{
} }
/** /**
* Clean up after running all test cases * Clean up after running all test cases
*/ */
public static function tearDownAfterClass() { public static function tearDownAfterClass()
{
} }
/** /**
* Test "HasOnlyReadOnly" * Test "HasOnlyReadOnly"
*/ */
public function testHasOnlyReadOnly() { public function testHasOnlyReadOnly()
{
$testHasOnlyReadOnly = new HasOnlyReadOnly(); $testHasOnlyReadOnly = new HasOnlyReadOnly();
} }
/** /**
* Test attribute "bar" * Test attribute "bar"
*/ */
public function testPropertyBar() { public function testPropertyBar()
{
} }
/** /**
* Test attribute "foo" * Test attribute "foo"
*/ */
public function testPropertyFoo() { public function testPropertyFoo()
{
} }
} }

View File

@@ -36,69 +36,70 @@ use OpenAPIServer\Model\MapTest;
* @link https://github.com/openapitools/openapi-generator * @link https://github.com/openapitools/openapi-generator
* @coversDefaultClass \OpenAPIServer\Model\MapTest * @coversDefaultClass \OpenAPIServer\Model\MapTest
*/ */
class MapTestTest extends \PHPUnit_Framework_TestCase { class MapTestTest extends \PHPUnit_Framework_TestCase
{
/** /**
* Setup before running any test cases * Setup before running any test cases
*/ */
public static function setUpBeforeClass() { public static function setUpBeforeClass()
{
} }
/** /**
* Setup before running each test case * Setup before running each test case
*/ */
public function setUp() { public function setUp()
{
} }
/** /**
* Clean up after running each test case * Clean up after running each test case
*/ */
public function tearDown() { public function tearDown()
{
} }
/** /**
* Clean up after running all test cases * Clean up after running all test cases
*/ */
public static function tearDownAfterClass() { public static function tearDownAfterClass()
{
} }
/** /**
* Test "MapTest" * Test "MapTest"
*/ */
public function testMapTest() { public function testMapTest()
{
$testMapTest = new MapTest(); $testMapTest = new MapTest();
} }
/** /**
* Test attribute "mapMapOfString" * Test attribute "mapMapOfString"
*/ */
public function testPropertyMapMapOfString() { public function testPropertyMapMapOfString()
{
} }
/** /**
* Test attribute "mapOfEnumString" * Test attribute "mapOfEnumString"
*/ */
public function testPropertyMapOfEnumString() { public function testPropertyMapOfEnumString()
{
} }
/** /**
* Test attribute "directMap" * Test attribute "directMap"
*/ */
public function testPropertyDirectMap() { public function testPropertyDirectMap()
{
} }
/** /**
* Test attribute "indirectMap" * Test attribute "indirectMap"
*/ */
public function testPropertyIndirectMap() { public function testPropertyIndirectMap()
{
} }
} }

View File

@@ -36,62 +36,63 @@ use OpenAPIServer\Model\MixedPropertiesAndAdditionalPropertiesClass;
* @link https://github.com/openapitools/openapi-generator * @link https://github.com/openapitools/openapi-generator
* @coversDefaultClass \OpenAPIServer\Model\MixedPropertiesAndAdditionalPropertiesClass * @coversDefaultClass \OpenAPIServer\Model\MixedPropertiesAndAdditionalPropertiesClass
*/ */
class MixedPropertiesAndAdditionalPropertiesClassTest extends \PHPUnit_Framework_TestCase { class MixedPropertiesAndAdditionalPropertiesClassTest extends \PHPUnit_Framework_TestCase
{
/** /**
* Setup before running any test cases * Setup before running any test cases
*/ */
public static function setUpBeforeClass() { public static function setUpBeforeClass()
{
} }
/** /**
* Setup before running each test case * Setup before running each test case
*/ */
public function setUp() { public function setUp()
{
} }
/** /**
* Clean up after running each test case * Clean up after running each test case
*/ */
public function tearDown() { public function tearDown()
{
} }
/** /**
* Clean up after running all test cases * Clean up after running all test cases
*/ */
public static function tearDownAfterClass() { public static function tearDownAfterClass()
{
} }
/** /**
* Test "MixedPropertiesAndAdditionalPropertiesClass" * Test "MixedPropertiesAndAdditionalPropertiesClass"
*/ */
public function testMixedPropertiesAndAdditionalPropertiesClass() { public function testMixedPropertiesAndAdditionalPropertiesClass()
{
$testMixedPropertiesAndAdditionalPropertiesClass = new MixedPropertiesAndAdditionalPropertiesClass(); $testMixedPropertiesAndAdditionalPropertiesClass = new MixedPropertiesAndAdditionalPropertiesClass();
} }
/** /**
* Test attribute "uuid" * Test attribute "uuid"
*/ */
public function testPropertyUuid() { public function testPropertyUuid()
{
} }
/** /**
* Test attribute "dateTime" * Test attribute "dateTime"
*/ */
public function testPropertyDateTime() { public function testPropertyDateTime()
{
} }
/** /**
* Test attribute "map" * Test attribute "map"
*/ */
public function testPropertyMap() { public function testPropertyMap()
{
} }
} }

View File

@@ -36,55 +36,56 @@ use OpenAPIServer\Model\Model200Response;
* @link https://github.com/openapitools/openapi-generator * @link https://github.com/openapitools/openapi-generator
* @coversDefaultClass \OpenAPIServer\Model\Model200Response * @coversDefaultClass \OpenAPIServer\Model\Model200Response
*/ */
class Model200ResponseTest extends \PHPUnit_Framework_TestCase { class Model200ResponseTest extends \PHPUnit_Framework_TestCase
{
/** /**
* Setup before running any test cases * Setup before running any test cases
*/ */
public static function setUpBeforeClass() { public static function setUpBeforeClass()
{
} }
/** /**
* Setup before running each test case * Setup before running each test case
*/ */
public function setUp() { public function setUp()
{
} }
/** /**
* Clean up after running each test case * Clean up after running each test case
*/ */
public function tearDown() { public function tearDown()
{
} }
/** /**
* Clean up after running all test cases * Clean up after running all test cases
*/ */
public static function tearDownAfterClass() { public static function tearDownAfterClass()
{
} }
/** /**
* Test "Model200Response" * Test "Model200Response"
*/ */
public function testModel200Response() { public function testModel200Response()
{
$testModel200Response = new Model200Response(); $testModel200Response = new Model200Response();
} }
/** /**
* Test attribute "name" * Test attribute "name"
*/ */
public function testPropertyName() { public function testPropertyName()
{
} }
/** /**
* Test attribute "class" * Test attribute "class"
*/ */
public function testPropertyClass() { public function testPropertyClass()
{
} }
} }

View File

@@ -36,48 +36,49 @@ use OpenAPIServer\Model\ModelList;
* @link https://github.com/openapitools/openapi-generator * @link https://github.com/openapitools/openapi-generator
* @coversDefaultClass \OpenAPIServer\Model\ModelList * @coversDefaultClass \OpenAPIServer\Model\ModelList
*/ */
class ModelListTest extends \PHPUnit_Framework_TestCase { class ModelListTest extends \PHPUnit_Framework_TestCase
{
/** /**
* Setup before running any test cases * Setup before running any test cases
*/ */
public static function setUpBeforeClass() { public static function setUpBeforeClass()
{
} }
/** /**
* Setup before running each test case * Setup before running each test case
*/ */
public function setUp() { public function setUp()
{
} }
/** /**
* Clean up after running each test case * Clean up after running each test case
*/ */
public function tearDown() { public function tearDown()
{
} }
/** /**
* Clean up after running all test cases * Clean up after running all test cases
*/ */
public static function tearDownAfterClass() { public static function tearDownAfterClass()
{
} }
/** /**
* Test "ModelList" * Test "ModelList"
*/ */
public function testModelList() { public function testModelList()
{
$testModelList = new ModelList(); $testModelList = new ModelList();
} }
/** /**
* Test attribute "_123list" * Test attribute "_123list"
*/ */
public function testProperty123list() { public function testProperty123list()
{
} }
} }

View File

@@ -36,48 +36,49 @@ use OpenAPIServer\Model\ModelReturn;
* @link https://github.com/openapitools/openapi-generator * @link https://github.com/openapitools/openapi-generator
* @coversDefaultClass \OpenAPIServer\Model\ModelReturn * @coversDefaultClass \OpenAPIServer\Model\ModelReturn
*/ */
class ModelReturnTest extends \PHPUnit_Framework_TestCase { class ModelReturnTest extends \PHPUnit_Framework_TestCase
{
/** /**
* Setup before running any test cases * Setup before running any test cases
*/ */
public static function setUpBeforeClass() { public static function setUpBeforeClass()
{
} }
/** /**
* Setup before running each test case * Setup before running each test case
*/ */
public function setUp() { public function setUp()
{
} }
/** /**
* Clean up after running each test case * Clean up after running each test case
*/ */
public function tearDown() { public function tearDown()
{
} }
/** /**
* Clean up after running all test cases * Clean up after running all test cases
*/ */
public static function tearDownAfterClass() { public static function tearDownAfterClass()
{
} }
/** /**
* Test "ModelReturn" * Test "ModelReturn"
*/ */
public function testModelReturn() { public function testModelReturn()
{
$testModelReturn = new ModelReturn(); $testModelReturn = new ModelReturn();
} }
/** /**
* Test attribute "return" * Test attribute "return"
*/ */
public function testPropertyReturn() { public function testPropertyReturn()
{
} }
} }

View File

@@ -36,69 +36,70 @@ use OpenAPIServer\Model\Name;
* @link https://github.com/openapitools/openapi-generator * @link https://github.com/openapitools/openapi-generator
* @coversDefaultClass \OpenAPIServer\Model\Name * @coversDefaultClass \OpenAPIServer\Model\Name
*/ */
class NameTest extends \PHPUnit_Framework_TestCase { class NameTest extends \PHPUnit_Framework_TestCase
{
/** /**
* Setup before running any test cases * Setup before running any test cases
*/ */
public static function setUpBeforeClass() { public static function setUpBeforeClass()
{
} }
/** /**
* Setup before running each test case * Setup before running each test case
*/ */
public function setUp() { public function setUp()
{
} }
/** /**
* Clean up after running each test case * Clean up after running each test case
*/ */
public function tearDown() { public function tearDown()
{
} }
/** /**
* Clean up after running all test cases * Clean up after running all test cases
*/ */
public static function tearDownAfterClass() { public static function tearDownAfterClass()
{
} }
/** /**
* Test "Name" * Test "Name"
*/ */
public function testName() { public function testName()
{
$testName = new Name(); $testName = new Name();
} }
/** /**
* Test attribute "name" * Test attribute "name"
*/ */
public function testPropertyName() { public function testPropertyName()
{
} }
/** /**
* Test attribute "snakeCase" * Test attribute "snakeCase"
*/ */
public function testPropertySnakeCase() { public function testPropertySnakeCase()
{
} }
/** /**
* Test attribute "property" * Test attribute "property"
*/ */
public function testPropertyProperty() { public function testPropertyProperty()
{
} }
/** /**
* Test attribute "_123number" * Test attribute "_123number"
*/ */
public function testProperty123number() { public function testProperty123number()
{
} }
} }

View File

@@ -36,48 +36,49 @@ use OpenAPIServer\Model\NumberOnly;
* @link https://github.com/openapitools/openapi-generator * @link https://github.com/openapitools/openapi-generator
* @coversDefaultClass \OpenAPIServer\Model\NumberOnly * @coversDefaultClass \OpenAPIServer\Model\NumberOnly
*/ */
class NumberOnlyTest extends \PHPUnit_Framework_TestCase { class NumberOnlyTest extends \PHPUnit_Framework_TestCase
{
/** /**
* Setup before running any test cases * Setup before running any test cases
*/ */
public static function setUpBeforeClass() { public static function setUpBeforeClass()
{
} }
/** /**
* Setup before running each test case * Setup before running each test case
*/ */
public function setUp() { public function setUp()
{
} }
/** /**
* Clean up after running each test case * Clean up after running each test case
*/ */
public function tearDown() { public function tearDown()
{
} }
/** /**
* Clean up after running all test cases * Clean up after running all test cases
*/ */
public static function tearDownAfterClass() { public static function tearDownAfterClass()
{
} }
/** /**
* Test "NumberOnly" * Test "NumberOnly"
*/ */
public function testNumberOnly() { public function testNumberOnly()
{
$testNumberOnly = new NumberOnly(); $testNumberOnly = new NumberOnly();
} }
/** /**
* Test attribute "justNumber" * Test attribute "justNumber"
*/ */
public function testPropertyJustNumber() { public function testPropertyJustNumber()
{
} }
} }

View File

@@ -36,83 +36,84 @@ use OpenAPIServer\Model\Order;
* @link https://github.com/openapitools/openapi-generator * @link https://github.com/openapitools/openapi-generator
* @coversDefaultClass \OpenAPIServer\Model\Order * @coversDefaultClass \OpenAPIServer\Model\Order
*/ */
class OrderTest extends \PHPUnit_Framework_TestCase { class OrderTest extends \PHPUnit_Framework_TestCase
{
/** /**
* Setup before running any test cases * Setup before running any test cases
*/ */
public static function setUpBeforeClass() { public static function setUpBeforeClass()
{
} }
/** /**
* Setup before running each test case * Setup before running each test case
*/ */
public function setUp() { public function setUp()
{
} }
/** /**
* Clean up after running each test case * Clean up after running each test case
*/ */
public function tearDown() { public function tearDown()
{
} }
/** /**
* Clean up after running all test cases * Clean up after running all test cases
*/ */
public static function tearDownAfterClass() { public static function tearDownAfterClass()
{
} }
/** /**
* Test "Order" * Test "Order"
*/ */
public function testOrder() { public function testOrder()
{
$testOrder = new Order(); $testOrder = new Order();
} }
/** /**
* Test attribute "id" * Test attribute "id"
*/ */
public function testPropertyId() { public function testPropertyId()
{
} }
/** /**
* Test attribute "petId" * Test attribute "petId"
*/ */
public function testPropertyPetId() { public function testPropertyPetId()
{
} }
/** /**
* Test attribute "quantity" * Test attribute "quantity"
*/ */
public function testPropertyQuantity() { public function testPropertyQuantity()
{
} }
/** /**
* Test attribute "shipDate" * Test attribute "shipDate"
*/ */
public function testPropertyShipDate() { public function testPropertyShipDate()
{
} }
/** /**
* Test attribute "status" * Test attribute "status"
*/ */
public function testPropertyStatus() { public function testPropertyStatus()
{
} }
/** /**
* Test attribute "complete" * Test attribute "complete"
*/ */
public function testPropertyComplete() { public function testPropertyComplete()
{
} }
} }

View File

@@ -36,62 +36,63 @@ use OpenAPIServer\Model\OuterComposite;
* @link https://github.com/openapitools/openapi-generator * @link https://github.com/openapitools/openapi-generator
* @coversDefaultClass \OpenAPIServer\Model\OuterComposite * @coversDefaultClass \OpenAPIServer\Model\OuterComposite
*/ */
class OuterCompositeTest extends \PHPUnit_Framework_TestCase { class OuterCompositeTest extends \PHPUnit_Framework_TestCase
{
/** /**
* Setup before running any test cases * Setup before running any test cases
*/ */
public static function setUpBeforeClass() { public static function setUpBeforeClass()
{
} }
/** /**
* Setup before running each test case * Setup before running each test case
*/ */
public function setUp() { public function setUp()
{
} }
/** /**
* Clean up after running each test case * Clean up after running each test case
*/ */
public function tearDown() { public function tearDown()
{
} }
/** /**
* Clean up after running all test cases * Clean up after running all test cases
*/ */
public static function tearDownAfterClass() { public static function tearDownAfterClass()
{
} }
/** /**
* Test "OuterComposite" * Test "OuterComposite"
*/ */
public function testOuterComposite() { public function testOuterComposite()
{
$testOuterComposite = new OuterComposite(); $testOuterComposite = new OuterComposite();
} }
/** /**
* Test attribute "myNumber" * Test attribute "myNumber"
*/ */
public function testPropertyMyNumber() { public function testPropertyMyNumber()
{
} }
/** /**
* Test attribute "myString" * Test attribute "myString"
*/ */
public function testPropertyMyString() { public function testPropertyMyString()
{
} }
/** /**
* Test attribute "myBoolean" * Test attribute "myBoolean"
*/ */
public function testPropertyMyBoolean() { public function testPropertyMyBoolean()
{
} }
} }

Some files were not shown because too many files have changed in this diff Show More