Implementing JSR303 Validation in YAML spec

已查看 7 次
跳至第一个未读帖子

declan roche

未读,
2017年5月22日 07:55:082017/5/22
收件人 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 个新帖子