swagger-api/swagger-codegen

Client-generation: Allow data validation on the client side (using minLength/maxLength)

Open

#2549 aperta il 11 apr 2016

Vedi su GitHub
 (36 commenti) (0 reazioni) (0 assegnatari)HTML (5474 fork)batch import
Client: JavaEnhancement: Featurehelp wanted

Metriche repository

Star
 (12.701 star)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

Currently the generated Java-clients perform required-validation automatically. Do you think this makes sense for minLength/maxLength as well, to reject the request on the client side before sending to the server?

For Java the JSR-303 Bean Validation API could be used for this automatically. For other languages maybe a JSON-schema validation could be used.

Guida contributor