Hi Aishwarya,

Sounds great, thank you. Regarding 201, AFAIK this is a Swagger limitation, I 
remember fighting it back in the days.
You need to specify the right code on @ApiOperation level, f.e.:

@ApiOperation(
    value = "Create new user record",
    code = 201,
    consumes = "application/json",
    produces = "application/json",
    ...
  )

Hope it helps :-)
Thanks!

Best Regards,
    Andriy Redko

asgc> Sure, will contribute to this feature when I find time. But I am not a 
registered member of apache.org.

asgc> I have one more question. Is it possible to customize Response Codes in 
cxf-Swagger? I mean for example, for a
asgc> POST request, the response code in my case should be 201(CREATED). I am 
able to add it using @ApiResponses, but it
asgc> seems Swagger uses 200 as a default response code for all APIs.I don't 
wanna use default response codes. 
asgc> Is it possible to set a flag somewhere saying "useDefaultResponseCodes" 
to false.

asgc> Thanks,
asgc> Aishwarya S


asgc> On 2018/09/29 00:06:34, Andriy Redko <[email protected]> wrote: 
>> Hi Aishwarya,


>> I have just received the update from our guys, you can see comments here 
>> https://issues.apache.org/jira/browse/CXF-6757,
>> to conclude the work has not been started in this direction, only good 
>> ideas. We may not have time to work on it
>> right now, but it is certainly included into backlog. If you feel like 
>> contributing this feature, it would be very
>> welcomed. Thank you.

>> Best Regards,
>>     Andriy Redko


>> asgc> Hi Andriy,

>> asgc> Okay. Any idea on how long it will take to enable customizations. If 
>> its gonna take a lot of time and effort, we
>> asgc> will think of alternative approaches. Else we'll wait for the release.





Reply via email to