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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
454 changes: 195 additions & 259 deletions codegen/Cms/Blogs/Authors/Api/BlogAuthorsApi.php

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions codegen/Cms/Blogs/Authors/ApiException.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*
* The version of the OpenAPI document: v3
* Generated by: https://openapi-generator.tech
* OpenAPI Generator version: 7.3.0
* Generator version: 7.12.0
*/

/**
Expand Down Expand Up @@ -49,7 +49,7 @@ class ApiException extends Exception
/**
* The HTTP header of the server response.
*
* @var string[]|null
* @var string[][]|null
*/
protected $responseHeaders;

Expand All @@ -65,7 +65,7 @@ class ApiException extends Exception
*
* @param string $message Error message
* @param int $code HTTP status code
* @param string[]|null $responseHeaders HTTP response header
* @param string[][]|null $responseHeaders HTTP response header
* @param \stdClass|string|null $responseBody HTTP decoded body of the server response either as \stdClass or string
*/
public function __construct($message = "", $code = 0, $responseHeaders = [], $responseBody = null)
Expand All @@ -78,7 +78,7 @@ public function __construct($message = "", $code = 0, $responseHeaders = [], $re
/**
* Gets the HTTP response header
*
* @return string[]|null HTTP response header
* @return string[][]|null HTTP response header
*/
public function getResponseHeaders()
{
Expand Down
4 changes: 2 additions & 2 deletions codegen/Cms/Blogs/Authors/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*
* The version of the OpenAPI document: v3
* Generated by: https://openapi-generator.tech
* OpenAPI Generator version: 7.3.0
* Generator version: 7.12.0
*/

/**
Expand Down Expand Up @@ -486,7 +486,7 @@ public function getHostSettings()
* @param array|null $variables hash of variable and the corresponding value (optional)
* @return string URL based on host settings
*/
public static function getHostString(array $hostSettings, $hostIndex, array $variables = null)
public static function getHostString(array $hostSettings, $hostIndex, ?array $variables = null)
{
if (null === $variables) {
$variables = [];
Expand Down
32 changes: 30 additions & 2 deletions codegen/Cms/Blogs/Authors/HeaderSelector.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*
* The version of the OpenAPI document: v3
* Generated by: https://openapi-generator.tech
* OpenAPI Generator version: 7.3.0
* Generator version: 7.12.0
*/

/**
Expand Down Expand Up @@ -85,7 +85,7 @@ private function selectAcceptHeader(array $accept): ?string
}

# If none of the available Accept headers is of type "json", then just use all them
$headersWithJson = preg_grep('~(?i)^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$~', $accept);
$headersWithJson = $this->selectJsonMimeList($accept);
if (count($headersWithJson) === 0) {
return implode(',', $accept);
}
Expand All @@ -95,6 +95,34 @@ private function selectAcceptHeader(array $accept): ?string
return $this->getAcceptHeaderWithAdjustedWeight($accept, $headersWithJson);
}

/**
* Detects whether a string contains a valid JSON mime type
*
* @param string $searchString
* @return bool
*/
public function isJsonMime(string $searchString): bool
{
return preg_match('~^application/(json|[\w!#$&.+-^_]+\+json)\s*(;|$)~', $searchString) === 1;
}

/**
* Select all items from a list containing a JSON mime type
*
* @param array $mimeList
* @return array
*/
private function selectJsonMimeList(array $mimeList): array {
$jsonMimeList = [];
foreach ($mimeList as $mime) {
if($this->isJsonMime($mime)) {
$jsonMimeList[] = $mime;
}
}
return $jsonMimeList;
}


/**
* Create an Accept header string from the given "Accept" headers array, recalculating all weights
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*
* The version of the OpenAPI document: v3
* Generated by: https://openapi-generator.tech
* OpenAPI Generator version: 7.3.0
* Generator version: 7.12.0
*/

/**
Expand Down Expand Up @@ -258,10 +258,10 @@ public function getModelName()
/**
* Constructor
*
* @param mixed[] $data Associated array of property values
* @param mixed[]|null $data Associated array of property values
* initializing the model
*/
public function __construct(array $data = null)
public function __construct(?array $data = null)
{
$this->setIfExists('language', $data ?? [], null);
$this->setIfExists('id', $data ?? [], null);
Expand Down
6 changes: 3 additions & 3 deletions codegen/Cms/Blogs/Authors/Model/BatchInputBlogAuthor.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*
* The version of the OpenAPI document: v3
* Generated by: https://openapi-generator.tech
* OpenAPI Generator version: 7.3.0
* Generator version: 7.12.0
*/

/**
Expand Down Expand Up @@ -240,10 +240,10 @@ public function getModelName()
/**
* Constructor
*
* @param mixed[] $data Associated array of property values
* @param mixed[]|null $data Associated array of property values
* initializing the model
*/
public function __construct(array $data = null)
public function __construct(?array $data = null)
{
$this->setIfExists('inputs', $data ?? [], null);
}
Expand Down
6 changes: 3 additions & 3 deletions codegen/Cms/Blogs/Authors/Model/BatchInputJsonNode.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*
* The version of the OpenAPI document: v3
* Generated by: https://openapi-generator.tech
* OpenAPI Generator version: 7.3.0
* Generator version: 7.12.0
*/

/**
Expand Down Expand Up @@ -240,10 +240,10 @@ public function getModelName()
/**
* Constructor
*
* @param mixed[] $data Associated array of property values
* @param mixed[]|null $data Associated array of property values
* initializing the model
*/
public function __construct(array $data = null)
public function __construct(?array $data = null)
{
$this->setIfExists('inputs', $data ?? [], null);
}
Expand Down
6 changes: 3 additions & 3 deletions codegen/Cms/Blogs/Authors/Model/BatchInputString.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*
* The version of the OpenAPI document: v3
* Generated by: https://openapi-generator.tech
* OpenAPI Generator version: 7.3.0
* Generator version: 7.12.0
*/

/**
Expand Down Expand Up @@ -240,10 +240,10 @@ public function getModelName()
/**
* Constructor
*
* @param mixed[] $data Associated array of property values
* @param mixed[]|null $data Associated array of property values
* initializing the model
*/
public function __construct(array $data = null)
public function __construct(?array $data = null)
{
$this->setIfExists('inputs', $data ?? [], null);
}
Expand Down
6 changes: 3 additions & 3 deletions codegen/Cms/Blogs/Authors/Model/BatchResponseBlogAuthor.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*
* The version of the OpenAPI document: v3
* Generated by: https://openapi-generator.tech
* OpenAPI Generator version: 7.3.0
* Generator version: 7.12.0
*/

/**
Expand Down Expand Up @@ -289,10 +289,10 @@ public function getStatusAllowableValues()
/**
* Constructor
*
* @param mixed[] $data Associated array of property values
* @param mixed[]|null $data Associated array of property values
* initializing the model
*/
public function __construct(array $data = null)
public function __construct(?array $data = null)
{
$this->setIfExists('completed_at', $data ?? [], null);
$this->setIfExists('requested_at', $data ?? [], null);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*
* The version of the OpenAPI document: v3
* Generated by: https://openapi-generator.tech
* OpenAPI Generator version: 7.3.0
* Generator version: 7.12.0
*/

/**
Expand Down Expand Up @@ -301,10 +301,10 @@ public function getStatusAllowableValues()
/**
* Constructor
*
* @param mixed[] $data Associated array of property values
* @param mixed[]|null $data Associated array of property values
* initializing the model
*/
public function __construct(array $data = null)
public function __construct(?array $data = null)
{
$this->setIfExists('completed_at', $data ?? [], null);
$this->setIfExists('num_errors', $data ?? [], null);
Expand Down
6 changes: 3 additions & 3 deletions codegen/Cms/Blogs/Authors/Model/BlogAuthor.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*
* The version of the OpenAPI document: v3
* Generated by: https://openapi-generator.tech
* OpenAPI Generator version: 7.3.0
* Generator version: 7.12.0
*/

/**
Expand Down Expand Up @@ -1855,10 +1855,10 @@ public function getLanguageAllowableValues()
/**
* Constructor
*
* @param mixed[] $data Associated array of property values
* @param mixed[]|null $data Associated array of property values
* initializing the model
*/
public function __construct(array $data = null)
public function __construct(?array $data = null)
{
$this->setIfExists('website', $data ?? [], null);
$this->setIfExists('display_name', $data ?? [], null);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*
* The version of the OpenAPI document: v3
* Generated by: https://openapi-generator.tech
* OpenAPI Generator version: 7.3.0
* Generator version: 7.12.0
*/

/**
Expand Down Expand Up @@ -258,10 +258,10 @@ public function getModelName()
/**
* Constructor
*
* @param mixed[] $data Associated array of property values
* @param mixed[]|null $data Associated array of property values
* initializing the model
*/
public function __construct(array $data = null)
public function __construct(?array $data = null)
{
$this->setIfExists('language', $data ?? [], null);
$this->setIfExists('id', $data ?? [], null);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*
* The version of the OpenAPI document: v3
* Generated by: https://openapi-generator.tech
* OpenAPI Generator version: 7.3.0
* Generator version: 7.12.0
*/

/**
Expand Down Expand Up @@ -252,10 +252,10 @@ public function getModelName()
/**
* Constructor
*
* @param mixed[] $data Associated array of property values
* @param mixed[]|null $data Associated array of property values
* initializing the model
*/
public function __construct(array $data = null)
public function __construct(?array $data = null)
{
$this->setIfExists('total', $data ?? [], null);
$this->setIfExists('paging', $data ?? [], null);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*
* The version of the OpenAPI document: v3
* Generated by: https://openapi-generator.tech
* OpenAPI Generator version: 7.3.0
* Generator version: 7.12.0
*/

/**
Expand Down Expand Up @@ -240,10 +240,10 @@ public function getModelName()
/**
* Constructor
*
* @param mixed[] $data Associated array of property values
* @param mixed[]|null $data Associated array of property values
* initializing the model
*/
public function __construct(array $data = null)
public function __construct(?array $data = null)
{
$this->setIfExists('id', $data ?? [], null);
}
Expand Down
6 changes: 3 additions & 3 deletions codegen/Cms/Blogs/Authors/Model/Error.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*
* The version of the OpenAPI document: v3
* Generated by: https://openapi-generator.tech
* OpenAPI Generator version: 7.3.0
* Generator version: 7.12.0
*/

/**
Expand Down Expand Up @@ -275,10 +275,10 @@ public function getModelName()
/**
* Constructor
*
* @param mixed[] $data Associated array of property values
* @param mixed[]|null $data Associated array of property values
* initializing the model
*/
public function __construct(array $data = null)
public function __construct(?array $data = null)
{
$this->setIfExists('sub_category', $data ?? [], null);
$this->setIfExists('context', $data ?? [], null);
Expand Down
6 changes: 3 additions & 3 deletions codegen/Cms/Blogs/Authors/Model/ErrorDetail.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*
* The version of the OpenAPI document: v3
* Generated by: https://openapi-generator.tech
* OpenAPI Generator version: 7.3.0
* Generator version: 7.12.0
*/

/**
Expand Down Expand Up @@ -263,10 +263,10 @@ public function getModelName()
/**
* Constructor
*
* @param mixed[] $data Associated array of property values
* @param mixed[]|null $data Associated array of property values
* initializing the model
*/
public function __construct(array $data = null)
public function __construct(?array $data = null)
{
$this->setIfExists('sub_category', $data ?? [], null);
$this->setIfExists('code', $data ?? [], null);
Expand Down
6 changes: 3 additions & 3 deletions codegen/Cms/Blogs/Authors/Model/ForwardPaging.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*
* The version of the OpenAPI document: v3
* Generated by: https://openapi-generator.tech
* OpenAPI Generator version: 7.3.0
* Generator version: 7.12.0
*/

/**
Expand Down Expand Up @@ -240,10 +240,10 @@ public function getModelName()
/**
* Constructor
*
* @param mixed[] $data Associated array of property values
* @param mixed[]|null $data Associated array of property values
* initializing the model
*/
public function __construct(array $data = null)
public function __construct(?array $data = null)
{
$this->setIfExists('next', $data ?? [], null);
}
Expand Down
Loading