【发布时间】:2019-11-05 11:56:35
【问题描述】:
我将使用 x-mediation-script 对一些数据进行硬编码。我想在哪里使用将在 setPayloadjson 中调用的 $ref。这有可能我们可以做到吗?需要任何样品的建议
"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"},
}
}
}
【问题讨论】:
-
swagger中的定义是一个payload对象,需要提供参数。为什么要在脚本中使用定义本身?
标签: wso2 wso2esb wso2-am wso2dss swagger-editor