I think I might have found some kind of bug related to QueryParam, but
to make sure, I am posting it here first for input.
Using QueryParam("") MyClass myInput is usually a nice shortcut for
generating a WADL where the fields of MyClass are documented with type
and name. This has worked nicely for any classes composed of simple
fields, such as integers, doubles, Strings, etc, and for complex
Collection-ish fields (such as MyFoo[] foos), the type is not shown in
the WADL.
Today I had a class where one field is complex, and not of a array or
collection type, and to my surprise, the fields of this complex field
were shown. That was new to me! Unfortunately, all the other
parameters (fields of the input object) were _not_ shown. If my
description seems a bit unclear, I pasted the code and resulting wadl
snippet at http://pastebin.com/zqPi7Rfd and below. Is this a bug or a
really weird feature? Using CXF JAX-RS 2.6.2
calculateCurrencyExchange(@QueryParam("") CurrencyExchangeInput input){
...
}
class ExchangeableCurrenciesInput {
private ExchangeType type;
private boolean showExchangeRates;
private boolean showMargins;
private boolean showProxyCurrencies;
...
}
class ExchangeType {
private Long id;
private String name;
private String description;
...
}
<resource path="/getExchangeableCurrencies">
<method name="GET">
<request>
<param name="type.name" style="query" type="xs:string"/>
<param name="type.id" style="query" type="xs:long"/>
<param name="type.description" style="query" type="xs:string"/>
</request>
<response>
<representation mediaType="application/json"/>
</response>
</method>
</resource>
--
Carl-Erik Kopseng
(+47) 40065078
skype: carl.erik.kopseng
blogg: oligofren.wordpress.com
##########################
Ser ikke skogen for bare syntakstrær