mirror of
https://github.com/zulip/zulip.git
synced 2025-10-24 08:33:43 +00:00
api-tests: Reduce error output for /register openapi validation.
For descriptive endpoints, such as `/register`, that might raise Schema Validation errors via `validate_against_openapi_schema`, omits the OpenAPI schema definition in the error output. Also omits the error instance definition in the error output when it is a jsonschema object with over 100 properties. This means that the test instance for objects, like user settings, will be printed in the error output, but the test instance for the entire endpoint will not be printed to the console. The omitted output can be thousands of lines long making it difficult to find the initial console output that actually helps the contributor with debugging. Adds a section in "Documenting REST API endpoints" about debugging and understanding these errors that is linked to in the error console output.
This commit is contained in:
committed by
Tim Abbott
parent
e80e3b07c4
commit
c2bcfb52aa
@@ -517,6 +517,12 @@ the setting enabled).
|
||||
Visit Zulip's [Django testing](../testing/testing-with-django.md)
|
||||
documentation to learn more about the backend testing framework.
|
||||
|
||||
Also note that you may already need to update the API documentation for
|
||||
your new feature to pass new or existing backend tests at this point.
|
||||
The tutorial for [writing REST API endpoints](../documentation/api.md)
|
||||
can be a helpful resource, especially the section on [debugging schema
|
||||
validation errors](../documentation//api.md#debugging-schema-validation-errors).
|
||||
|
||||
### Update the frontend
|
||||
|
||||
After completing the process of adding a new feature on the backend,
|
||||
|
||||
Reference in New Issue
Block a user