Releases: dymmond/esmerald
Version 2.0.5
Changed
- Updated the way
esmerald
client operates internally. - Updated internal minimum requirements.
Fix
- Regression in OpenAPI when adding middleware to
Gateway
orHTTPHandler
. When a middleware
was added, the OpenAPI would not generate the docs for it. The API would still work but not OpenAPI
docs.
Version 2.0.4
Changed
- Updated functional internal crypto to only use the system random.
- Cleaner codebase for the application settings.
- Updated version of Asyncz to be at least 0.5.0.
Added
- Custom exception handlers,
from esmerald.exception_handlers import value_error_handler
. - New native exception handler for pydantic v2 Validation errors in general.
- Dataclasses (normal and Pydantic dataclases) are now supported as Esmerald Responses.
- Support for OpenAPI Webhooks.
- Improved Responses documentation with examples using Pydantic BaseModel and dataclasses.
- OpenAPI Spotlight Elements documentation. When starting the application, accesing the default
/docs/elements
. - Support for Edgy ORM. Docs here.
Fixed
- Removed old pydantic v1 syntax from tests and applications.
add_include()
that wasn't generating signature models upon import.- OpenAPI query params with defaults weren't loading properly.
Version 2.0.3
This addition was supposed to go in the release 2.0.2 but somehow it was missed in the merge of
the pull requests. It is not a bug fix but instead is a simple new
directive that can be useful for those who like using the command-line.
It is important to understand that this support won't be available on releases of Esmerald
1.X.
Added
- Interactive shell support directive for any Esmerald application.
Version 2.0.2
Changed
- Updated Field, Form and Body from
esmerald.params
with current defaults. - Removed redundant cast from
File
toBody
as it is a subclass.
Added
- Added
strict
andmax_digits
esmerald paramsesmerald.params
. - Deprecate
example
as OpenAPI 3.10 supportsexamples
. Use examples instead ofexample
.
Fixed
- UploadFile sending as a list and as normal.
This got broken when the migration to pydantic 2.0 happened. File
andForm
fromesmerald.params
now acceptannotation
.- OpenAPI for
UploadFile
as single and list now being parsed as a model.
Version 2.0.1
2.0.1
This is a small fix into the parser of lists for the OpenAPI specification.
Fixed
- OpenAPIResponse now allows proper parse of lists as definition. More details.
Version 2.0.0
!!! Warning
When upgrading Esmerald to version 2, this also means the use of Pydantic 2.0 at its core as well as corresponsing technologies
already updated to version 2 of Pydantic (Saffier, Asyncz...).
If you still wish to continue to use Pydantic 1 with Esmerald, it is recommended to use Esmerald prior to version 2.0 which it will
be maintained for a shor period but we strongly recommend to always use the latest version.
Changed
- Major update of the core of Esmerald from Pydantic v1 to Pydantic v2.
- Changed deprecated functions such as
validator
androot_validator
tofield_validator
andmodel_validator
. - Transformers no longer support custom fields. Pydantic natively handles that.
- EsmeraldSignature updated for the new version of the FieldInfo.
params
reflect the new Pydantic FieldInfo.- Deprecated OpenAPIView in favour of the new OpenAPI documentation generator.
- Changed OpenAPI config to reflect the new generation of OpenAPI documentation.
- Internal data field is now returning Body type parameter making it easier to integrate with Pydantic 2.0.
- General codebase cleanup.
- Removed old OpenAPI document generator in favour to the newest, fastest, simplest and more effective approach in v2.
- Remove the support of pydantic 1.0. Esmerald 2+ will only support pydantic 2+.
Added
- OpenAPI support for OAuth2.
Version 1.3.0
Changed
- OpenAPI imports and removed unused dependencies.
- Deprecate
pydantic_factories
in favour ofpyfactories
. - Dropped support for Tortoise ORM natively.
Fixed
- Rename
scripts/format
toscripts/lint
for consistency. get_hasher
from contrib fixed with the return value of the algorithm.- Typing of the codebase updated.
Version 1.2.5
Fixed
- Removed deprecated functions allowing the mount and host
- Fixed show_urls for openapi specification
Version 1.2.4
Changed
- Updated pyproject.toml keywords.
- Updated to the latest Starlette 0.28.0.
- Exception handler logic refactored.
Version 1.2.3
Fixed
- Upgrade Starlette version to >=0.27.0 for a security release. Details on Starlette's security