On Tue, 21 Jun 2016 12:15:38 GMT, zunkree wrote:
On Mon, 20 Jun 2016 17:26:28 GMT, Sönke Ludwig wrote:
Currently there is no way, but we could do something like specializing
@bodyParamwith an empty field name:@bodyParam("app", "") App postApps(App app);It would then error out of there are other body parameters and otherwise would write the contents directly into the response body.
Great, but I'm not sure that the
@bodyParam("app", "")is a good idea because{ "": "value" }is valid JSON object. Maybe
@bodyParam("app")will be better in this case. What do you think?
Yeah, you are probably right. I was thinking about using a default parameter for the second one when writing ("app", ""), but a separate overload with a distinct return value is a better idea.