โค้ด: เลือกทั้งหมด
{
"title": "Profile",
"type": "object",
"properties": {
"firstName": {
"type": "string"
},
"lastName": {
"type": "string"
},
"age": {
"description": "Age in years",
"type": "integer",
"minimum": 0
}
},
"required": ["firstName", "lastName"]
}
type : กำหนดประเภท
properties : กำหนดค่าประเภทของข้อมูล และค่าต่ำสุด สูงสุด ที่จะใช้ได้ไฟล์ JSON
minimum : กำหนดค่าต่ำสุด
description : อธิบายรายละเอียด
required : การเรียกค่าที่ต้องการ