You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<?php
declare(strict_types=1);
/*
* This file was generated by docler-labs/api-client-generator.
*
* Do not edit it manually.
*/
namespace Group\SomeApiClient\Request;
use Group\SomeApiClient\Schema\ResourceTypeEnum;
class GetResourceRequest implements RequestInterface
{
private string $contentType = '';
public function __construct(private readonly ResourceTypeEnum $resourceType)
{
}
public function getContentType(): string
{
return $this->contentType;
}
public function getMethod(): string
{
return 'GET';
}
public function getRoute(): string
{
return strtr('v1/{resource-type}/resource', ['{resource-type}' => $this->resourceType]);
}
public function getQueryParameters(): array
{
return [];
}
public function getRawQueryParameters(): array
{
return [];
}
public function getCookies(): array
{
return [];
}
public function getHeaders(): array
{
return [];
}
public function getBody()
{
return null;
}
}
The text was updated successfully, but these errors were encountered:
Hello. I'm having trouble using enums as path parameters.
The issue arises when making a request.
Error:
As far I can tell the problem is that the
strtr
function cannot accept enum value as an argumentExample schema
client generation parameters
Generated request
The text was updated successfully, but these errors were encountered: