From 11d2d7a369195fbabb95ac30fd17dcf86f8d5369 Mon Sep 17 00:00:00 2001 From: Mathieu AVILA Date: Fri, 16 Jun 2023 07:50:35 +0200 Subject: [PATCH] Set 'default' field type as anything possible --- openapi3/schemas.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openapi3/schemas.py b/openapi3/schemas.py index fd57ccb..b1040de 100644 --- a/openapi3/schemas.py +++ b/openapi3/schemas.py @@ -88,7 +88,7 @@ def _parse_data(self): self.additionalProperties = self._get("additionalProperties", [bool, dict]) self.description = self._get("description", str) self.format = self._get("format", str) - self.default = self._get("default", TYPE_LOOKUP.get(self.type, str)) # TODO - str as a default? + self.default = self._get("default", [list, dict, str, int, float, bool]) # TODO - str as a default? self.nullable = self._get("nullable", bool) self.discriminator = self._get("discriminator", dict) # 'Discriminator' self.readOnly = self._get("readOnly", bool)