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
When using createClient from 'openapi-fetch' for endpoint calls, it provides the correct types for the endpoint being called and complains if parameters are missing. But it does not complain if excess parameters are sent.
Expected behavior:
Actual behavior:
Any extra parameter can be added at any nested level. And it is treated as expected.
The issue appears to be caused by the arbitrary [key: string] addition in the InitParam.
Is this the intended behavior for the package, or would it be preferable to enforce stricter type safety for the endpoint calls?
Reproduction
This is just out of the box usage with the api.
Expected result
Expected behavior would be to complain about excess parameters that are not expected by the api types.
openapi-fetch version
0.13.5
Description
When using createClient from 'openapi-fetch' for endpoint calls, it provides the correct types for the endpoint being called and complains if parameters are missing. But it does not complain if excess parameters are sent.
Expected behavior:

Actual behavior:

Any extra parameter can be added at any nested level. And it is treated as expected.
The issue appears to be caused by the arbitrary [key: string] addition in the InitParam.

Is this the intended behavior for the package, or would it be preferable to enforce stricter type safety for the endpoint calls?
Reproduction
This is just out of the box usage with the api.
Expected result
Expected behavior would be to complain about excess parameters that are not expected by the api types.

Extra
The text was updated successfully, but these errors were encountered: