Closed DJHunn39 closed 2 years ago
Thanks for the report. I opened a PR in the upstream repository with a fix
The change is now applied to the openapi.yml.
The SDKs may not be immediately released with a fix
Thanks for the quick reaction to this!
SDKs with fixes have been released
Thanks for the report
tl;dr - I can't send multiple localeProjection parameters in a request using the TS SDK because localeProjection is typed as a string instead of an array
According to CommerceTools API documentation:
This means that a valid URI including multiple
localeProjections
would include, for examplelocaleProjection=en-gb&localeProjection=en-us
.However, the openapi.yaml schema for this field dictates that this field must be a string:
From the raw file itself:
I believe this is the cause of an issue in the TypeScript SDK where it's not possible to make a GET request including multiple
localeProjection
query parameters without casting around the type to force it to work, i.e I want to make a get request with 2 localeProjections like so:Right now I can't do this as the type of
localeProjection
must be a string.I believe changing
schema.type
for alllocaleProjection
parameter definitions fromstring
toarray
will resolve the issue.