我们可以在x-mediation-script中使用$ ref吗?

问题描述 投票:0回答:1

我将使用x-mediation-script对一些数据进行硬编码。在我想使用$ ref的地方,它将在setPayloadjson中调用。我们可以做到这一点吗?需要任何样品的建议

"x-mediation-script": "mc.setProperty('CONTENT_TYPE', 'application/json');mc.setPayloadJSON('$ref', '#/definitions/out');"

"definitions":{
  "out":{
    "type" : "object",
    "required": ["NAME"],
    "properties": {
      "NAME2": {"type": "string"},
      "NAME3": {"type": "string"},
      "NAME3": {"type": "string"},
      "NAME4": {"type": "string"},

    }
    }
  }
wso2 wso2esb wso2-am wso2dss swagger-editor
1个回答
0
投票

由于以下原因,无法使用$ref从中介脚本中访问大量内容,

© www.soinside.com 2019 - 2024. All rights reserved.