Closed BarcoMasile closed 1 year ago
General questions: how is the text of the error messages generated? It's not a concern for this PR, but I'm wondering:
General questions: how is the text of the error messages generated? It's not a concern for this PR, but I'm wondering:
- can they be centralized, or otherwise searched through in case we ever needed to spot a specific issue starting from the error message? (e.g. we find the error message, and we need to get to the schema definition to see if there is a bug)
- can they be internationalised, or customized at all?
The library of choice allows for customization of error message at the field level so we can (in the future) for example return i18n keys to the frontend and let the frontend translate those for the users @mendaomn
General questions: how is the text of the error messages generated? It's not a concern for this PR, but I'm wondering:
- can they be centralized, or otherwise searched through in case we ever needed to spot a specific issue starting from the error message? (e.g. we find the error message, and we need to get to the schema definition to see if there is a bug)
- can they be internationalised, or customized at all?
The library of choice allows for customization of error message at the field level so we can (in the future) for example return i18n keys to the frontend and let the frontend translate those for the users @mendaomn
Good, I noticed you added the request.path
in the ValidationError
constructor. Thus, we should be able to easily traceback to the failing schema in case of validation errors. Good job!
Description
Added API input validation mechanism + decorator to validate API invocation at the controller level.
Changes
requirements.txt
How Has This Been Tested?
References
PR Quality Checklist
i18n
solution instead (see here)npm run build
builds without any errorIn order to increase the likelihood of your contribution being accepted, please make sure you have read both the Contributing Guidelines and the Project Guidelines
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.