Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uncaught TypeError: Return value must be of type Saloon\Contracts\Response, Saloon\Http\Response returned #28

Open
Josh5A opened this issue Sep 14, 2024 · 0 comments

Comments

@Josh5A
Copy link

Josh5A commented Sep 14, 2024

Auto generated SDK using the OpenAi yaml at https://github.com/openai/openai-openapi/blob/master/openapi.yaml

Trying to run $connector->models()->listModels(); returns:

PHP Fatal error: Uncaught TypeError: Resource\Models::listModels(): Return value must be of type Saloon\Contracts\Response, Saloon\Http\Response returned

Models resource was generated with:

use Saloon\Contracts\Response;

class Models extends Resource
{
	public function listModels(): Response

ListModels request was generated with:

use Saloon\Enums\Method;
use Saloon\Http\Request;

/**
 * listModels
 */
class ListModels extends Request

Changing Models.php to use Saloon\Http\Response; seems to fix the issue, but is this the correct way to do it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant