Comments (7)
Hi,
As far as I know, bean validations supports only @past and @future, so @DecimalMin should not be generated. I will fix that. (ETA 10 hours)
It would be nice to implement some custom annotation. Pull requests are welcomed :)
from krasa-jaxb-tools.
I think the way of the custom annotation is inevitable as I stumbled upon another problem with xs:choice:
<xs:complexType name="DrinkType">
<xs:sequence>
<xs:choice>
<xs:element ref="Tea"/>
<xs:element ref="Coffee"/>
</xs:choice>
</xs:sequence>
</xs:complexType>
which generates:
public class DrinkType {
@NotNull Tea tea;
@NotNull Coffee coffee;
}
I think something like this would be better:
@Choice({"tea", "coffee"})
public class DrinkType {
Tea tea;
Coffee coffee;
}
Xavier
from krasa-jaxb-tools.
Date is fixed in 0.5-SNAPSHOT
from krasa-jaxb-tools.
Fixing the choice will be very hard.
from krasa-jaxb-tools.
so @NotNull at choices is fixed.
from krasa-jaxb-tools.
Do you see any solution on the @Choice-issue? Btw, I think this issue should have been split into two issues.
from krasa-jaxb-tools.
Well I do not have solution, but I think it should be possible. I have even seen some ugly way how to find out what is defined as choice....
Contributions are welcomed.
And you are right, I will split it.
from krasa-jaxb-tools.
Related Issues (20)
- Plugin crashes with NPE at fields with final static (fixed value) HOT 3
- minExclusive=0, fractionDigits=2 wrong annotation HOT 1
- Krasa - JAXB : Wrong @Digit validation attribute with totalDigits & fractionDigits (XSD) HOT 16
- xs:enumeration is not translated correctly to annotations HOT 8
- Exception thrown if XSD union is used HOT 4
- XReplacePrimitives not converting doubles and floats
- Pattern Validation for enums. At the moment Krasa supports only String type for Patterns HOT 2
- Plugin throws RTE on XReplacePrimitives for serialVersionUID HOT 2
- Tagged releases HOT 1
- Do not use @Pattern.List for multiple patterns
- Further support for krasa-jaxb-tools HOT 1
- Bug in @Digits annotations HOT 1
- Multiple Patterns with own base-restriction-simpletype is ignored HOT 1
- Attributes don't seem to be annotated unless they have a minOccurs > 0 HOT 1
- 1.7 branch release HOT 1
- @Size for ArrayList/Collections/Maps
- Traversing super classes in loop iterates over wrong variable
- Enumeration pattern is not escaped HOT 2
- Wrong integral digits in Digit-Annotation in combination of totalDigits and fractionDigits in XSD HOT 1
- Is the plugin executable from cmd line without need of maven? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from krasa-jaxb-tools.