javaee / jaxb-v2

Other
211 stars 101 forks source link

Add support for XML schema facets and documentation #917

Open glassfishrobot opened 12 years ago

glassfishrobot commented 12 years ago

While working closely with quite a few enterprise customers implementing ESBs/BPMs I realized the quality bar for xml schemas is constantly rising. It is no longer acceptable to have xml schema with no documentation and xsd facets.

One open source implementation supporting xsd facets can be found here: http://www.infosys.tuwien.ac.at/staff/hummer/tools/jaxb-facets.html but unfortunately it is not maintained as part of JAXB.

There are many good reasons to keep on using Java 1st approach for schema generation and it better not be neglected and supply such fundamental capabilities. More relevant links: http://jaxb.java.net/guide/Generating_Schema_that_you_want.html http://java.net/projects/jaxb/lists/users/archive/2007-06/message/36

Environment

all platforms; java se 7

Affected Versions

[2.2.3]

glassfishrobot commented 12 years ago

Reported by yossico

glassfishrobot commented 12 years ago

yaroska said: Hi, yossico,

To start working with your code we neen you to sign Oracle Contributor Agreement (OCA). Here are some links:

FAQ: http://www.oracle.com/technetwork/oca-faq-405384.pdf OCA: http://glassfish.java.net/public/GovernancePolicy.html

Thanks a lot.

glassfishrobot commented 12 years ago

yossico said: Hi Iaroslav,

Just to make it clear, the code i have attached is not mine. It is an open source that is managed through this web site: http://www.infosys.tuwien.ac.at/staff/hummer/tools/jaxb-facets.html. Thus, if this code is planned to be used for this solution, it needs to comply with the license agreement published through that web site (contact: Mr. Waldemar Hummer; email: hummer@infosys.tuwien.ac.at).

glassfishrobot commented 11 years ago

yossico said: Hi,

I signed the form and sent it over a while ago. To what Java release does Oracle plans to accomodate this enhancement?

Thanks, Yossi C.

glassfishrobot commented 11 years ago

yaroska said: Hi, yossico, I will look at this and hope if everything will be OK we will include it to JAXB 2.2.7 release.

glassfishrobot commented 11 years ago

whummer said: Version 1.0 of JAXB-Facets

glassfishrobot commented 11 years ago

whummer said: Hi,

there is a more recent, updated version 1.0 of JAXB-Facets available, which contains some minor bug fixes and API changes. I am attaching the most recent version.

EDIT: do we need to sign the agreement for each uploaded version..?

Thanks, Waldemar H.

glassfishrobot commented 11 years ago

blaise_doughan said: Is JAXB-Facets compatible with Bean Validation (JSR-303)? If not changing it to be would help adoption and make it easier to include in a future version of the JAXB specification.

glassfishrobot commented 11 years ago

pellcorp said: it is not compatible and i would agree changing to use jsr 303 annotations would be a great idea. There is a new github repo for jaxb-facets and we are working on test coverage and refinements. i am using jsr 303 in gwt at work so there is definate synergy there. i am on leave until mid january but would be interested in seeing how easy the Facets and Min Max stuff could be refactored to use equivalent jsr 303 annotations.

only question to ponder is do we use the javax.validation annotations directly?

github is: https://github.com/whummer/jaxb-facets

glassfishrobot commented 11 years ago

pellcorp said: a very relevant forum post has already been made on this topic of jsr 303 compatibility which I was not aware of.

http://java.net/projects/jaxb/lists/dev/archive/2011-01/message/2

so compatibility might not be so easy because jsr 303 does not have the same level of validation as xsd and thus jaxb-facets.

glassfishrobot commented 11 years ago

whummer said: However, we do seek integration with JSR-303 in terms of the facets validation.

The @Facets/@MinOccurs/@MaxOccurs annotations are now annotated with @javax.validation.Constraint(validatedBy=...) and we will provide a custom validator implementation. This way, the Facets validation can be seamlessly integrated into the JSR-303 validation framework.

glassfishrobot commented 11 years ago

yossico said: Hello,

What is the estimated delivery time for this feature? Is there a plan to incorporate this feature to the JAXB specification?

Thanks, Yossi C.

glassfishrobot commented 11 years ago

puce said: +1 for adding this feature and making it compatible to JSR-303 resp. JSR-349 (Bean Validation 1.1)

glassfishrobot commented 11 years ago

schrepfler said: This would be a really great extension as it will fill a large hole on how we document services. It would seem however the latest code is being developed here and not on the whummer repo? https://github.com/pellcorp/jaxb-facets

glassfishrobot commented 11 years ago

tgeor said: In which version are you planning to include this feature? I think this extension is a must have in JAXB

glassfishrobot commented 11 years ago

schrepfler said: Also, would this only track schemagen or xjc as well?

glassfishrobot commented 11 years ago

whummer said: To avoid confusion, the repository we are working on is here:

https://github.com/whummer/jaxb-facets

We have just finished another round of refactoring, and in terms of features we believe that the code is ready for release. How shall we proceed..?

glassfishrobot commented 11 years ago

yossico said: Hello,

Any progress with this issue? What is the target release for this enhancement? When should we expect it?

Your reply to these questions will be greatly appreciated.

Thanks, Yossi C.

glassfishrobot commented 11 years ago

yaroska said: I'm trying to contact the owner of jaxb-facets project. We need all projects' contributors to sign OCA. After that we'll be able to do something.

glassfishrobot commented 10 years ago

yossico said: Hello,

This is a gentle reminder

Do you know by now what is the target release for this enhancement? Release date? Do you continually track bug-fixes/updates from jaxb-facets web site (https://github.com/whummer/jaxb-facets)??)

Thanks, Yossi C.

glassfishrobot commented 10 years ago

sytzevk said: I see that the Java-first approach is (going to be) covered, but what about wsdl-first ? Does the jaxb-facets project aim to support the jaxb java code generation annotated with facets ?

glassfishrobot commented 10 years ago

whummer said: We have added initial support for wsimport in the current release version (2.2.6-facets-1.1.0), which you can check out from github: https://github.com/whummer/jaxb-facets

@Iaroslav, is there any progress concerning the contributor agreements - when can we continue to merge this into the reference impl.? thanks

glassfishrobot commented 10 years ago

schrepfler said: Hi, any updates on progress or when can we expect to see this part of the official jaxb?

glassfishrobot commented 10 years ago

yaroska said: Hi,

We are working on the Bean Validation (JSR 303) support. I hope it will cover requirements of current request.

glassfishrobot commented 10 years ago

schrepfler said: Are you planning to release documentation and facet support at the same time? It might be good to decouple if facet+jsr303/349 will take longer to implement.

glassfishrobot commented 10 years ago

davidkarlsen2 said: BTW: There is a project here which can generate JSR303 annotations from the schemas: https://github.com/krasa/krasa-jaxb-tools if interested.

glassfishrobot commented 9 years ago

schrepfler said: Are we getting any closer to get this merged into the JDK?

glassfishrobot commented 9 years ago

yaroska said: I would not expect this to be implemented in JAXB RI in some visible time. As I know Bean Validation was implemented as part of MOXy JAXB implementation.

glassfishrobot commented 8 years ago

schrepfler said: It's really a shame that Oracle is not taking this contribution, not only because it adds facets support to JAXB but also because it adds Annotation and Documentation as well. The impact would be positive on other things as well, for example the JAXB schemas generated by Jersey would automatically get documentation tags. Please consider this through!

glassfishrobot commented 12 years ago

File: jaxb-facets-0.3.jar Attached By: yossico

glassfishrobot commented 11 years ago

File: jaxb-facets-1.0.jar Attached By: whummer

glassfishrobot commented 12 years ago

Was assigned to yaroska

glassfishrobot commented 7 years ago

This issue was imported from java.net JIRA JAXB-917

schrepfler commented 7 years ago

Nice to see the repo moved to github! @whummer, is there any chance we can rebase https://github.com/whummer/jaxb-facets/ to this repo?

schrepfler commented 6 years ago

@Tomas-Kraus, is there any chance we can get this merged finally, it's a really nice value-add by the community and it's waiting in the limbo for years.