带有嵌套值的WADL请求表示参数(例如foo[bar]=baz)



如何定义具有嵌套值的请求表示参数?

<param name="foo[bar]" required="true" type="xsd:string" style="query" default="baz">

结果"字符串值'foo[bar]'不匹配xs:NMTOKEN模式"

这就是我最终解决它的方法,根据http://support.apigee.com/apigee/topics/how_do_i_define_a_request_representation_with_nested_values_e_g_foo_bar_baz

<request>
  <representation>
    <param name="foo_bar" apigee:paramName="foo[bar]" required="true" type="xsd:string" style="query" default="baz">
  </representation>
</request>

为了在apigee:paramName中使用方括号,您应该像这样使用数字实体:

apigee:paramName="foo&#091;bar&#093;"​

相关内容

最新更新