Implementing JSR303 Validation in YAML spec

7 مرّات مشاهدة
التخطي إلى أول رسالة غير مقروءة

declan roche

غير مقروءة،
22‏/05‏/2017، 7:55:08 ص22‏/5‏/2017
إلى Swagger
Hi ,
I'm defining my rest API in YAML (using the swagger editor)
I'm also defining my model. At the moment I'm using the 
generator_server->spring function to generate my model.
but I will automate the code gen later.

After I generate the model java classes 
I am annotating with JSR303 validation annonations ie. 
 javax.validation.Valid;
 javax.validation.constraints.NotNull;
 javax.validation.constraints.Pattern;
 org.hibernate.validator.constraints.NotEmpty;


Is it possible to define the validation information in the YAML
and auto generate the model to include the JSR303 validation  ?


Thanks

Declan

الرد على الكل
رد على الكاتب
إعادة توجيه
0 رسالة جديدة