Closed kennethreitz closed 6 months ago
The recent updates involve refining data handling and validation across a web service framework. Key modifications include simplifying data response assignments, enhancing API route decorators for better clarity and function, and advancing schema validation techniques. This overhaul improves the framework's integration with popular data validation libraries like Pydantic and Marshmallow, making it more versatile and user-friendly for developers.
Files | Change Summary |
---|---|
examples/hello_data.py |
Modified the response assignment in the receive_incoming function. |
examples/response_validation.py |
Replaced @api.ensure with @api.response decorators. |
examples/schema_validation.py , responder/api.py , responder/models.py |
Enhanced schema validation and route handling, added support for Pydantic and Marshmallow, and introduced new request data location decorators. |
tests/test_responder.py |
Updated assertions and replaced decorators for improved schema validation testing. |
"In the land of code and byte,
Where data streams by day and night,
A rabbit hopped, with keen insight,
🐰✨ To polish APIs so bright.
With Marshmallow and Pydantic might,
It leapt beyond the highest height,
Celebrating each update's light."
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?
Work being done by @tabotkevin at the moment :)
Summary by CodeRabbit
New Features
Refactor
hello_data.py
file for improved efficiency.@api.ensure
with@api.response
decorators in specific routes to streamline response validation.api.py
for better parsing, validating, and handling request data, including new decorators for request data locations and response serialization.models.py
with new methods and modified existing ones for advanced data validation and error handling.Tests