Giter VIP home page Giter VIP logo

Comments (7)

krasa avatar krasa commented on August 12, 2024

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.

kalgon avatar kalgon commented on August 12, 2024

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.

krasa avatar krasa commented on August 12, 2024

Date is fixed in 0.5-SNAPSHOT

from krasa-jaxb-tools.

krasa avatar krasa commented on August 12, 2024

Fixing the choice will be very hard.

from krasa-jaxb-tools.

krasa avatar krasa commented on August 12, 2024

so @NotNull at choices is fixed.

from krasa-jaxb-tools.

hestad avatar hestad commented on August 12, 2024

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.

krasa avatar krasa commented on August 12, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.