Hi Andriy,

Thanks for the reply.

1) Generated Java classes from XSD

XSD is a purely custom one. We generate Java classes from the XSD using the
cxf xjc plugin.Is there anybway to customize the xjc plugin ( by extending
or implementing a Java class specific to xjc or something) so that I can
code to add the annotation on the generated classes. I wanna add @ApiModel
on each model class and @ApiModelProperty on each property of  a model
class. As u said, Swagger will be able to use the POJOs without the need
for annotations. But in order to describe each property( a one-liner about
each property) in the swagger UI, adding @ApiModelProperty is necessary I
believe. Please correct me if I am wrong.Or could you tell me any approach
where we can read java docs using the documentation tags of the XSD and
show it in Swagger UI?Any other ideas you have will also be of much help to
me.

2) Generated REST API classes from WADL.

Actually I am trying to use Cxf based "Swagger2Feature" class which is
generating the Swagger UI. But the problem is we have defined 2 cxf server
endpoints in our code and the Swagger UI is displaying APIs corresponding
to only one server endpoint at any point of time. Could you please provide
inputs on how to resolve this issue?

Please provide me any reference links or examples for converting WADL to
OpenAPI and about the Swagger Codegen library. So that I can try this
option too if it will work in the case of multiple cxf server endpoints as
well.

Thanks,
Aishwarya S

On Fri, 7 Sep 2018, 8:30 am Aishwarya S, <[email protected]> wrote:

>
> On Fri, 7 Sep 2018, 8:29 am Aishwarya S, <[email protected]>
> wrote:
>
>>
>>
>> On Fri, 7 Sep 2018, 7:01 am Andriy Redko, <[email protected]> wrote:
>>
>>> Hi,
>>>
>>> I am not aware of such plugins but here are some thoughts regarding your
>>> use cases.
>>>
>>> asgc> 1. Generated Java classes from XSD
>>>
>>> Not sure if it is possible. In general, Swagger is able to use POJOs
>>> without
>>> the need to add annotations explicitly. Is it some kind of well-known /
>>> standardized
>>> XSD schema? Or purely custom one?
>>>
>>> asgc> 2. Generated REST API classes from WADL.
>>>
>>> In general, Swagger-based integrations do not need annotations and could
>>> discover the
>>> APIs just from the JAX-RS annotations (though the amount of details
>>> would be limited).
>>> Another option could be to convert WADL to OpenAPI 2.x / 3.x (there are
>>> tools to do that)
>>> and use Swagger Codegen to generate classes (they will be annotated).
>>>
>>> Best Regards,
>>>     Andriy Redko
>>>
>>> asgc> Hi,
>>>
>>> asgc> I am trying to find a way to add Swagger annotations like
>>> @ApiOperation, @ApiModel and @ApiModelProperty to
>>>
>>> asgc> 1. Generated Java classes from XSD
>>> asgc> 2. Generated REST API classes from WADL.
>>>
>>> asgc> Is there any way to do it in CXF using the XJC or codegen plugin?
>>> Please help
>>>
>>>

Reply via email to