Skip to content

Commit

Permalink
Release 3.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
tarsil committed Jul 17, 2024
1 parent a0b007b commit db7d07a
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 1 deletion.
47 changes: 47 additions & 0 deletions docs/en/docs/release-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,53 @@ hide:

# Release Notes

## 3.3.0

### Fixed

- Fixes `PydanticEncoder` when checking for subclasses of `BaseModel` causing the dependency injection to fail
for those specific types

### Added

- Esmerald is ow using `python-slugify` instead of `awesome-slugify` for internals.
- OpenAPI Schemas Pydantic is now fully integrated with Esmerald OpenAPI.
- Esmerald now supports `app` as decorator prodiving another way of declaring the routing.

#### Example

```python
#!/usr/bin/env python
import uvicorn

from esmerald import Esmerald, Gateway, JSONResponse, Request, get


app = Esmerald()


@app.get("/esmerald")
def welcome() -> JSONResponse:
return JSONResponse({"message": "Welcome to Esmerald"})


@app.get("/esmerald/{user}")
def user(user: str) -> JSONResponse:
return JSONResponse({"message": f"Welcome to Esmerald, {user}"})


@app.get("/esmerald/in-request/{user}")
def user_in_request(request: Request) -> JSONResponse:
user = request.path_params["user"]
return JSONResponse({"message": f"Welcome to Esmerald, {user}"})


if __name__ == "__main__":
uvicorn.run(app, port=8000)
```

The same is also applied to the `Router` object.

## 3.2.7

This was missed from version [3.2.6](#326).
Expand Down
2 changes: 1 addition & 1 deletion esmerald/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = "3.2.7"
__version__ = "3.3.0"


from lilya import status
Expand Down

0 comments on commit db7d07a

Please sign in to comment.