【发布时间】:2018-04-17 08:06:13
【问题描述】:
SPEC 提供下一个示例如何识别架构:
{
"$id": "http://example.com/root.json",
"definitions": {
"B": {
"$id": "other.json",
},
}
}
#/definitions/B
http://example.com/other.json
http://example.com/other.json#
http://example.com/root.json#/definitions/B
但是,如果根架构 root.json 将定义在 /some/path 而不是 / 路径下,如何识别?
{
"$id": "http://example.com/some/path/root.json",
"definitions": {
"B": {
"$id": "other.json",
},
}
}
应该如何识别other.json?
http://example.com/other.json
或:
http://example.com/some/path/other.json
SPEC 的哪一部分对此进行了定义?
【问题讨论】:
-
您的问题能具体一点吗?不清楚你在问什么。
-
@Relequestual:规范提供了
root.json定义在/路径下的示例。如果在/some/path路径下定义了root.json,那么正确的基础http://example.com/或http://example.com/some/path是什么? -
对不起,我还是不清楚你在问什么。你能修改你的问题以显示一个完整的例子吗?我不明白你所说的“定义在”是什么意思,因为它有点模棱两可。
-
@Relequestual: 完成
标签: url uri jsonschema