and*_*abs 7 javascript django rest restful-architecture angularjs
我正在使用Django REST框架.
使用可浏览的API时,单击OPTIONS按钮后,我会看到字段的美妙定义和资源允许的操作,例如下面的此用户资源:
HTTP 200 OK
Content-Type: application/json
Vary: Accept
Allow: GET, PUT, PATCH, DELETE, HEAD, OPTIONS
{
"name": "XSpot User Detail",
"description": "",
"renders": [
"application/json",
"text/html"
],
"parses": [
"application/json",
"application/x-www-form-urlencoded",
"multipart/form-data"
],
"actions": {
"PUT": {
"url": {
"type": "field",
"required": false,
"read_only": true
},
"mail_sent": {
"type": "boolean",
"required": false,
"read_only": false,
"label": "mail sent"
},
"email": {
"type": "email",
"required": true,
"read_only": false,
"label": "email address",
"max_length": 255
}
}
}
}
Run Code Online (Sandbox Code Playgroud)
问题:是否有任何JS框架能够利用此元信息生成表单?
| 归档时间: |
|
| 查看次数: |
1346 次 |
| 最近记录: |