Skip to content

Commit e325b80

Browse files
fix invalid openAPI spec (#448)
Co-authored-by: Copilot <[email protected]> Co-authored-by: horeaporutiu <[email protected]>
1 parent 98cacb4 commit e325b80

File tree

1 file changed

+119
-0
lines changed

1 file changed

+119
-0
lines changed

packages/generator/spec.json

Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20229,6 +20229,125 @@
2022920229
"$ref": "#/components/schemas/PageType"
2023020230
}
2023120231
}
20232+
},
20233+
"ErrorResponse": {
20234+
"type": "object",
20235+
"description": "Error response structure",
20236+
"properties": {
20237+
"status": {
20238+
"type": "integer",
20239+
"description": "HTTP status code"
20240+
},
20241+
"code": {
20242+
"type": "string",
20243+
"description": "Error code"
20244+
},
20245+
"message": {
20246+
"type": "string",
20247+
"description": "Error message"
20248+
},
20249+
"context": {
20250+
"type": "object",
20251+
"properties": {
20252+
"error": {
20253+
"type": "string",
20254+
"description": "Additional error context"
20255+
}
20256+
}
20257+
}
20258+
}
20259+
}
20260+
},
20261+
"responses": {
20262+
"400": {
20263+
"description": "Bad Request",
20264+
"content": {
20265+
"application/json": {
20266+
"schema": {
20267+
"$ref": "#/components/schemas/ErrorResponse"
20268+
},
20269+
"example": {
20270+
"status": 400,
20271+
"code": "badRequest",
20272+
"message": "Bad request"
20273+
}
20274+
}
20275+
}
20276+
},
20277+
"401": {
20278+
"description": "Unauthorized",
20279+
"content": {
20280+
"application/json": {
20281+
"schema": {
20282+
"$ref": "#/components/schemas/ErrorResponse"
20283+
},
20284+
"example": {
20285+
"status": 401,
20286+
"code": "unauthorized",
20287+
"message": "Unauthorized"
20288+
}
20289+
}
20290+
}
20291+
},
20292+
"403": {
20293+
"description": "Forbidden",
20294+
"content": {
20295+
"application/json": {
20296+
"schema": {
20297+
"$ref": "#/components/schemas/ErrorResponse"
20298+
},
20299+
"example": {
20300+
"status": 403,
20301+
"code": "forbidden",
20302+
"message": "Forbidden"
20303+
}
20304+
}
20305+
}
20306+
},
20307+
"404": {
20308+
"description": "Not Found",
20309+
"content": {
20310+
"application/json": {
20311+
"schema": {
20312+
"$ref": "#/components/schemas/ErrorResponse"
20313+
},
20314+
"example": {
20315+
"status": 404,
20316+
"code": "notFound",
20317+
"message": "Not found"
20318+
}
20319+
}
20320+
}
20321+
},
20322+
"409": {
20323+
"description": "Conflict",
20324+
"content": {
20325+
"application/json": {
20326+
"schema": {
20327+
"$ref": "#/components/schemas/ErrorResponse"
20328+
},
20329+
"example": {
20330+
"status": 409,
20331+
"code": "conflict",
20332+
"message": "Conflict"
20333+
}
20334+
}
20335+
}
20336+
},
20337+
"429": {
20338+
"description": "Too Many Requests",
20339+
"content": {
20340+
"application/json": {
20341+
"schema": {
20342+
"$ref": "#/components/schemas/ErrorResponse"
20343+
},
20344+
"example": {
20345+
"status": 429,
20346+
"code": "tooManyRequests",
20347+
"message": "Too many requests"
20348+
}
20349+
}
20350+
}
2023220351
}
2023320352
},
2023420353
"parameters": {

0 commit comments

Comments
 (0)