【发布时间】:2021-10-27 01:07:27
【问题描述】:
在 RAML 中查询参数的动态调用需要帮助。
在 RAML 中,我想动态调用示例文件夹中的 .raml 文件。 通过查询参数,如果我发送 ?count=2 (例如:https://anypointpoint.mulesoft.com/mocking/api?count=2)然后 2_records.raml 文件在响应中执行 示例文件夹...如果我发送 ?count=3 则 3_records.raml 文件作为响应执行,该文件位于示例文件夹中。
api规范如下,看清楚了:
/retrieveDetails 得到: 查询参数: count: #if query param ?count=2(in mock url) then 2_records.raml 执行。如果查询参数 ?count=3(在模拟 url 中)则 3_records.raml 执行。 enter image description here 类型:字符串 回复: 200: 身体: 应用程序/json 示例:!include Examples/2_records.raml
并附上截图方便理解。
【问题讨论】:
标签: mule mule-studio dataweave mulesoft raml-1.0