Skip to content

Commit 5c1ca00

Browse files
maartenpaauwclaude
authored andcommitted
chore(jane): Rebuild the generated client with JanePHP 7.14
CI regenerates the SDK with the latest JanePHP (currently 7.14.0) and fails on any diff. Running `composer update` + `jane-openapi generate` picks up JanePHP 7.14, which reworks parts of the Runtime layer (FormEncoder/JsonPayload/JsonObject, additional-properties handling), drops CustomQueryResolver, and adds an `applyServerPlugins` flag to `Client::create()` that installs php-http host/path plugins from the OpenAPI server definition. `ClientFactory` already installs `AddSlackPathAndHostPlugin`, so it now opts out of those generated server plugins: their `AddPathPlugin` skips the `/api` prefix for the `api.test` endpoint (its path already starts with `/api`), which broke `ApiTest`. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CXAVNUu5y3nHkfzq2TdNfX
1 parent 901b622 commit 5c1ca00

426 files changed

Lines changed: 2809 additions & 1107 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎CHANGELOG.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
## Unreleased
44

55
* Upgrade JanePHP generated code
6+
* Opt out of the JanePHP-generated server plugins in `ClientFactory` so the `api.test` endpoint keeps its `/api` path prefix
67
* **Specification override** Add the missing `team_id` argument to the `usergroups.users.list` endpoint
78

89
## 4.9.0 (2026-03-10)

‎generated/Client.php‎

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3916,26 +3916,28 @@ public function workflowsUpdateStep(array $formParameters = [], array $headerPar
39163916
return $this->executeEndpoint(new Endpoint\WorkflowsUpdateStep($formParameters, $headerParameters), $fetch);
39173917
}
39183918

3919-
public static function create($httpClient = null, array $additionalPlugins = [], array $additionalNormalizers = [])
3919+
public static function create($httpClient = null, array $additionalPlugins = [], array $additionalNormalizers = [], bool $applyServerPlugins = true)
39203920
{
3921+
$plugins = [];
39213922
if (null === $httpClient) {
39223923
$httpClient = \Http\Discovery\Psr18ClientDiscovery::find();
3923-
$plugins = [];
3924+
}
3925+
if ($applyServerPlugins) {
39243926
$uri = \Http\Discovery\Psr17FactoryDiscovery::findUriFactory()->createUri('https://slack.com/api');
39253927
$plugins[] = new \Http\Client\Common\Plugin\AddHostPlugin($uri);
39263928
$plugins[] = new \Http\Client\Common\Plugin\AddPathPlugin($uri);
3927-
if (\count($additionalPlugins) > 0) {
3928-
$plugins = array_merge($plugins, $additionalPlugins);
3929-
}
3930-
$httpClient = new \Http\Client\Common\PluginClient($httpClient, $plugins);
39313929
}
3930+
if (\count($additionalPlugins) > 0) {
3931+
$plugins = array_merge($plugins, $additionalPlugins);
3932+
}
3933+
$httpClient = new \Http\Client\Common\PluginClient($httpClient, $plugins);
39323934
$requestFactory = \Http\Discovery\Psr17FactoryDiscovery::findRequestFactory();
39333935
$streamFactory = \Http\Discovery\Psr17FactoryDiscovery::findStreamFactory();
39343936
$normalizers = [new \Symfony\Component\Serializer\Normalizer\ArrayDenormalizer(), new Normalizer\JaneObjectNormalizer()];
39353937
if (\count($additionalNormalizers) > 0) {
39363938
$normalizers = array_merge($normalizers, $additionalNormalizers);
39373939
}
3938-
$serializer = new \Symfony\Component\Serializer\Serializer($normalizers, [new \Symfony\Component\Serializer\Encoder\JsonEncoder(new \Symfony\Component\Serializer\Encoder\JsonEncode(), new \Symfony\Component\Serializer\Encoder\JsonDecode(['json_decode_associative' => true]))]);
3940+
$serializer = new \Symfony\Component\Serializer\Serializer($normalizers, [new \Symfony\Component\Serializer\Encoder\JsonEncoder(new \Symfony\Component\Serializer\Encoder\JsonEncode(), new \Symfony\Component\Serializer\Encoder\JsonDecode(['json_decode_associative' => true])), new Runtime\Client\FormEncoder()]);
39393941

39403942
return new static($httpClient, $requestFactory, $serializer, $streamFactory);
39413943
}

‎generated/Endpoint/PinsList.php‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,11 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re
7676
$status = $response->getStatusCode();
7777
$body = (string) $response->getBody();
7878
if (200 === $status) {
79-
return json_decode($body);
79+
try {
80+
return json_decode($body, false, 512, \JSON_THROW_ON_ERROR);
81+
} catch (\JsonException $jsonException) {
82+
throw new \Jane\Component\JsonSchemaRuntime\Exception\MalformedJsonException('Malformed JSON response body.', 0, $jsonException);
83+
}
8084
}
8185

8286
return $serializer->deserialize($body, 'JoliCode\Slack\Api\Model\PinsListGetResponsedefault', 'json');

‎generated/Endpoint/ReactionsGet.php‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,11 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re
8484
$status = $response->getStatusCode();
8585
$body = (string) $response->getBody();
8686
if (200 === $status) {
87-
return json_decode($body);
87+
try {
88+
return json_decode($body, false, 512, \JSON_THROW_ON_ERROR);
89+
} catch (\JsonException $jsonException) {
90+
throw new \Jane\Component\JsonSchemaRuntime\Exception\MalformedJsonException('Malformed JSON response body.', 0, $jsonException);
91+
}
8892
}
8993

9094
return $serializer->deserialize($body, 'JoliCode\Slack\Api\Model\ReactionsGetGetResponsedefault', 'json');

‎generated/Endpoint/UsersIdentity.php‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,11 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re
7474
$status = $response->getStatusCode();
7575
$body = (string) $response->getBody();
7676
if (200 === $status) {
77-
return json_decode($body);
77+
try {
78+
return json_decode($body, false, 512, \JSON_THROW_ON_ERROR);
79+
} catch (\JsonException $jsonException) {
80+
throw new \Jane\Component\JsonSchemaRuntime\Exception\MalformedJsonException('Malformed JSON response body.', 0, $jsonException);
81+
}
7882
}
7983

8084
return $serializer->deserialize($body, 'JoliCode\Slack\Api\Model\UsersIdentityGetResponsedefault', 'json');

‎generated/Model/AdminAppsApprovePostResponse200.php‎

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,12 @@
1313

1414
namespace JoliCode\Slack\Api\Model;
1515

16-
class AdminAppsApprovePostResponse200 extends \ArrayObject
16+
use JoliCode\Slack\Api\Runtime\AdditionalAndPatternProperties;
17+
use JoliCode\Slack\Api\Runtime\AdditionalPropertiesInterface;
18+
19+
class AdminAppsApprovePostResponse200 implements AdditionalPropertiesInterface
1720
{
21+
use AdditionalAndPatternProperties;
1822
/**
1923
* @var array
2024
*/
@@ -41,4 +45,9 @@ public function setOk(?bool $ok): self
4145

4246
return $this;
4347
}
48+
49+
public function definedProperties(): array
50+
{
51+
return ['ok' => ['ok', 'getOk', 'setOk']];
52+
}
4453
}

‎generated/Model/AdminAppsApprovePostResponsedefault.php‎

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,12 @@
1313

1414
namespace JoliCode\Slack\Api\Model;
1515

16-
class AdminAppsApprovePostResponsedefault extends \ArrayObject
16+
use JoliCode\Slack\Api\Runtime\AdditionalAndPatternProperties;
17+
use JoliCode\Slack\Api\Runtime\AdditionalPropertiesInterface;
18+
19+
class AdminAppsApprovePostResponsedefault implements AdditionalPropertiesInterface
1720
{
21+
use AdditionalAndPatternProperties;
1822
/**
1923
* @var array
2024
*/
@@ -41,4 +45,9 @@ public function setOk(?bool $ok): self
4145

4246
return $this;
4347
}
48+
49+
public function definedProperties(): array
50+
{
51+
return ['ok' => ['ok', 'getOk', 'setOk']];
52+
}
4453
}

‎generated/Model/AdminAppsApprovedListGetResponse200.php‎

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,12 @@
1313

1414
namespace JoliCode\Slack\Api\Model;
1515

16-
class AdminAppsApprovedListGetResponse200 extends \ArrayObject
16+
use JoliCode\Slack\Api\Runtime\AdditionalAndPatternProperties;
17+
use JoliCode\Slack\Api\Runtime\AdditionalPropertiesInterface;
18+
19+
class AdminAppsApprovedListGetResponse200 implements AdditionalPropertiesInterface
1720
{
21+
use AdditionalAndPatternProperties;
1822
/**
1923
* @var array
2024
*/
@@ -41,4 +45,9 @@ public function setOk(?bool $ok): self
4145

4246
return $this;
4347
}
48+
49+
public function definedProperties(): array
50+
{
51+
return ['ok' => ['ok', 'getOk', 'setOk']];
52+
}
4453
}

‎generated/Model/AdminAppsApprovedListGetResponsedefault.php‎

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,12 @@
1313

1414
namespace JoliCode\Slack\Api\Model;
1515

16-
class AdminAppsApprovedListGetResponsedefault extends \ArrayObject
16+
use JoliCode\Slack\Api\Runtime\AdditionalAndPatternProperties;
17+
use JoliCode\Slack\Api\Runtime\AdditionalPropertiesInterface;
18+
19+
class AdminAppsApprovedListGetResponsedefault implements AdditionalPropertiesInterface
1720
{
21+
use AdditionalAndPatternProperties;
1822
/**
1923
* @var array
2024
*/
@@ -41,4 +45,9 @@ public function setOk(?bool $ok): self
4145

4246
return $this;
4347
}
48+
49+
public function definedProperties(): array
50+
{
51+
return ['ok' => ['ok', 'getOk', 'setOk']];
52+
}
4453
}

‎generated/Model/AdminAppsRequestsListGetResponse200.php‎

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,12 @@
1313

1414
namespace JoliCode\Slack\Api\Model;
1515

16-
class AdminAppsRequestsListGetResponse200 extends \ArrayObject
16+
use JoliCode\Slack\Api\Runtime\AdditionalAndPatternProperties;
17+
use JoliCode\Slack\Api\Runtime\AdditionalPropertiesInterface;
18+
19+
class AdminAppsRequestsListGetResponse200 implements AdditionalPropertiesInterface
1720
{
21+
use AdditionalAndPatternProperties;
1822
/**
1923
* @var array
2024
*/
@@ -41,4 +45,9 @@ public function setOk(?bool $ok): self
4145

4246
return $this;
4347
}
48+
49+
public function definedProperties(): array
50+
{
51+
return ['ok' => ['ok', 'getOk', 'setOk']];
52+
}
4453
}

0 commit comments

Comments
 (0)