From 22f47325fd63ed0f5ea39d6b8d78e5331098d1bf Mon Sep 17 00:00:00 2001 From: alex Date: Wed, 18 Dec 2024 18:40:06 +0100 Subject: [PATCH] Changes: - release notes - enum definitions --- docs/en/docs/release-notes.md | 5 +++++ esmerald/enums.py | 12 ++++++------ 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/docs/en/docs/release-notes.md b/docs/en/docs/release-notes.md index 791f8fe1..d184fd95 100644 --- a/docs/en/docs/release-notes.md +++ b/docs/en/docs/release-notes.md @@ -11,6 +11,11 @@ hide: - Allow passing extensions as string. +### Fixed + +- OpenAPI responses. +- Enum definitions. + ## 3.6.0 ### Added diff --git a/esmerald/enums.py b/esmerald/enums.py index b6bc20d7..2c8d1d89 100644 --- a/esmerald/enums.py +++ b/esmerald/enums.py @@ -9,7 +9,7 @@ def __repr__(self) -> str: return str(self) -class HttpMethod(StrEnum, Enum): +class HttpMethod(StrEnum): GET = "GET" POST = "POST" PUT = "PUT" @@ -20,7 +20,7 @@ class HttpMethod(StrEnum, Enum): TRACE = "TRACE" -class MediaType(StrEnum, Enum): +class MediaType(StrEnum): JSON = "application/json" HTML = "text/html" TEXT = "text/plain" @@ -30,23 +30,23 @@ class MediaType(StrEnum, Enum): OCTET = "application/octet-stream" -class OpenAPIMediaType(StrEnum, Enum): +class OpenAPIMediaType(StrEnum): OPENAPI_YAML = "application/vnd.oai.openapi" OPENAPI_JSON = "application/vnd.oai.openapi+json" -class EncodingType(StrEnum, Enum): +class EncodingType(StrEnum): JSON = "application/json" MULTI_PART = "multipart/form-data" URL_ENCODED = "application/x-www-form-urlencoded" -class ScopeType(StrEnum, Enum): +class ScopeType(StrEnum): HTTP = "http" WEBSOCKET = "websocket" -class ParamType(StrEnum, Enum): +class ParamType(StrEnum): PATH = "path" QUERY = "query" COOKIE = "cookie"