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
// generated/swaggerPetstore.tsexportconstdeleteOrder=<TData=AxiosResponse<unknown>>(orderId: number|undefined|null,// ✅ orderId is optionaloptions?: AxiosRequestConfig): Promise<TData>=>{returnaxios.delete(`/store/order/${orderId}`,options);};exportconstfindPetsByTags=<TData=AxiosResponse<Pet[]>>(params: FindPetsByTagsParams,// ❌ params is not optionaloptions?: AxiosRequestConfig): Promise<TData>=>{returnaxios.get(`/pet/findByTags`,{
...options,params: { ...params, ...options?.params},});};exportconstupdateUser=<TData=AxiosResponse<unknown>>(username: string|undefined|null,user: User,// ❌ user is not optionaloptions?: AxiosRequestConfig): Promise<TData>=>{returnaxios.put(`/user/${username}`,user,options);};
My guess is that params of type Object (and Array?) are not handled correctly.
What versions are you using?
Operating System: Windows
Package Version: 6.27.1
Browser Version: n/a
The text was updated successfully, but these errors were encountered:
The query can't be enabled without those params, because they are path params (they go into URL like /v${version}/pets/${petId}
For us it doesn't make sense to be passing null or undefined values in there, so this is the reason for this feature to exist.
To fix this issue you can rename allParamsOptional to allPathParamsOptional and/or update documentation.
For other stuff it doesn't make sense to make them optional. Your swagger schema should define which properties are required, and which are optional. If it doesn't match reality - fix the BE to generate correct schema for your FE.
If you really need it - please create a separate flag, because this one isn't it.
Hopefully I remembered everything correctly, but feel free to double check.
What are the steps to reproduce this issue?
What happens?
Not all params are optional.
What were you expecting to happen?
All params are optional.
Any logs, error output, etc?
No
Any other comments?
Generated output
My guess is that params of type Object (and Array?) are not handled correctly.
What versions are you using?
Operating System: Windows
Package Version: 6.27.1
Browser Version: n/a
The text was updated successfully, but these errors were encountered: