【发布时间】:2019-01-09 19:10:52
【问题描述】:
spring-data-rest 生成的 JSON 模式不包含“对象”类型的属性定义。
我正在尝试使用生成的架构来使用制服材料/AutoForm 自动创建表单。它需要这些对象属性的定义才能正确创建表单。
curl localhost:8080/api/profile/agentContactRecords -H
"Accept:application/schema+json"
我希望上述架构请求的输出是
...
"Agent Business Lines" : {
"title" : "Agent business lines",
"type" : "array",
"items" : {
"type" : "object",
"properties": {
"Business Line": {
"type": "string",
"title": "The Business line Schema"
},
"Agent Name": {
"type": "string",
"title": "The Agent name Schema"
}
}
}
},
"Agent" : {
"title" : "Agent",
"type" : "object",
"properties": {
"Agent Number": {
"type": "string",
"title": "The Agent number Schema"
}
}
},
...
但我得到以下内容
...
"Agent Business Lines" : {
"title" : "Agent business lines",
"readOnly" : false,
"type" : "array",
"items" : {
"type" : "object"
}
},
"Agent" : {
"title" : "Agent",
"readOnly" : false,
"type" : "object"
},
...
【问题讨论】:
-
好的。这听起来像是特定库的问题。我建议您在该库的相应问题跟踪器中记录问题。
-
我投票结束这个问题,因为它是对特定库或实现的附加功能请求
标签: spring-data-rest jsonschema