Skip to content

Version 3.4.1

Compare
Choose a tag to compare
@tarsil tarsil released this 13 Sep 13:47
· 63 commits to main since this release
abca93e

3.4.1

Changed

  • OpenAPI now if no description is provided from the handlers, it will read directly from
    the docstrings.
  • Internal code cleaning and organisation.

Fixed

  • OpenAPI query parameters were not rendering properly for optional dict or list types. This
    was due to the internal evaluation of the None field which is now skipping for OpenAPI purposes.

Example

Now it is possible to do something like this:

from typing import Dict, List, Union, Optional

from esmerald import Gateway, JSONResponse, Query, get


@get("/item")
async def check_item(q: Union[List[str], None]) -> JSONResponse:
    return JSONResponse({"value": q})


@get("/another-item")
async def check_item(q: Optional[Dict[str, str]]) -> JSONResponse:
    return JSONResponse({"value": q})