Closed tabotkevin closed 4 months ago
The recent updates focus on enhancing API functionality and schema validation within a web application. Key improvements include refining response data handling, updating decorator usage for better validation and response management, and extending support for Pydantic and Marshmallow schemas in request processing. These changes aim to streamline API endpoint definitions, improve request validation, and offer more flexible schema validation options, thereby boosting the application's robustness and developer experience.
File(s) | Summary |
---|---|
examples/hello_data.py |
Modified receive_incoming to assign data object directly in /upload route handler. |
examples/response_validation.py |
Replaced @api.ensure with @api.response for /create and /all routes. |
examples/schema_validation.py |
Enhanced schema validation with new classes and routes; updated naming conventions. |
examples/hello_expect.py |
Introduced functionality for creating a book using a Pydantic schema in a Responder API. |
responder/api.py |
Refactored decorators for input validation, documentation, and response serialization. |
responder/models.py |
Added schema validation for Marshmallow and Pydantic; improved error handling. |
tests/test_responder.py |
Updated tests to reflect changes in response format and decorator usage. |
🐰✨
In the land of code and sun,
Changes swift, the work is done.
Decorators dance, schemas align,
Through fields of data, our APIs shine.
So hop along on paths anew,
With every line, our world we renew.
🌟🐾
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
check
examples/schema_validation.py
""" Decorator for parsing and validating input schema. Supports both Pydantic and Marshmallow.
Usage:: """