Skip to content

Commit

Permalink
Added the throw-unexpected-status-code into the jane config file
Browse files Browse the repository at this point in the history
  • Loading branch information
sebprt committed Jan 15, 2024
1 parent 3ce721c commit 9583c6e
Show file tree
Hide file tree
Showing 212 changed files with 1,103 additions and 316 deletions.
1 change: 1 addition & 0 deletions jane/open_api.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@
'directory' => __DIR__ . '/../src/',
'strict' => false,
'use-fixer' => true,
'throw-unexpected-status-code' => true,
];
604 changes: 446 additions & 158 deletions src/Client.php

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion src/Endpoint/AcceptReferralRequestReferralRequestItem.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,12 @@ public function getExtraHeaders(): array
/**
* {@inheritdoc}
*
* @return \Gyroscops\Api\Model\ReferralRequestJsonldReferralRequestRead|\Gyroscops\Api\Model\ReferralRequestReferralRequestRead|null
* @return \Gyroscops\Api\Model\ReferralRequestJsonldReferralRequestRead|\Gyroscops\Api\Model\ReferralRequestReferralRequestRead
*
* @throws \Gyroscops\Api\Exception\AcceptReferralRequestReferralRequestItemBadRequestException
* @throws \Gyroscops\Api\Exception\AcceptReferralRequestReferralRequestItemUnprocessableEntityException
* @throws \Gyroscops\Api\Exception\AcceptReferralRequestReferralRequestItemNotFoundException
* @throws \Gyroscops\Api\Exception\UnexpectedStatusCodeException
*/
protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null)
{
Expand All @@ -84,6 +85,7 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re
if (404 === $status) {
throw new \Gyroscops\Api\Exception\AcceptReferralRequestReferralRequestItemNotFoundException($response);
}
throw new \Gyroscops\Api\Exception\UnexpectedStatusCodeException($status, $body);
}

public function getAuthenticationScopes(): array
Expand Down
2 changes: 2 additions & 0 deletions src/Endpoint/AddAfterPipelineStepPipelineItem.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ public function getExtraHeaders(): array
* @throws \Gyroscops\Api\Exception\AddAfterPipelineStepPipelineItemBadRequestException
* @throws \Gyroscops\Api\Exception\AddAfterPipelineStepPipelineItemUnprocessableEntityException
* @throws \Gyroscops\Api\Exception\AddAfterPipelineStepPipelineItemNotFoundException
* @throws \Gyroscops\Api\Exception\UnexpectedStatusCodeException
*/
protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null)
{
Expand All @@ -94,6 +95,7 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re
if (404 === $status) {
throw new \Gyroscops\Api\Exception\AddAfterPipelineStepPipelineItemNotFoundException($response);
}
throw new \Gyroscops\Api\Exception\UnexpectedStatusCodeException($status, $body);
}

public function getAuthenticationScopes(): array
Expand Down
2 changes: 2 additions & 0 deletions src/Endpoint/AddBeforePipelineStepPipelineItem.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ public function getExtraHeaders(): array
* @throws \Gyroscops\Api\Exception\AddBeforePipelineStepPipelineItemBadRequestException
* @throws \Gyroscops\Api\Exception\AddBeforePipelineStepPipelineItemUnprocessableEntityException
* @throws \Gyroscops\Api\Exception\AddBeforePipelineStepPipelineItemNotFoundException
* @throws \Gyroscops\Api\Exception\UnexpectedStatusCodeException
*/
protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null)
{
Expand All @@ -94,6 +95,7 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re
if (404 === $status) {
throw new \Gyroscops\Api\Exception\AddBeforePipelineStepPipelineItemNotFoundException($response);
}
throw new \Gyroscops\Api\Exception\UnexpectedStatusCodeException($status, $body);
}

public function getAuthenticationScopes(): array
Expand Down
2 changes: 2 additions & 0 deletions src/Endpoint/AddComposerAuthPipelinePipelineItem.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ public function getExtraHeaders(): array
* @throws \Gyroscops\Api\Exception\AddComposerAuthPipelinePipelineItemBadRequestException
* @throws \Gyroscops\Api\Exception\AddComposerAuthPipelinePipelineItemUnprocessableEntityException
* @throws \Gyroscops\Api\Exception\AddComposerAuthPipelinePipelineItemNotFoundException
* @throws \Gyroscops\Api\Exception\UnexpectedStatusCodeException
*/
protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null)
{
Expand All @@ -94,6 +95,7 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re
if (404 === $status) {
throw new \Gyroscops\Api\Exception\AddComposerAuthPipelinePipelineItemNotFoundException($response);
}
throw new \Gyroscops\Api\Exception\UnexpectedStatusCodeException($status, $body);
}

public function getAuthenticationScopes(): array
Expand Down
2 changes: 2 additions & 0 deletions src/Endpoint/AddComposerAutoloadPipelinePipelineItem.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ public function getExtraHeaders(): array
* @throws \Gyroscops\Api\Exception\AddComposerAutoloadPipelinePipelineItemBadRequestException
* @throws \Gyroscops\Api\Exception\AddComposerAutoloadPipelinePipelineItemUnprocessableEntityException
* @throws \Gyroscops\Api\Exception\AddComposerAutoloadPipelinePipelineItemNotFoundException
* @throws \Gyroscops\Api\Exception\UnexpectedStatusCodeException
*/
protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null)
{
Expand All @@ -94,6 +95,7 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re
if (404 === $status) {
throw new \Gyroscops\Api\Exception\AddComposerAutoloadPipelinePipelineItemNotFoundException($response);
}
throw new \Gyroscops\Api\Exception\UnexpectedStatusCodeException($status, $body);
}

public function getAuthenticationScopes(): array
Expand Down
2 changes: 2 additions & 0 deletions src/Endpoint/AddComposerPackagePipelinePipelineItem.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ public function getExtraHeaders(): array
* @throws \Gyroscops\Api\Exception\AddComposerPackagePipelinePipelineItemBadRequestException
* @throws \Gyroscops\Api\Exception\AddComposerPackagePipelinePipelineItemUnprocessableEntityException
* @throws \Gyroscops\Api\Exception\AddComposerPackagePipelinePipelineItemNotFoundException
* @throws \Gyroscops\Api\Exception\UnexpectedStatusCodeException
*/
protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null)
{
Expand All @@ -94,6 +95,7 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re
if (404 === $status) {
throw new \Gyroscops\Api\Exception\AddComposerPackagePipelinePipelineItemNotFoundException($response);
}
throw new \Gyroscops\Api\Exception\UnexpectedStatusCodeException($status, $body);
}

public function getAuthenticationScopes(): array
Expand Down
2 changes: 2 additions & 0 deletions src/Endpoint/AddComposerRepositoryPipelinePipelineItem.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ public function getExtraHeaders(): array
* @throws \Gyroscops\Api\Exception\AddComposerRepositoryPipelinePipelineItemBadRequestException
* @throws \Gyroscops\Api\Exception\AddComposerRepositoryPipelinePipelineItemUnprocessableEntityException
* @throws \Gyroscops\Api\Exception\AddComposerRepositoryPipelinePipelineItemNotFoundException
* @throws \Gyroscops\Api\Exception\UnexpectedStatusCodeException
*/
protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null)
{
Expand All @@ -94,6 +95,7 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re
if (404 === $status) {
throw new \Gyroscops\Api\Exception\AddComposerRepositoryPipelinePipelineItemNotFoundException($response);
}
throw new \Gyroscops\Api\Exception\UnexpectedStatusCodeException($status, $body);
}

public function getAuthenticationScopes(): array
Expand Down
2 changes: 2 additions & 0 deletions src/Endpoint/AddPipelineStepProbePipelineItem.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ public function getExtraHeaders(): array
* @throws \Gyroscops\Api\Exception\AddPipelineStepProbePipelineItemBadRequestException
* @throws \Gyroscops\Api\Exception\AddPipelineStepProbePipelineItemUnprocessableEntityException
* @throws \Gyroscops\Api\Exception\AddPipelineStepProbePipelineItemNotFoundException
* @throws \Gyroscops\Api\Exception\UnexpectedStatusCodeException
*/
protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null)
{
Expand All @@ -94,6 +95,7 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re
if (404 === $status) {
throw new \Gyroscops\Api\Exception\AddPipelineStepProbePipelineItemNotFoundException($response);
}
throw new \Gyroscops\Api\Exception\UnexpectedStatusCodeException($status, $body);
}

public function getAuthenticationScopes(): array
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,12 @@ public function getExtraHeaders(): array
/**
* {@inheritdoc}
*
* @return \Gyroscops\Api\Model\EnvironmentJsonldRead|\Gyroscops\Api\Model\EnvironmentRead|null
* @return \Gyroscops\Api\Model\EnvironmentJsonldRead|\Gyroscops\Api\Model\EnvironmentRead
*
* @throws \Gyroscops\Api\Exception\AddVariablesFromConfigurationEnvironmentItemBadRequestException
* @throws \Gyroscops\Api\Exception\AddVariablesFromConfigurationEnvironmentItemUnprocessableEntityException
* @throws \Gyroscops\Api\Exception\AddVariablesFromConfigurationEnvironmentItemNotFoundException
* @throws \Gyroscops\Api\Exception\UnexpectedStatusCodeException
*/
protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null)
{
Expand All @@ -97,6 +98,7 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re
if (404 === $status) {
throw new \Gyroscops\Api\Exception\AddVariablesFromConfigurationEnvironmentItemNotFoundException($response);
}
throw new \Gyroscops\Api\Exception\UnexpectedStatusCodeException($status, $body);
}

public function getAuthenticationScopes(): array
Expand Down
4 changes: 3 additions & 1 deletion src/Endpoint/AddVariablesFromConstantEnvironmentItem.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,12 @@ public function getExtraHeaders(): array
/**
* {@inheritdoc}
*
* @return \Gyroscops\Api\Model\EnvironmentJsonldRead|\Gyroscops\Api\Model\EnvironmentRead|null
* @return \Gyroscops\Api\Model\EnvironmentJsonldRead|\Gyroscops\Api\Model\EnvironmentRead
*
* @throws \Gyroscops\Api\Exception\AddVariablesFromConstantEnvironmentItemBadRequestException
* @throws \Gyroscops\Api\Exception\AddVariablesFromConstantEnvironmentItemUnprocessableEntityException
* @throws \Gyroscops\Api\Exception\AddVariablesFromConstantEnvironmentItemNotFoundException
* @throws \Gyroscops\Api\Exception\UnexpectedStatusCodeException
*/
protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null)
{
Expand All @@ -94,6 +95,7 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re
if (404 === $status) {
throw new \Gyroscops\Api\Exception\AddVariablesFromConstantEnvironmentItemNotFoundException($response);
}
throw new \Gyroscops\Api\Exception\UnexpectedStatusCodeException($status, $body);
}

public function getAuthenticationScopes(): array
Expand Down
4 changes: 3 additions & 1 deletion src/Endpoint/AddVariablesFromSecretEnvironmentItem.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,12 @@ public function getExtraHeaders(): array
/**
* {@inheritdoc}
*
* @return \Gyroscops\Api\Model\EnvironmentJsonldRead|\Gyroscops\Api\Model\EnvironmentRead|null
* @return \Gyroscops\Api\Model\EnvironmentJsonldRead|\Gyroscops\Api\Model\EnvironmentRead
*
* @throws \Gyroscops\Api\Exception\AddVariablesFromSecretEnvironmentItemBadRequestException
* @throws \Gyroscops\Api\Exception\AddVariablesFromSecretEnvironmentItemUnprocessableEntityException
* @throws \Gyroscops\Api\Exception\AddVariablesFromSecretEnvironmentItemNotFoundException
* @throws \Gyroscops\Api\Exception\UnexpectedStatusCodeException
*/
protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null)
{
Expand All @@ -97,6 +98,7 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re
if (404 === $status) {
throw new \Gyroscops\Api\Exception\AddVariablesFromSecretEnvironmentItemNotFoundException($response);
}
throw new \Gyroscops\Api\Exception\UnexpectedStatusCodeException($status, $body);
}

public function getAuthenticationScopes(): array
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,9 @@ public function getExtraHeaders(): array
/**
* {@inheritdoc}
*
* @return \Gyroscops\Api\Model\OrganizationJsonld|\Gyroscops\Api\Model\Organization|null
* @return \Gyroscops\Api\Model\OrganizationJsonld|\Gyroscops\Api\Model\Organization
*
* @throws \Gyroscops\Api\Exception\UnexpectedStatusCodeException
*/
protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null)
{
Expand All @@ -69,6 +71,7 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re
return $serializer->deserialize($body, 'Gyroscops\\Api\\Model\\Organization', 'json');
}
}
throw new \Gyroscops\Api\Exception\UnexpectedStatusCodeException($status, $body);
}

public function getAuthenticationScopes(): array
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,9 @@ public function getExtraHeaders(): array
/**
* {@inheritdoc}
*
* @return \Gyroscops\Api\Model\UserJsonld|\Gyroscops\Api\Model\User|null
* @return \Gyroscops\Api\Model\UserJsonld|\Gyroscops\Api\Model\User
*
* @throws \Gyroscops\Api\Exception\UnexpectedStatusCodeException
*/
protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null)
{
Expand All @@ -69,6 +71,7 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re
return $serializer->deserialize($body, 'Gyroscops\\Api\\Model\\User', 'json');
}
}
throw new \Gyroscops\Api\Exception\UnexpectedStatusCodeException($status, $body);
}

public function getAuthenticationScopes(): array
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,9 @@ public function getExtraHeaders(): array
/**
* {@inheritdoc}
*
* @return \Gyroscops\Api\Model\WorkspaceJsonld|\Gyroscops\Api\Model\Workspace|null
* @return \Gyroscops\Api\Model\WorkspaceJsonld|\Gyroscops\Api\Model\Workspace
*
* @throws \Gyroscops\Api\Exception\UnexpectedStatusCodeException
*/
protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null)
{
Expand All @@ -69,6 +71,7 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re
return $serializer->deserialize($body, 'Gyroscops\\Api\\Model\\Workspace', 'json');
}
}
throw new \Gyroscops\Api\Exception\UnexpectedStatusCodeException($status, $body);
}

public function getAuthenticationScopes(): array
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,9 @@ public function getExtraHeaders(): array
/**
* {@inheritdoc}
*
* @return \Gyroscops\Api\Model\OrganizationJsonld|\Gyroscops\Api\Model\Organization|null
* @return \Gyroscops\Api\Model\OrganizationJsonld|\Gyroscops\Api\Model\Organization
*
* @throws \Gyroscops\Api\Exception\UnexpectedStatusCodeException
*/
protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null)
{
Expand All @@ -69,6 +71,7 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re
return $serializer->deserialize($body, 'Gyroscops\\Api\\Model\\Organization', 'json');
}
}
throw new \Gyroscops\Api\Exception\UnexpectedStatusCodeException($status, $body);
}

public function getAuthenticationScopes(): array
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,9 @@ public function getExtraHeaders(): array
/**
* {@inheritdoc}
*
* @return \Gyroscops\Api\Model\UserJsonld|\Gyroscops\Api\Model\User|null
* @return \Gyroscops\Api\Model\UserJsonld|\Gyroscops\Api\Model\User
*
* @throws \Gyroscops\Api\Exception\UnexpectedStatusCodeException
*/
protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null)
{
Expand All @@ -69,6 +71,7 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re
return $serializer->deserialize($body, 'Gyroscops\\Api\\Model\\User', 'json');
}
}
throw new \Gyroscops\Api\Exception\UnexpectedStatusCodeException($status, $body);
}

public function getAuthenticationScopes(): array
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,9 @@ public function getExtraHeaders(): array
/**
* {@inheritdoc}
*
* @return \Gyroscops\Api\Model\WorkspaceJsonld|\Gyroscops\Api\Model\Workspace|null
* @return \Gyroscops\Api\Model\WorkspaceJsonld|\Gyroscops\Api\Model\Workspace
*
* @throws \Gyroscops\Api\Exception\UnexpectedStatusCodeException
*/
protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null)
{
Expand All @@ -69,6 +71,7 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re
return $serializer->deserialize($body, 'Gyroscops\\Api\\Model\\Workspace', 'json');
}
}
throw new \Gyroscops\Api\Exception\UnexpectedStatusCodeException($status, $body);
}

public function getAuthenticationScopes(): array
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,9 @@ protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver
/**
* {@inheritdoc}
*
* @return \Gyroscops\Api\Model\EnvironmentEnvironmentsIdVariablesGetLdjsonResponse200|\Gyroscops\Api\Model\VariableRead[]|null
* @return \Gyroscops\Api\Model\EnvironmentEnvironmentsIdVariablesGetLdjsonResponse200|\Gyroscops\Api\Model\VariableRead[]
*
* @throws \Gyroscops\Api\Exception\UnexpectedStatusCodeException
*/
protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null)
{
Expand All @@ -86,6 +88,7 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re
return $serializer->deserialize($body, 'Gyroscops\\Api\\Model\\VariableRead[]', 'json');
}
}
throw new \Gyroscops\Api\Exception\UnexpectedStatusCodeException($status, $body);
}

public function getAuthenticationScopes(): array
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,9 @@ protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver
/**
* {@inheritdoc}
*
* @return \Gyroscops\Api\Model\RuntimeExecutionPipelineJobsIdStepsGetLdjsonResponse200|\Gyroscops\Api\Model\ExecutionPipelineStep[]|null
* @return \Gyroscops\Api\Model\RuntimeExecutionPipelineJobsIdStepsGetLdjsonResponse200|\Gyroscops\Api\Model\ExecutionPipelineStep[]
*
* @throws \Gyroscops\Api\Exception\UnexpectedStatusCodeException
*/
protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null)
{
Expand All @@ -86,6 +88,7 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re
return $serializer->deserialize($body, 'Gyroscops\\Api\\Model\\ExecutionPipelineStep[]', 'json');
}
}
throw new \Gyroscops\Api\Exception\UnexpectedStatusCodeException($status, $body);
}

public function getAuthenticationScopes(): array
Expand Down
Loading

0 comments on commit 9583c6e

Please sign in to comment.