Name | Modified | Size | Downloads / Week |
---|---|---|---|
Parent folder | |||
README.md | 2025-04-28 | 4.0 kB | |
v2.2.0 source code.tar.gz | 2025-04-28 | 2.0 MB | |
v2.2.0 source code.zip | 2025-04-28 | 2.0 MB | |
Totals: 3 Items | 4.0 MB | 0 |
- Fix [#533]. A feature that was requested several times in the past!
Add support for delegating the generation of OpenAPI schemas for types to
external libraries and completely relies on schemas generated by Pydantic
when working with
pydantic.BaseModel
. - Add support for handling Pydantic dataclasses when generating OpenAPI documentation.
- Add the possibility to control the
Serializer
class used to generate the dict object of the OpenAPI Specification and to serialize it to JSON and YAML. This grants the user full control over the OpenAPI Specification, and enables more scenarios as users can modify the specification object comfortably and as they need. To use, pass aserializer
parameter to theOpenAPIHandler
's constructor. - Generates OpenAPI Specification with version
3.1.0
instead of3.0.3
. - Update
essentials-openapi
dependency to version>=1.2.0
. - Fix [#541]. Correct the type hint for the Jinja loader to use the abstract
interface
BaseLoader
. - Fix [#517]. Add support for any HTTP method when writing HTTP requests, not only for the most common methods.
- Fix [#529]. Add missing Jinja2 dependency in the
full
package. - Fix type annotation in
messages.pyi
, by @bymoye. - Add support for mapping types in OpenAPI Documentation, by @tyzhnenko.
- Improve
blacksheep/server/normalization.py
to bind any subclass ofIdentity
using therequest.user
rather than justUser
andIdentity
exactly, by @bymoye. - Add new UI provider for OpenAPI Documentation, for Scalar UI, by @arthurbrenno and @bymoye.
- Correct the
ReDocUIProvider
to support a customfavicon
. - Fix [#538]. The
Application
object can now use bothType
keys andint
keys when applying the default Not Found exception handler and the Internal Server Error exception handler. - BREAKING CHANGE. When an unhandled exception occurs, user-defined
exception handlers for Internal Server Error status now always receive an
instance of
InternalServerError
class, containing a reference to the source exception. Previously, user-defined internal server error handlers would erroneously receive any type of unhandled exception. If you defined your own exception handler for InternalServerError or for 500 status and you applied logic based on the type of the unhandled exception, update the code to read the source unhandled exception fromexc.source_error
. - BREAKING CHANGE. Fix bug that would prevent
show_error_details
from working as intended when a user-definedInternalServerError
exception handlers was defined. Whenshow_error_details
is enabled, any unhandled exception is handled by the code that procudes the HTML document with error details and the stack trace of the error, even if the user configured an exception handler for internal server errors (using 500 or InternalServerError as keys). This is a breaking change if you made the mistake of running a production application withshow_error_details
enabled, and exception details are hidden using a custom 500 exception handler. - Improve type annotations for
get_files_to_serve
andget_files_list_html_response
. - The
TextBinder
is made a subclass of BodyBinder. This is correct and enables validation of handler signature and better generation of OpenAPI documentation. This binder was always about reading the request body as plain text. - Modify
pyproject.toml
to specifyrequires-python = ">=3.8"
instead ofrequires-python = ">=3.7"
. - Update the error message of the
AmbiguousMethodSignatureError
to make it clearer and offer a better user experience. - Update the default message of the InternalServerError class to be Internal Server Error instead of Internal server error..