From bca5999b4bbb7db934c717414a50b17dd9edd99f Mon Sep 17 00:00:00 2001 From: Christoph Kappestein Date: Sat, 13 Jul 2024 02:18:00 +0200 Subject: [PATCH] implement configuration aware interface --- src/Generator/Spec/ApiAbstract.php | 3 +-- src/Generator/Spec/OpenAPI.php | 4 +++- src/Generator/Spec/TypeAPI.php | 5 +++-- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/Generator/Spec/ApiAbstract.php b/src/Generator/Spec/ApiAbstract.php index 3f885e1e..5da8172b 100644 --- a/src/Generator/Spec/ApiAbstract.php +++ b/src/Generator/Spec/ApiAbstract.php @@ -20,7 +20,6 @@ namespace PSX\Api\Generator\Spec; -use PSX\Api\Generator\ConfigurationAwareInterface; use PSX\Api\GeneratorInterface; /** @@ -28,7 +27,7 @@ * @license http://www.apache.org/licenses/LICENSE-2.0 * @link https://phpsx.org */ -abstract class ApiAbstract implements GeneratorInterface, ConfigurationAwareInterface +abstract class ApiAbstract implements GeneratorInterface { public const FLOW_AUTHORIZATION_CODE = 0; public const FLOW_IMPLICIT = 1; diff --git a/src/Generator/Spec/OpenAPI.php b/src/Generator/Spec/OpenAPI.php index 6e38bfd3..68d8941d 100644 --- a/src/Generator/Spec/OpenAPI.php +++ b/src/Generator/Spec/OpenAPI.php @@ -20,6 +20,7 @@ namespace PSX\Api\Generator\Spec; +use PSX\Api\Generator\ConfigurationAwareInterface; use PSX\Api\Generator\ConfigurationTrait; use PSX\Api\Operation\Argument; use PSX\Api\OperationInterface; @@ -62,11 +63,12 @@ /** * Generates an OpenAPI 3.0 representation of an API resource * + * @see https://www.openapis.org/ * @author Christoph Kappestein * @license http://www.apache.org/licenses/LICENSE-2.0 * @link https://phpsx.org */ -class OpenAPI extends ApiAbstract +class OpenAPI extends ApiAbstract implements ConfigurationAwareInterface { use ConfigurationTrait; diff --git a/src/Generator/Spec/TypeAPI.php b/src/Generator/Spec/TypeAPI.php index d30a0c0c..a9786f8b 100644 --- a/src/Generator/Spec/TypeAPI.php +++ b/src/Generator/Spec/TypeAPI.php @@ -20,6 +20,7 @@ namespace PSX\Api\Generator\Spec; +use PSX\Api\Generator\ConfigurationAwareInterface; use PSX\Api\Generator\ConfigurationTrait; use PSX\Api\GeneratorInterface; use PSX\Api\SecurityInterface; @@ -32,12 +33,12 @@ /** * TypeAPI * - * @see https://typeschema.org/ + * @see https://typeapi.org/ * @author Christoph Kappestein * @license http://www.apache.org/licenses/LICENSE-2.0 * @link https://phpsx.org */ -class TypeAPI implements GeneratorInterface +class TypeAPI implements GeneratorInterface, ConfigurationAwareInterface { use ConfigurationTrait;