fuel-dev team mailing list archive
-
fuel-dev team
-
Mailing list archive
-
Message #01065
Data validation on back-end and clients
Hi Fuel devs!
I'm looking on fix https://bugs.launchpad.net/fuel/+bug/1319306. This bug
is fixed only for Web UI. But it should be fixed on back-end site too.
Let's add validation for it. AFAIK, at least we've got similar errors with
roles assignment validation earlier.
I agree, that we need as much as possible validations on our Web UI. But
back-end validation is very important too. It must be implemented because
Web UI is only one of possible users of our API. A good REST API must not
raises 500 errors. 4xx HTTP status codes should be used for any case of
invalid data. It's a good practice and it makes API usage less risky.
I propose to implement validation on every API client and API handlers:
- API handlers - all input data must be validated;
- Web UI - all input data should be validated as much as possible;
- Fuel (CLI) Client - at least, all required parameters should be
validated.
Let's discuss my proposals and file bugs and blueprints if needed.
--
Regards,
Ivan Kolodyazhny,
Software Engineer, Mirantis, Inc.
Follow ups