Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v2.2.0 #48

Merged
merged 4 commits into from
Nov 1, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 <anatoly@fenric.ru>
* @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 <anatoly@fenric.ru>
* @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';
}