Pregunta

How can I define a request representation parameter that has a nested value?

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

Results in "string value 'foo[bar]' does not match pattern for xs:NMTOKEN"

¿Fue útil?

Solución

This is how I ended up solving it, per 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>

Otros consejos

In order to use a square bracket in an apigee:paramName, you should use the numeric entity like so:

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

Otherwise the brackets may not appear correctly.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top