I'm using the simple Order and OrderLine classes as below, together with a
The Order and OrderLine contain Hibernate Validator constraints for
validation being performed automatically using the @ValidateRequest and
@Valid annotations. 

public class Order { 

        private Long id; 

        private Long customerId; 

        private Date orderDate; 

        List<OrderLine> lines = new ArrayList<OrderLine>(); 

public class OrderLine { 

        private String description; 

        private Double price; 

public class OrderResource { 

        public Order create(@Valid Order order) { 
                return order; 

This works fine for validating the Order class but if the create resource
receives a JSON body including OrderLine lines these are not validated... 
However the lines are added to the order itself so that works. 

Is it possible to validate the Order lines automatically? 


View this message in context: 
Sent from the resteasy-users mailing list archive at Nabble.com.

Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
Resteasy-users mailing list

Reply via email to