Skip to content
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 2 additions & 2 deletions .github/workflows/diff-spec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ jobs:
run: rm -rf generated && vendor/bin/jane-openapi generate --config-file=.jane-openapi.php

- name: Rector
run: vendor/bin/rector
run: tools/bin/rector

- name: Code style
run: ./vendor/bin/php-cs-fixer fix
run: ./tools/bin/php-cs-fixer fix

- name: Create Pull Request
uses: peter-evans/create-pull-request@v8
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/vendor
composer.lock
vendor
/composer.lock
.php-cs-fixer.cache
phpunit.xml
.phpunit.result.cache
3 changes: 2 additions & 1 deletion .jane-openapi.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
<?php

return [
'openapi-file' => 'https://developers.yousign.com/openapi/6797ad02b552bd002410c61a',
'openapi-file' => 'https://developers.youtrust.com/openapi/public-api-v3.json',
'namespace' => 'Qdequippe\Yousign\Api',
'directory' => __DIR__ . '/generated/',
'reference' => true,
'strict' => false,
'clean-generated' => true,
'use-fixer' => true,
'fixer-config-file' => __DIR__ . '/.php-cs-fixer.php',
'allow-external-refs' => true,
];
21 changes: 0 additions & 21 deletions Makefile

This file was deleted.

23 changes: 19 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,11 @@
}
},
"require": {
"php": ">= 8.1",
"php": ">= 8.2",
"jane-php/open-api-runtime": "^7.6"
},
"require-dev": {
"jane-php/open-api-3": "^7.6",
"friendsofphp/php-cs-fixer": "^3.56",
"rector/rector": "^1.0 || ^2.0"
"jane-php/open-api-3": "^7.6"
},
"config": {
"allow-plugins": {
Expand All @@ -32,5 +30,22 @@
"symfony": {
"allow-contrib": "true"
}
},
"scripts": {
"generate": "jane open-api generate --config-file=jane-config.php",
"cs": "tools/bin/php-cs-fixer fix",
"rector": "tools/bin/rector",
"jane": "jane-openapi generate --config-file=.jane-openapi.php",
"build": [
"@jane",
"@rector",
"@cs"
]
},
"scripts-descriptions": {
"cs": "Fix code style",
"rector": "Run Rector",
"jane": "Generate the SDK",
"build": "Generate the SDK, then run Rector and fix code style"
}
}
5,030 changes: 4,020 additions & 1,010 deletions generated/Client.php

Large diffs are not rendered by default.

111 changes: 0 additions & 111 deletions generated/Endpoint/CreateIdDocumentVerification.php

This file was deleted.

18 changes: 12 additions & 6 deletions generated/Endpoint/DeleteContactsContactId.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@
use Psr\Http\Message\ResponseInterface;
use Qdequippe\Yousign\Api\Exception\DeleteContactsContactIdForbiddenException;
use Qdequippe\Yousign\Api\Exception\DeleteContactsContactIdInternalServerErrorException;
use Qdequippe\Yousign\Api\Exception\DeleteContactsContactIdMethodNotAllowedException;
use Qdequippe\Yousign\Api\Exception\DeleteContactsContactIdNotFoundException;
use Qdequippe\Yousign\Api\Exception\DeleteContactsContactIdTooManyRequestsException;
use Qdequippe\Yousign\Api\Exception\DeleteContactsContactIdUnauthorizedException;
use Qdequippe\Yousign\Api\Model\ForbiddenResponse;
use Qdequippe\Yousign\Api\Model\InternalServerError;
use Qdequippe\Yousign\Api\Model\MethodNotAllowed;
use Qdequippe\Yousign\Api\Model\NotFoundResponse;
use Qdequippe\Yousign\Api\Model\TooManyRequestsResponse;
use Qdequippe\Yousign\Api\Model\UnauthorizedResponse;
Expand Down Expand Up @@ -38,7 +40,7 @@ public function getMethod(): string

public function getUri(): string
{
return str_replace(['{contactId}'], [$this->contactId], '/contacts/{contactId}');
return str_replace(['{contactId}'], [rawurlencode($this->contactId)], '/contacts/{contactId}');
}

public function getBody(SerializerInterface $serializer, $streamFactory = null): array
Expand All @@ -55,6 +57,7 @@ public function getExtraHeaders(): array
* @throws DeleteContactsContactIdUnauthorizedException
* @throws DeleteContactsContactIdForbiddenException
* @throws DeleteContactsContactIdNotFoundException
* @throws DeleteContactsContactIdMethodNotAllowedException
* @throws DeleteContactsContactIdTooManyRequestsException
* @throws DeleteContactsContactIdInternalServerErrorException
*/
Expand All @@ -65,19 +68,22 @@ protected function transformResponseBody(ResponseInterface $response, Serializer
if (204 === $status) {
return null;
}
if (null !== $contentType && (401 === $status && false !== mb_strpos($contentType, 'application/json'))) {
if ((null === $contentType) === false && (401 === $status && false !== stripos(strtolower($contentType), 'application/json'))) {
throw new DeleteContactsContactIdUnauthorizedException($serializer->deserialize($body, UnauthorizedResponse::class, 'json'), $response);
}
if (null !== $contentType && (403 === $status && false !== mb_strpos($contentType, 'application/json'))) {
if ((null === $contentType) === false && (403 === $status && false !== stripos(strtolower($contentType), 'application/json'))) {
throw new DeleteContactsContactIdForbiddenException($serializer->deserialize($body, ForbiddenResponse::class, 'json'), $response);
}
if (null !== $contentType && (404 === $status && false !== mb_strpos($contentType, 'application/json'))) {
if ((null === $contentType) === false && (404 === $status && false !== stripos(strtolower($contentType), 'application/json'))) {
throw new DeleteContactsContactIdNotFoundException($serializer->deserialize($body, NotFoundResponse::class, 'json'), $response);
}
if (null !== $contentType && (429 === $status && false !== mb_strpos($contentType, 'application/json'))) {
if ((null === $contentType) === false && (405 === $status && false !== stripos(strtolower($contentType), 'application/json'))) {
throw new DeleteContactsContactIdMethodNotAllowedException($serializer->deserialize($body, MethodNotAllowed::class, 'json'), $response);
}
if ((null === $contentType) === false && (429 === $status && false !== stripos(strtolower($contentType), 'application/json'))) {
throw new DeleteContactsContactIdTooManyRequestsException($serializer->deserialize($body, TooManyRequestsResponse::class, 'json'), $response);
}
if (null !== $contentType && (500 === $status && false !== mb_strpos($contentType, 'application/json'))) {
if ((null === $contentType) === false && (500 === $status && false !== stripos(strtolower($contentType), 'application/json'))) {
throw new DeleteContactsContactIdInternalServerErrorException($serializer->deserialize($body, InternalServerError::class, 'json'), $response);
}

Expand Down
20 changes: 13 additions & 7 deletions generated/Endpoint/DeleteCustomExperience.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,14 @@
use Qdequippe\Yousign\Api\Exception\DeleteCustomExperienceBadRequestException;
use Qdequippe\Yousign\Api\Exception\DeleteCustomExperienceForbiddenException;
use Qdequippe\Yousign\Api\Exception\DeleteCustomExperienceInternalServerErrorException;
use Qdequippe\Yousign\Api\Exception\DeleteCustomExperienceMethodNotAllowedException;
use Qdequippe\Yousign\Api\Exception\DeleteCustomExperienceNotFoundException;
use Qdequippe\Yousign\Api\Exception\DeleteCustomExperienceTooManyRequestsException;
use Qdequippe\Yousign\Api\Exception\DeleteCustomExperienceUnauthorizedException;
use Qdequippe\Yousign\Api\Model\BadRequestResponse;
use Qdequippe\Yousign\Api\Model\ForbiddenResponse;
use Qdequippe\Yousign\Api\Model\InternalServerError;
use Qdequippe\Yousign\Api\Model\MethodNotAllowed;
use Qdequippe\Yousign\Api\Model\NotFoundResponse;
use Qdequippe\Yousign\Api\Model\TooManyRequestsResponse;
use Qdequippe\Yousign\Api\Model\UnauthorizedResponse;
Expand Down Expand Up @@ -40,7 +42,7 @@ public function getMethod(): string

public function getUri(): string
{
return str_replace(['{customExperienceId}'], [$this->customExperienceId], '/custom_experiences/{customExperienceId}');
return str_replace(['{customExperienceId}'], [rawurlencode($this->customExperienceId)], '/custom_experiences/{customExperienceId}');
}

public function getBody(SerializerInterface $serializer, $streamFactory = null): array
Expand All @@ -58,6 +60,7 @@ public function getExtraHeaders(): array
* @throws DeleteCustomExperienceUnauthorizedException
* @throws DeleteCustomExperienceForbiddenException
* @throws DeleteCustomExperienceNotFoundException
* @throws DeleteCustomExperienceMethodNotAllowedException
* @throws DeleteCustomExperienceTooManyRequestsException
* @throws DeleteCustomExperienceInternalServerErrorException
*/
Expand All @@ -68,22 +71,25 @@ protected function transformResponseBody(ResponseInterface $response, Serializer
if (204 === $status) {
return null;
}
if (null !== $contentType && (400 === $status && false !== mb_strpos($contentType, 'application/json'))) {
if ((null === $contentType) === false && (400 === $status && false !== stripos(strtolower($contentType), 'application/json'))) {
throw new DeleteCustomExperienceBadRequestException($serializer->deserialize($body, BadRequestResponse::class, 'json'), $response);
}
if (null !== $contentType && (401 === $status && false !== mb_strpos($contentType, 'application/json'))) {
if ((null === $contentType) === false && (401 === $status && false !== stripos(strtolower($contentType), 'application/json'))) {
throw new DeleteCustomExperienceUnauthorizedException($serializer->deserialize($body, UnauthorizedResponse::class, 'json'), $response);
}
if (null !== $contentType && (403 === $status && false !== mb_strpos($contentType, 'application/json'))) {
if ((null === $contentType) === false && (403 === $status && false !== stripos(strtolower($contentType), 'application/json'))) {
throw new DeleteCustomExperienceForbiddenException($serializer->deserialize($body, ForbiddenResponse::class, 'json'), $response);
}
if (null !== $contentType && (404 === $status && false !== mb_strpos($contentType, 'application/json'))) {
if ((null === $contentType) === false && (404 === $status && false !== stripos(strtolower($contentType), 'application/json'))) {
throw new DeleteCustomExperienceNotFoundException($serializer->deserialize($body, NotFoundResponse::class, 'json'), $response);
}
if (null !== $contentType && (429 === $status && false !== mb_strpos($contentType, 'application/json'))) {
if ((null === $contentType) === false && (405 === $status && false !== stripos(strtolower($contentType), 'application/json'))) {
throw new DeleteCustomExperienceMethodNotAllowedException($serializer->deserialize($body, MethodNotAllowed::class, 'json'), $response);
}
if ((null === $contentType) === false && (429 === $status && false !== stripos(strtolower($contentType), 'application/json'))) {
throw new DeleteCustomExperienceTooManyRequestsException($serializer->deserialize($body, TooManyRequestsResponse::class, 'json'), $response);
}
if (null !== $contentType && (500 === $status && false !== mb_strpos($contentType, 'application/json'))) {
if ((null === $contentType) === false && (500 === $status && false !== stripos(strtolower($contentType), 'application/json'))) {
throw new DeleteCustomExperienceInternalServerErrorException($serializer->deserialize($body, InternalServerError::class, 'json'), $response);
}

Expand Down
Loading
Loading