-
The following snippet from a legacy Swagger JSON schema gives me headaches, I am looking for a quick&dirty workaround to monkeypatch the input schema, so the generated SDK will actually allow me to pass an array to the (thanfully deprecated) endpoint, until the new API (with better schema) is ready... "/products": {
"get": {
"summary": "Returns information about multiple products. At least one search parameter is required.",
"parameters": [
{
"name": "omsIds",
"in": "query",
"description": "Array of OMS IDs of the products to retrieve",
"required": false,
"type": "string" // <-- NOT AN ARRAY TYPE, BUT NEEDS TO BE
}, // resulting type
export type QuerySearchResultViewArgs = {
omsIds?: InputMaybe<Scalars['String']>;
// [...]
}; The old endpoint is replaced by a wrapper which does not support querying with a simple scalar string as So the correct resulting type I want is: // correct with array:
export type QuerySearchResultViewArgs = {
omsIds?: InputMaybe<Array<Scalars['String']>>;
// [...]
}; What's the easiest path to achieve this? Ideas:
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
That's not possible. You should pass the fixed schema. |
Beta Was this translation helpful? Give feedback.
That's not possible. You should pass the fixed schema.