Skip to content

Commit

Permalink
Merge pull request #48 from sunrise-php/release/v2.2.0
Browse files Browse the repository at this point in the history
v2.2.0
  • Loading branch information
fenric authored Nov 1, 2021
2 parents bb63358 + 12b8401 commit 73e08ff
Show file tree
Hide file tree
Showing 5 changed files with 68 additions and 4 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"scripts": {
"test": [
"phpcs",
"XDEBUG_MODE=coverage phpunit --coverage-text"
"XDEBUG_MODE=coverage phpunit --coverage-text --colors=always"
],
"build": [
"phpdoc -d src/ -t phpdoc/",
Expand Down
4 changes: 2 additions & 2 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<?xml version="1.0"?>
<phpunit colors="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd">
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd">
<coverage>
<include>
<directory>./src</directory>
</include>
</coverage>
<testsuites>
<testsuite name="sunrise.http.router.openapi.testSuite">
<testsuite name="sunrise.http.openapi.testSuite">
<directory>./tests/</directory>
</testsuite>
</testsuites>
Expand Down
4 changes: 3 additions & 1 deletion src/Annotation/OpenApi/Schema.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,10 @@
*
* @link https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#schema-object
* @link https://json-schema.org/draft/2019-09/json-schema-validation.html
*
* @final
*/
final class Schema extends AbstractAnnotation implements SchemaInterface, ComponentInterface
class Schema extends AbstractAnnotation implements SchemaInterface, ComponentInterface
{

/**
Expand Down
31 changes: 31 additions & 0 deletions src/Annotation/OpenApi/SchemaArray.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?php declare(strict_types=1);

/**
* It's free open-source software released under the MIT License.
*
* @author Anatoly Fenric <[email protected]>
* @copyright Copyright (c) 2019, Anatoly Fenric
* @license https://github.com/sunrise-php/http-router-openapi/blob/master/LICENSE
* @link https://github.com/sunrise-php/http-router-openapi
*/

namespace Sunrise\Http\Router\OpenApi\Annotation\OpenApi;

/**
* @Annotation
*
* @Target({"ALL"})
*/
final class SchemaArray extends Schema
{

/**
* @var \Sunrise\Http\Router\OpenApi\Annotation\OpenApi\SchemaInterface
*/
public $items;

/**
* @var string
*/
public $type = 'array';
}
31 changes: 31 additions & 0 deletions src/Annotation/OpenApi/SchemaObject.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?php declare(strict_types=1);

/**
* It's free open-source software released under the MIT License.
*
* @author Anatoly Fenric <[email protected]>
* @copyright Copyright (c) 2019, Anatoly Fenric
* @license https://github.com/sunrise-php/http-router-openapi/blob/master/LICENSE
* @link https://github.com/sunrise-php/http-router-openapi
*/

namespace Sunrise\Http\Router\OpenApi\Annotation\OpenApi;

/**
* @Annotation
*
* @Target({"ALL"})
*/
final class SchemaObject extends Schema
{

/**
* @var array<\Sunrise\Http\Router\OpenApi\Annotation\OpenApi\SchemaInterface>
*/
public $properties;

/**
* @var string
*/
public $type = 'object';
}

0 comments on commit 73e08ff

Please sign in to comment.