Search code examples
xmlwadlapigee

WADL request representation parameter with nested values (e.g. foo[bar]=baz)


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"


Solution

  • 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>