Skip to content

Commit

Permalink
fix: set namespace with correct casing (#5)
Browse files Browse the repository at this point in the history
* fix: set namespace with correct casing

Signed-off-by: Cedric Ziel <cedric@cedric-ziel.com>

* fix: set namespaces

* Apply php-cs-fixer changes

---------

Signed-off-by: Cedric Ziel <cedric@cedric-ziel.com>
Co-authored-by: cedricziel <cedricziel@users.noreply.github.com>
  • Loading branch information
cedricziel and cedricziel authored Jul 29, 2024
1 parent f26679d commit a21ab9b
Show file tree
Hide file tree
Showing 3,164 changed files with 24,060 additions and 24,056 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
2 changes: 1 addition & 1 deletion .jane-openapi
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

return [
'openapi-file' => __DIR__ . '/openapi.json',
'namespace' => 'cedricziel\phpbaserowclient\Generated',
'namespace' => 'CedricZiel\Baserow\Generated',
'directory' => __DIR__ . '/generated',
'use-fixer' => true,
];
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

An API client for baserow.io

```shell
composer require cedricziel/baserow
```

## License

Apache 2.0
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"license": "Apache-2.0",
"autoload": {
"psr-4": {
"cedricziel\\phpbaserowclient\\": "src/",
"cedricziel\\phpbaserowclient\\Generated\\": "generated/"
"CedricZiel\\Baserow\\": "src/",
"CedricZiel\\Baserow\\Generated\\": "generated/"
}
},
"authors": [
Expand Down
2 changes: 1 addition & 1 deletion generated/Authentication/JWTAuthentication.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* Do no edit it directly.
*/

namespace cedricziel\phpbaserowclient\Generated\Authentication;
namespace CedricZiel\Baserow\Generated\Authentication;

class JWTAuthentication implements \Jane\Component\OpenApiRuntime\Client\AuthenticationPlugin
{
Expand Down
58 changes: 29 additions & 29 deletions generated/Client.php

Large diffs are not rendered by default.

18 changes: 9 additions & 9 deletions generated/Endpoint/AcceptGroupInvitation.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
* Do no edit it directly.
*/

namespace cedricziel\phpbaserowclient\Generated\Endpoint;
namespace CedricZiel\Baserow\Generated\Endpoint;

class AcceptGroupInvitation extends \cedricziel\phpbaserowclient\Generated\Runtime\Client\BaseEndpoint implements \cedricziel\phpbaserowclient\Generated\Runtime\Client\Endpoint
class AcceptGroupInvitation extends \CedricZiel\Baserow\Generated\Runtime\Client\BaseEndpoint implements \CedricZiel\Baserow\Generated\Runtime\Client\Endpoint
{
use \cedricziel\phpbaserowclient\Generated\Runtime\Client\EndpointTrait;
use \CedricZiel\Baserow\Generated\Runtime\Client\EndpointTrait;
protected $group_invitation_id;

/**
Expand Down Expand Up @@ -50,23 +50,23 @@ public function getExtraHeaders(): array
}

/**
* @return \cedricziel\phpbaserowclient\Generated\Model\WorkspaceUserWorkspace|null
* @return \CedricZiel\Baserow\Generated\Model\WorkspaceUserWorkspace|null
*
* @throws \cedricziel\phpbaserowclient\Generated\Exception\AcceptGroupInvitationBadRequestException
* @throws \cedricziel\phpbaserowclient\Generated\Exception\AcceptGroupInvitationNotFoundException
* @throws \CedricZiel\Baserow\Generated\Exception\AcceptGroupInvitationBadRequestException
* @throws \CedricZiel\Baserow\Generated\Exception\AcceptGroupInvitationNotFoundException
*/
protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null)
{
$status = $response->getStatusCode();
$body = (string) $response->getBody();
if (false === is_null($contentType) && (200 === $status && false !== mb_strpos($contentType, 'application/json'))) {
return $serializer->deserialize($body, 'cedricziel\phpbaserowclient\Generated\Model\WorkspaceUserWorkspace', 'json');
return $serializer->deserialize($body, 'CedricZiel\Baserow\Generated\Model\WorkspaceUserWorkspace', 'json');
}
if (false === is_null($contentType) && (400 === $status && false !== mb_strpos($contentType, 'application/json'))) {
throw new \cedricziel\phpbaserowclient\Generated\Exception\AcceptGroupInvitationBadRequestException($serializer->deserialize($body, 'cedricziel\phpbaserowclient\Generated\Model\ApiGroupsInvitationsGroupInvitationIdAcceptPostResponse400', 'json'), $response);
throw new \CedricZiel\Baserow\Generated\Exception\AcceptGroupInvitationBadRequestException($serializer->deserialize($body, 'CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdAcceptPostResponse400', 'json'), $response);
}
if (false === is_null($contentType) && (404 === $status && false !== mb_strpos($contentType, 'application/json'))) {
throw new \cedricziel\phpbaserowclient\Generated\Exception\AcceptGroupInvitationNotFoundException($serializer->deserialize($body, 'cedricziel\phpbaserowclient\Generated\Model\ApiGroupsInvitationsGroupInvitationIdAcceptPostResponse404', 'json'), $response);
throw new \CedricZiel\Baserow\Generated\Exception\AcceptGroupInvitationNotFoundException($serializer->deserialize($body, 'CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdAcceptPostResponse404', 'json'), $response);
}
}

Expand Down
18 changes: 9 additions & 9 deletions generated/Endpoint/AcceptWorkspaceInvitation.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
* Do no edit it directly.
*/

namespace cedricziel\phpbaserowclient\Generated\Endpoint;
namespace CedricZiel\Baserow\Generated\Endpoint;

class AcceptWorkspaceInvitation extends \cedricziel\phpbaserowclient\Generated\Runtime\Client\BaseEndpoint implements \cedricziel\phpbaserowclient\Generated\Runtime\Client\Endpoint
class AcceptWorkspaceInvitation extends \CedricZiel\Baserow\Generated\Runtime\Client\BaseEndpoint implements \CedricZiel\Baserow\Generated\Runtime\Client\Endpoint
{
use \cedricziel\phpbaserowclient\Generated\Runtime\Client\EndpointTrait;
use \CedricZiel\Baserow\Generated\Runtime\Client\EndpointTrait;
protected $workspace_invitation_id;

/**
Expand Down Expand Up @@ -46,23 +46,23 @@ public function getExtraHeaders(): array
}

/**
* @return \cedricziel\phpbaserowclient\Generated\Model\WorkspaceUserWorkspace|null
* @return \CedricZiel\Baserow\Generated\Model\WorkspaceUserWorkspace|null
*
* @throws \cedricziel\phpbaserowclient\Generated\Exception\AcceptWorkspaceInvitationBadRequestException
* @throws \cedricziel\phpbaserowclient\Generated\Exception\AcceptWorkspaceInvitationNotFoundException
* @throws \CedricZiel\Baserow\Generated\Exception\AcceptWorkspaceInvitationBadRequestException
* @throws \CedricZiel\Baserow\Generated\Exception\AcceptWorkspaceInvitationNotFoundException
*/
protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null)
{
$status = $response->getStatusCode();
$body = (string) $response->getBody();
if (false === is_null($contentType) && (200 === $status && false !== mb_strpos($contentType, 'application/json'))) {
return $serializer->deserialize($body, 'cedricziel\phpbaserowclient\Generated\Model\WorkspaceUserWorkspace', 'json');
return $serializer->deserialize($body, 'CedricZiel\Baserow\Generated\Model\WorkspaceUserWorkspace', 'json');
}
if (false === is_null($contentType) && (400 === $status && false !== mb_strpos($contentType, 'application/json'))) {
throw new \cedricziel\phpbaserowclient\Generated\Exception\AcceptWorkspaceInvitationBadRequestException($serializer->deserialize($body, 'cedricziel\phpbaserowclient\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdAcceptPostResponse400', 'json'), $response);
throw new \CedricZiel\Baserow\Generated\Exception\AcceptWorkspaceInvitationBadRequestException($serializer->deserialize($body, 'CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdAcceptPostResponse400', 'json'), $response);
}
if (false === is_null($contentType) && (404 === $status && false !== mb_strpos($contentType, 'application/json'))) {
throw new \cedricziel\phpbaserowclient\Generated\Exception\AcceptWorkspaceInvitationNotFoundException($serializer->deserialize($body, 'cedricziel\phpbaserowclient\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdAcceptPostResponse404', 'json'), $response);
throw new \CedricZiel\Baserow\Generated\Exception\AcceptWorkspaceInvitationNotFoundException($serializer->deserialize($body, 'CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdAcceptPostResponse404', 'json'), $response);
}
}

Expand Down
18 changes: 9 additions & 9 deletions generated/Endpoint/AdminAddUserToLicense.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
* Do no edit it directly.
*/

namespace cedricziel\phpbaserowclient\Generated\Endpoint;
namespace CedricZiel\Baserow\Generated\Endpoint;

class AdminAddUserToLicense extends \cedricziel\phpbaserowclient\Generated\Runtime\Client\BaseEndpoint implements \cedricziel\phpbaserowclient\Generated\Runtime\Client\Endpoint
class AdminAddUserToLicense extends \CedricZiel\Baserow\Generated\Runtime\Client\BaseEndpoint implements \CedricZiel\Baserow\Generated\Runtime\Client\Endpoint
{
use \cedricziel\phpbaserowclient\Generated\Runtime\Client\EndpointTrait;
use \CedricZiel\Baserow\Generated\Runtime\Client\EndpointTrait;
protected $id;
protected $user_id;

Expand Down Expand Up @@ -49,23 +49,23 @@ public function getExtraHeaders(): array
}

/**
* @return \cedricziel\phpbaserowclient\Generated\Model\LicenseUser|null
* @return \CedricZiel\Baserow\Generated\Model\LicenseUser|null
*
* @throws \cedricziel\phpbaserowclient\Generated\Exception\AdminAddUserToLicenseBadRequestException
* @throws \cedricziel\phpbaserowclient\Generated\Exception\AdminAddUserToLicenseNotFoundException
* @throws \CedricZiel\Baserow\Generated\Exception\AdminAddUserToLicenseBadRequestException
* @throws \CedricZiel\Baserow\Generated\Exception\AdminAddUserToLicenseNotFoundException
*/
protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null)
{
$status = $response->getStatusCode();
$body = (string) $response->getBody();
if (false === is_null($contentType) && (200 === $status && false !== mb_strpos($contentType, 'application/json'))) {
return $serializer->deserialize($body, 'cedricziel\phpbaserowclient\Generated\Model\LicenseUser', 'json');
return $serializer->deserialize($body, 'CedricZiel\Baserow\Generated\Model\LicenseUser', 'json');
}
if (false === is_null($contentType) && (400 === $status && false !== mb_strpos($contentType, 'application/json'))) {
throw new \cedricziel\phpbaserowclient\Generated\Exception\AdminAddUserToLicenseBadRequestException($serializer->deserialize($body, 'cedricziel\phpbaserowclient\Generated\Model\ApiLicensesIdUserIdPostResponse400', 'json'), $response);
throw new \CedricZiel\Baserow\Generated\Exception\AdminAddUserToLicenseBadRequestException($serializer->deserialize($body, 'CedricZiel\Baserow\Generated\Model\ApiLicensesIdUserIdPostResponse400', 'json'), $response);
}
if (false === is_null($contentType) && (404 === $status && false !== mb_strpos($contentType, 'application/json'))) {
throw new \cedricziel\phpbaserowclient\Generated\Exception\AdminAddUserToLicenseNotFoundException($serializer->deserialize($body, 'cedricziel\phpbaserowclient\Generated\Model\ApiLicensesIdUserIdPostResponse404', 'json'), $response);
throw new \CedricZiel\Baserow\Generated\Exception\AdminAddUserToLicenseNotFoundException($serializer->deserialize($body, 'CedricZiel\Baserow\Generated\Model\ApiLicensesIdUserIdPostResponse404', 'json'), $response);
}
}

Expand Down
22 changes: 11 additions & 11 deletions generated/Endpoint/AdminCreateUser.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,18 @@
* Do no edit it directly.
*/

namespace cedricziel\phpbaserowclient\Generated\Endpoint;
namespace CedricZiel\Baserow\Generated\Endpoint;

class AdminCreateUser extends \cedricziel\phpbaserowclient\Generated\Runtime\Client\BaseEndpoint implements \cedricziel\phpbaserowclient\Generated\Runtime\Client\Endpoint
class AdminCreateUser extends \CedricZiel\Baserow\Generated\Runtime\Client\BaseEndpoint implements \CedricZiel\Baserow\Generated\Runtime\Client\Endpoint
{
use \cedricziel\phpbaserowclient\Generated\Runtime\Client\EndpointTrait;
use \CedricZiel\Baserow\Generated\Runtime\Client\EndpointTrait;

/**
* Creates and returns a new user if the requesting user is staff. This works even if new signups are disabled.
*
* This is a **premium** feature.
*/
public function __construct(\cedricziel\phpbaserowclient\Generated\Model\UserAdminCreate $requestBody)
public function __construct(\CedricZiel\Baserow\Generated\Model\UserAdminCreate $requestBody)
{
$this->body = $requestBody;
}
Expand All @@ -36,13 +36,13 @@ public function getUri(): string

public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array
{
if ($this->body instanceof \cedricziel\phpbaserowclient\Generated\Model\UserAdminCreate) {
if ($this->body instanceof \CedricZiel\Baserow\Generated\Model\UserAdminCreate) {
return [['Content-Type' => ['application/json']], $serializer->serialize($this->body, 'json')];
}
if ($this->body instanceof \cedricziel\phpbaserowclient\Generated\Model\UserAdminCreate) {
if ($this->body instanceof \CedricZiel\Baserow\Generated\Model\UserAdminCreate) {
return [['Content-Type' => ['application/x-www-form-urlencoded']], http_build_query($serializer->normalize($this->body, 'json'))];
}
if ($this->body instanceof \cedricziel\phpbaserowclient\Generated\Model\UserAdminCreate) {
if ($this->body instanceof \CedricZiel\Baserow\Generated\Model\UserAdminCreate) {
$bodyBuilder = new \Http\Message\MultipartStream\MultipartStreamBuilder($streamFactory);
$formParameters = $serializer->normalize($this->body, 'json');
foreach ($formParameters as $key => $value) {
Expand All @@ -62,19 +62,19 @@ public function getExtraHeaders(): array
}

/**
* @return \cedricziel\phpbaserowclient\Generated\Model\UserAdminResponse|null
* @return \CedricZiel\Baserow\Generated\Model\UserAdminResponse|null
*
* @throws \cedricziel\phpbaserowclient\Generated\Exception\AdminCreateUserBadRequestException
* @throws \CedricZiel\Baserow\Generated\Exception\AdminCreateUserBadRequestException
*/
protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null)
{
$status = $response->getStatusCode();
$body = (string) $response->getBody();
if (false === is_null($contentType) && (200 === $status && false !== mb_strpos($contentType, 'application/json'))) {
return $serializer->deserialize($body, 'cedricziel\phpbaserowclient\Generated\Model\UserAdminResponse', 'json');
return $serializer->deserialize($body, 'CedricZiel\Baserow\Generated\Model\UserAdminResponse', 'json');
}
if (false === is_null($contentType) && (400 === $status && false !== mb_strpos($contentType, 'application/json'))) {
throw new \cedricziel\phpbaserowclient\Generated\Exception\AdminCreateUserBadRequestException($serializer->deserialize($body, 'cedricziel\phpbaserowclient\Generated\Model\ApiAdminUsersPostResponse400', 'json'), $response);
throw new \CedricZiel\Baserow\Generated\Exception\AdminCreateUserBadRequestException($serializer->deserialize($body, 'CedricZiel\Baserow\Generated\Model\ApiAdminUsersPostResponse400', 'json'), $response);
}
}

Expand Down
14 changes: 7 additions & 7 deletions generated/Endpoint/AdminDashboard.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
* Do no edit it directly.
*/

namespace cedricziel\phpbaserowclient\Generated\Endpoint;
namespace CedricZiel\Baserow\Generated\Endpoint;

class AdminDashboard extends \cedricziel\phpbaserowclient\Generated\Runtime\Client\BaseEndpoint implements \cedricziel\phpbaserowclient\Generated\Runtime\Client\Endpoint
class AdminDashboard extends \CedricZiel\Baserow\Generated\Runtime\Client\BaseEndpoint implements \CedricZiel\Baserow\Generated\Runtime\Client\Endpoint
{
use \cedricziel\phpbaserowclient\Generated\Runtime\Client\EndpointTrait;
use \CedricZiel\Baserow\Generated\Runtime\Client\EndpointTrait;

public function getMethod(): string
{
Expand All @@ -35,19 +35,19 @@ public function getExtraHeaders(): array
}

/**
* @return \cedricziel\phpbaserowclient\Generated\Model\AdminDashboard|null
* @return \CedricZiel\Baserow\Generated\Model\AdminDashboard|null
*
* @throws \cedricziel\phpbaserowclient\Generated\Exception\AdminDashboardUnauthorizedException
* @throws \CedricZiel\Baserow\Generated\Exception\AdminDashboardUnauthorizedException
*/
protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null)
{
$status = $response->getStatusCode();
$body = (string) $response->getBody();
if (false === is_null($contentType) && (200 === $status && false !== mb_strpos($contentType, 'application/json'))) {
return $serializer->deserialize($body, 'cedricziel\phpbaserowclient\Generated\Model\AdminDashboard', 'json');
return $serializer->deserialize($body, 'CedricZiel\Baserow\Generated\Model\AdminDashboard', 'json');
}
if (401 === $status) {
throw new \cedricziel\phpbaserowclient\Generated\Exception\AdminDashboardUnauthorizedException($response);
throw new \CedricZiel\Baserow\Generated\Exception\AdminDashboardUnauthorizedException($response);
}
}

Expand Down
14 changes: 7 additions & 7 deletions generated/Endpoint/AdminDeleteGroup.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
* Do no edit it directly.
*/

namespace cedricziel\phpbaserowclient\Generated\Endpoint;
namespace CedricZiel\Baserow\Generated\Endpoint;

class AdminDeleteGroup extends \cedricziel\phpbaserowclient\Generated\Runtime\Client\BaseEndpoint implements \cedricziel\phpbaserowclient\Generated\Runtime\Client\Endpoint
class AdminDeleteGroup extends \CedricZiel\Baserow\Generated\Runtime\Client\BaseEndpoint implements \CedricZiel\Baserow\Generated\Runtime\Client\Endpoint
{
use \cedricziel\phpbaserowclient\Generated\Runtime\Client\EndpointTrait;
use \CedricZiel\Baserow\Generated\Runtime\Client\EndpointTrait;
protected $group_id;

/**
Expand Down Expand Up @@ -54,8 +54,8 @@ public function getExtraHeaders(): array
/**
* @return null
*
* @throws \cedricziel\phpbaserowclient\Generated\Exception\AdminDeleteGroupBadRequestException
* @throws \cedricziel\phpbaserowclient\Generated\Exception\AdminDeleteGroupUnauthorizedException
* @throws \CedricZiel\Baserow\Generated\Exception\AdminDeleteGroupBadRequestException
* @throws \CedricZiel\Baserow\Generated\Exception\AdminDeleteGroupUnauthorizedException
*/
protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null)
{
Expand All @@ -65,10 +65,10 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re
return null;
}
if (false === is_null($contentType) && (400 === $status && false !== mb_strpos($contentType, 'application/json'))) {
throw new \cedricziel\phpbaserowclient\Generated\Exception\AdminDeleteGroupBadRequestException($serializer->deserialize($body, 'cedricziel\phpbaserowclient\Generated\Model\ApiAdminGroupsGroupIdDeleteResponse400', 'json'), $response);
throw new \CedricZiel\Baserow\Generated\Exception\AdminDeleteGroupBadRequestException($serializer->deserialize($body, 'CedricZiel\Baserow\Generated\Model\ApiAdminGroupsGroupIdDeleteResponse400', 'json'), $response);
}
if (401 === $status) {
throw new \cedricziel\phpbaserowclient\Generated\Exception\AdminDeleteGroupUnauthorizedException($response);
throw new \CedricZiel\Baserow\Generated\Exception\AdminDeleteGroupUnauthorizedException($response);
}
}

Expand Down
Loading

0 comments on commit a21ab9b

Please sign in to comment.