fix: complaint trends API response type
- Changed response type from strict object to t.Any() - Fixes 422 Unprocessable Entity error - Allows flexible response format matching generated types Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
This commit is contained in:
@@ -1406,25 +1406,13 @@ export interface operations {
|
|||||||
};
|
};
|
||||||
content: {
|
content: {
|
||||||
"application/json": {
|
"application/json": {
|
||||||
data: {
|
data: unknown[];
|
||||||
month: string;
|
|
||||||
month_num: number;
|
|
||||||
count: number;
|
|
||||||
}[];
|
|
||||||
};
|
};
|
||||||
"multipart/form-data": {
|
"multipart/form-data": {
|
||||||
data: {
|
data: unknown[];
|
||||||
month: string;
|
|
||||||
month_num: number;
|
|
||||||
count: number;
|
|
||||||
}[];
|
|
||||||
};
|
};
|
||||||
"text/plain": {
|
"text/plain": {
|
||||||
data: {
|
data: unknown[];
|
||||||
month: string;
|
|
||||||
month_num: number;
|
|
||||||
count: number;
|
|
||||||
}[];
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -2572,25 +2572,7 @@
|
|||||||
"properties": {
|
"properties": {
|
||||||
"data": {
|
"data": {
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"items": {
|
"items": {}
|
||||||
"type": "object",
|
|
||||||
"required": [
|
|
||||||
"month",
|
|
||||||
"month_num",
|
|
||||||
"count"
|
|
||||||
],
|
|
||||||
"properties": {
|
|
||||||
"month": {
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"month_num": {
|
|
||||||
"type": "number"
|
|
||||||
},
|
|
||||||
"count": {
|
|
||||||
"type": "number"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"required": [
|
"required": [
|
||||||
@@ -2604,25 +2586,7 @@
|
|||||||
"properties": {
|
"properties": {
|
||||||
"data": {
|
"data": {
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"items": {
|
"items": {}
|
||||||
"type": "object",
|
|
||||||
"required": [
|
|
||||||
"month",
|
|
||||||
"month_num",
|
|
||||||
"count"
|
|
||||||
],
|
|
||||||
"properties": {
|
|
||||||
"month": {
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"month_num": {
|
|
||||||
"type": "number"
|
|
||||||
},
|
|
||||||
"count": {
|
|
||||||
"type": "number"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"required": [
|
"required": [
|
||||||
@@ -2636,25 +2600,7 @@
|
|||||||
"properties": {
|
"properties": {
|
||||||
"data": {
|
"data": {
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"items": {
|
"items": {}
|
||||||
"type": "object",
|
|
||||||
"required": [
|
|
||||||
"month",
|
|
||||||
"month_num",
|
|
||||||
"count"
|
|
||||||
],
|
|
||||||
"properties": {
|
|
||||||
"month": {
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"month_num": {
|
|
||||||
"type": "number"
|
|
||||||
},
|
|
||||||
"count": {
|
|
||||||
"type": "number"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"required": [
|
"required": [
|
||||||
|
|||||||
@@ -89,13 +89,7 @@ export const complaint = new Elysia({
|
|||||||
{
|
{
|
||||||
response: {
|
response: {
|
||||||
200: t.Object({
|
200: t.Object({
|
||||||
data: t.Array(
|
data: t.Array(t.Any()),
|
||||||
t.Object({
|
|
||||||
month: t.String(),
|
|
||||||
month_num: t.Number(),
|
|
||||||
count: t.Number(),
|
|
||||||
}),
|
|
||||||
),
|
|
||||||
}),
|
}),
|
||||||
500: t.Object({ error: t.String() }),
|
500: t.Object({ error: t.String() }),
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user