From 83dfdcfef3f2cd2dd305baa7fe9d00455ad3d5e1 Mon Sep 17 00:00:00 2001 From: CyberVitexus Date: Mon, 6 Jan 2025 15:24:15 +0100 Subject: [PATCH] credentials endpoint update --- .github/workflows/main.yml | 2 +- .openapi-generator/FILES | 4 +-- README.md | 2 +- composer.json | 5 +++- lib/App/RegisterRoutes.php | 4 +-- lib/Model/Credential.php | 5 ---- ...e.php => UpdateCredentials201Response.php} | 4 +-- tests/Model/CredentialTest.php | 10 ------- ...p => UpdateCredentials201ResponseTest.php} | 26 +++++++++---------- 9 files changed, 25 insertions(+), 37 deletions(-) rename lib/Model/{GetCredential200Response.php => UpdateCredentials201Response.php} (94%) rename tests/Model/{GetCredential200ResponseTest.php => UpdateCredentials201ResponseTest.php} (68%) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 0d2e24e..feda9a5 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -6,7 +6,7 @@ jobs: strategy: matrix: operating-system: [ubuntu-latest, windows-latest, macos-latest] - php-versions: ['7.4', '8.0', '8.1', '8.2'] + php-versions: ['7.4', '8.0', '8.1'] runs-on: ${{ matrix.operating-system }} steps: - name: Checkout diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index a1c81e1..f0df087 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -21,7 +21,6 @@ lib/Model/Configuration.php lib/Model/Credential.php lib/Model/CredentialType.php lib/Model/Customer.php -lib/Model/GetCredential200Response.php lib/Model/GetCredentialType200Response.php lib/Model/GetTopic200Response.php lib/Model/Job.php @@ -30,6 +29,7 @@ lib/Model/RunTemplate.php lib/Model/Status.php lib/Model/Tag.php lib/Model/Topic.php +lib/Model/UpdateCredentials201Response.php lib/Model/User.php lib/Server/AbstractAppApi.php lib/Server/AbstractCompanyApi.php @@ -58,7 +58,6 @@ tests/Model/ConfigurationTest.php tests/Model/CredentialTest.php tests/Model/CredentialTypeTest.php tests/Model/CustomerTest.php -tests/Model/GetCredential200ResponseTest.php tests/Model/GetCredentialType200ResponseTest.php tests/Model/GetTopic200ResponseTest.php tests/Model/JobTest.php @@ -67,4 +66,5 @@ tests/Model/RunTemplateTest.php tests/Model/StatusTest.php tests/Model/TagTest.php tests/Model/TopicTest.php +tests/Model/UpdateCredentials201ResponseTest.php tests/Model/UserTest.php diff --git a/README.md b/README.md index 42eecb7..2876d53 100644 --- a/README.md +++ b/README.md @@ -204,7 +204,6 @@ Class | Method | HTTP request | Description * MultiFlexi\Api\Model\Credential * MultiFlexi\Api\Model\CredentialType * MultiFlexi\Api\Model\Customer -* MultiFlexi\Api\Model\GetCredential200Response * MultiFlexi\Api\Model\GetCredentialType200Response * MultiFlexi\Api\Model\GetTopic200Response * MultiFlexi\Api\Model\Job @@ -213,6 +212,7 @@ Class | Method | HTTP request | Description * MultiFlexi\Api\Model\Status * MultiFlexi\Api\Model\Tag * MultiFlexi\Api\Model\Topic +* MultiFlexi\Api\Model\UpdateCredentials201Response * MultiFlexi\Api\Model\User diff --git a/composer.json b/composer.json index d8a1ad6..9fe179a 100644 --- a/composer.json +++ b/composer.json @@ -11,12 +11,15 @@ "license": "MIT", "require": { "php": "^7.4 || ^8.0", + "dyorg/slim-token-authentication": "*", + "php-di/slim-bridge": "^3.4", + "slim/psr7": "^1.5", "dyorg/slim-token-authentication": "dev-slim4", + "tuupola/slim-basic-auth": "^3.0", "monolog/monolog": "^2.4", "neomerx/cors-psr7": "^2.0", "php-di/slim-bridge": "^3.2", "slim/psr7": "*", - "tuupola/slim-basic-auth": "^3.0", "ybelenko/openapi-data-mocker": "^1.0", "ybelenko/openapi-data-mocker-server-middleware": "^1.2" }, diff --git a/lib/App/RegisterRoutes.php b/lib/App/RegisterRoutes.php index 16a1319..74f3818 100644 --- a/lib/App/RegisterRoutes.php +++ b/lib/App/RegisterRoutes.php @@ -626,7 +626,7 @@ class RegisterRoutes "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/getCredential_200_response" + "$ref" : "#/components/schemas/Credential" } } } @@ -959,7 +959,7 @@ class RegisterRoutes "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/getCredential_200_response" + "$ref" : "#/components/schemas/updateCredentials_201_response" } } } diff --git a/lib/Model/Credential.php b/lib/Model/Credential.php index ed8cbe4..eae0d58 100644 --- a/lib/Model/Credential.php +++ b/lib/Model/Credential.php @@ -56,11 +56,6 @@ class Credential extends BaseModel "format" : "int64", "example" : 10 }, - "user_id" : { - "type" : "integer", - "format" : "int64", - "example" : 10 - }, "company_id" : { "type" : "integer", "format" : "int64", diff --git a/lib/Model/GetCredential200Response.php b/lib/Model/UpdateCredentials201Response.php similarity index 94% rename from lib/Model/GetCredential200Response.php rename to lib/Model/UpdateCredentials201Response.php index a44c1e9..9c2f24c 100644 --- a/lib/Model/GetCredential200Response.php +++ b/lib/Model/UpdateCredentials201Response.php @@ -30,13 +30,13 @@ use MultiFlexi\Api\BaseModel; /** - * GetCredential200Response. + * UpdateCredentials201Response. * * @author OpenAPI Generator team * * @see https://github.com/openapitools/openapi-generator */ -class GetCredential200Response extends BaseModel +class UpdateCredentials201Response extends BaseModel { /** * @var string Models namespace. diff --git a/tests/Model/CredentialTest.php b/tests/Model/CredentialTest.php index ef9a825..25a6545 100644 --- a/tests/Model/CredentialTest.php +++ b/tests/Model/CredentialTest.php @@ -96,16 +96,6 @@ public function testPropertyId(): void ); } - /** - * Test attribute "userId". - */ - public function testPropertyUserId(): void - { - self::markTestIncomplete( - 'Test of "userId" property in "Credential" model has not been implemented yet.', - ); - } - /** * Test attribute "companyId". */ diff --git a/tests/Model/GetCredential200ResponseTest.php b/tests/Model/UpdateCredentials201ResponseTest.php similarity index 68% rename from tests/Model/GetCredential200ResponseTest.php rename to tests/Model/UpdateCredentials201ResponseTest.php index cdbf8b6..5d14ad3 100644 --- a/tests/Model/GetCredential200ResponseTest.php +++ b/tests/Model/UpdateCredentials201ResponseTest.php @@ -31,15 +31,15 @@ use PHPUnit\Framework\TestCase; /** - * GetCredential200ResponseTest Class Doc Comment. + * UpdateCredentials201ResponseTest Class Doc Comment. * * @author OpenAPI Generator team * * @see https://github.com/openapitools/openapi-generator * - * @coversDefaultClass \MultiFlexi\Api\Model\GetCredential200Response + * @coversDefaultClass \MultiFlexi\Api\Model\UpdateCredentials201Response */ -class GetCredential200ResponseTest extends TestCase +class UpdateCredentials201ResponseTest extends TestCase { /** * Setup before running any test cases. @@ -70,19 +70,19 @@ protected function tearDown(): void } /** - * Test "GetCredential200Response". + * Test "UpdateCredentials201Response". */ - public function testGetCredential200Response(): void + public function testUpdateCredentials201Response(): void { - $testGetCredential200Response = new GetCredential200Response(); - $namespacedClassname = GetCredential200Response::getModelsNamespace().'\\GetCredential200Response'; - $this->assertSame('\\'.GetCredential200Response::class, $namespacedClassname); + $testUpdateCredentials201Response = new UpdateCredentials201Response(); + $namespacedClassname = UpdateCredentials201Response::getModelsNamespace().'\\UpdateCredentials201Response'; + $this->assertSame('\\'.UpdateCredentials201Response::class, $namespacedClassname); $this->assertTrue( class_exists($namespacedClassname), sprintf('Assertion failed that "%s" class exists', $namespacedClassname), ); self::markTestIncomplete( - 'Test of "GetCredential200Response" model has not been implemented yet.', + 'Test of "UpdateCredentials201Response" model has not been implemented yet.', ); } @@ -92,7 +92,7 @@ class_exists($namespacedClassname), public function testPropertyName(): void { self::markTestIncomplete( - 'Test of "name" property in "GetCredential200Response" model has not been implemented yet.', + 'Test of "name" property in "UpdateCredentials201Response" model has not been implemented yet.', ); } @@ -102,7 +102,7 @@ public function testPropertyName(): void public function testPropertyCompanyId(): void { self::markTestIncomplete( - 'Test of "companyId" property in "GetCredential200Response" model has not been implemented yet.', + 'Test of "companyId" property in "UpdateCredentials201Response" model has not been implemented yet.', ); } @@ -112,7 +112,7 @@ public function testPropertyCompanyId(): void public function testPropertyType(): void { self::markTestIncomplete( - 'Test of "type" property in "GetCredential200Response" model has not been implemented yet.', + 'Test of "type" property in "UpdateCredentials201Response" model has not been implemented yet.', ); } @@ -123,7 +123,7 @@ public function testPropertyType(): void */ public function testGetOpenApiSchema(): void { - $schemaArr = GetCredential200Response::getOpenApiSchema(); + $schemaArr = UpdateCredentials201Response::getOpenApiSchema(); $this->assertIsArray($schemaArr); } }