0

我收到错误消息:

Cannot generate mapping template because model schema is missing a 'type' or '$ref' property` when trying to define an integration response

我已经"type"定义了。

我的模型架构是:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "title": "Configuration",
  "properties": {
    "steps": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "ordinal": {
            "type": "integer"
          },
          "rules": {
            "type": "array",
            "items": {
              "properties": {
                "ordinal": {
                  "type": "integer"
                },
                "rId": {
                  "type": "integer"
                },
                "rMId": {
                  "type": "integer"
                },
                "rValue": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    }
  }
}
4

2 回答 2

1

我认为错误是抛出,因为你错过typerules. 如果你添加它,它应该是好的。

于 2015-10-15T17:40:05.493 回答
1

看起来你错过了一个#/properties/steps/items/properties/rules/items

我建议使用definitions使架构更具可读性。这样更容易注意到这样的小问题。

于 2015-10-15T19:17:44.843 回答