Add API documentation
Compare changes
Files
2- Konrad Mohrfeldt authored
This change allows clients to identify specific errors by an optional code provided as part of any APIException instances raised in our code. This code: ```py raise ValidationError( "Please provide a correct date and time", code="time-invalid", ) ``` now returns an error object via the API with a message and a code property making error processing on the client side easy for both humans and machines and looks like this: ```json { "message": "Please provide a correct date and time", "code": "time-invalid" } ```
+ 14
− 0
@@ -109,6 +109,19 @@ REST_FRAMEWORK = {
@@ -125,6 +138,7 @@ INSTALLED_APPS = (