ত্রুটি প্রতিক্রিয়া Schema
মধ্যম JSON Schema
কাঠামোগত ত্রুটি বিবরণ সহ API ত্রুটি প্রতিক্রিয়া যাচাই করার জন্য একটি JSON Schema। আপনার প্রজেক্ট বা পরীক্ষার জন্য একটি বাস্তবসম্মত উদাহরণ।
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "ErrorResponse",
"type": "object",
"properties": {
"status": { "const": "error" },
"error": {
"type": "object",
"properties": {
"code": { "type": "string" },
"message": { "type": "string" },
"details": {
"type": "array",
"items": {
"type": "object",
"properties": {
"field": { "type": "string" },
"message": { "type": "string" }
}
}
}
},
"required": ["code", "message"]
},
"requestId": { "type": "string" }
},
"required": ["status", "error"]
} টুলে খুলুন
সম্পর্কিত টুল
আরও উদাহরণ
- schema
- error
- api