Hi Johannes

I've looked through various messages and pull requests.

One approach was to insert incomplete schema fragments into wadl:param with the implicit understanding it was meant to create BeanVal parameters and I felt quite uncomfortable about pursuing that particular path.

The last idea we were trying to narrow upon was using a separate XML schema grammar which would be used to create Bean validation if a bean validation flag is set. This is a bit more WADL friendly but again it does not look to me like a solution which says "this is to support the bean validation" for parameters and I'm finding it difficult to see how it will work both ways.

I'd to revisit these 2 proposals

1. have a CXF WADL extension, ex, cxfrs:beanValidation. This will be in wadl:param and will be optimized around supporting all whatever is needed to generate BeanVal annotations and represent any BeanVal in the Java to WADL case. This works both ways and IMHO simpler and cleaner, instead of trying to 'carry' the bean validation info via XML schema fragments, with all the limitations which seems ultimately wrong to me. cxfrs:beanValidation will be of course only recognized by a CXF wadl-to-java tool but I feel this approach will have more chances to act getting more support via other provider's tool extensions than the pseudo XML schema approach which is in fact would be equally CXF specific.

2. Do not do anything at all but have wadl:param refer to XML complex types. As I said earlier, this will require the use of ParamConverterProvider which will have a chance to validate the beans. These beans will already have BeanVal annotations in them. This also works both ways - on the WADLToJava side you'd just add these bean classes to a JAXBContext for the JAXB schema gen to add the relevant schema definitions.

My preference is option 1).

We can discuss the options next week too,

Thanks, Sergey

On 06/11/16 22:25, Sergey Beryozkin wrote:
Hi Johannes

Can you please briefly summarize the proposed changes to WADLGen &
SourceGen ? There've been many emails and I recall I thought more work
was needed to keep both approaches in sync. Right now I see WADLGen has
some explicit BeanVal dependencies. I def remember objecting to this
particular approach.
So how this can be generalized, be WADL friendly, and work both ways ?

Sergey
On 06/11/16 21:59, J. Fiala wrote:
Hi Sergey,

OK, I agree 100%, it would be great to have some progress with the PR
here if you have time for it.

Best regards,
Johannes


Am 06.11.2016 um 22:58 schrieb Sergey Beryozkin:
Hi Johannes

I'd say the WADL-related updates should be limited to WADLGen/SourceGen

Cheers, Sergey
On 06/11/16 21:46, J. Fiala wrote:
Hi Sergey,

I can ask him or simply do a fork of the complete project and then
cover
it under the Apache license provided the author agrees with this.

Do you think further BeanValidation extensions for CXF should also go
there and I should subclass the WadlGenerator/SourceGenerator? Or shall
we merge this at the Hackathon at ApacheCon maybe?

Best regards,
Johannes


Am 06.11.2016 um 22:40 schrieb Sergey Beryozkin:
Hi Johannes

Would it make sense asking the author to give you the commit rights to
the project ?
IMHO it can't go to the CXF master though perhaps an option of opening
a CXF sub-project is viable which will need to be discussed on the CXF
dev list. Whether it will stay where it is now or end up as a CXF
project, you'd have to support and release it, so I'm not sure what
difference would it make if it ended up being a CXF sub-project given
it already has a home...

Thanks, Sergey


On 06/11/16 19:32, Johannes Fiala wrote:
Hi there,

The JAXB annotation plugin provided by krasa
(https://github.com/krasa/krasa-jaxb-tools) is no longer supported,
does
it make sense to contact the author to merge this into CXF master?

Maybe we could also get the BeanValidation for parameters working
(https://github.com/apache/cxf/pull/146/files) to improve the overall
BeanValidation experience.

Is anybody interested in putting this on the agenda for the
hackathon?

Best regards,
Johannes










--
Sergey Beryozkin

Talend Community Coders
http://coders.talend.com/

Reply via email to