Open wxdave opened 5 years ago
<con:resource name="/resource-path" path="/" id="...">
<con:settings/>
<con:parameters>
<con:parameter required="true">
<con:name>foo</con:name>
<con:style>QUERY</con:style>
<con:description>the foo query parameter</con:description>
<con:value>foovalue</con:value>
</con:parameter>
</con:parameters>
...
as defined by schema
<xsd:complexType name="RestResource">
<xsd:complexContent>
<xsd:extension base="tns:ModelItem">
<xsd:sequence>
<xsd:element name="parameters" type="tns:RestParameters">
</xsd:element>
<xsd:element name="request" type="tns:OldRestRequest"
maxOccurs="unbounded" minOccurs="0">
</xsd:element>
<xsd:element name="resource" type="tns:RestResource"
maxOccurs="unbounded" minOccurs="0">
</xsd:element>
<xsd:element name="method" type="tns:RestMethod"
maxOccurs="unbounded" minOccurs="0"></xsd:element>
</xsd:sequence>
<xsd:attribute name="path" type="xsd:string"></xsd:attribute>
<xsd:attribute name="wadlId" type="xsd:string"></xsd:attribute>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
Example swagger given below. The goal is to read the value
foovalue
specified for thedefault
parameter offoo
, assumingdefault
is in a logical location.This would require some magic in
AbstractSwagger1XImporter.groovy
, assuming complex types (object) would need to be handled in some way. (see line 119 in the below image).The result is that the query parameter's value is populated for all requests (swagger paths) that reference the parameter, as shown below.