Skip to content

Commit

Permalink
Prevent string default value for date-time fields
Browse files Browse the repository at this point in the history
  • Loading branch information
jonwihl authored and mdibaiee committed Mar 20, 2024
1 parent 59cefb7 commit a3a0e4b
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -300,10 +300,11 @@ def get_json_schema(self) -> Mapping[str, Any]:
for k in self.primary_key:
if k not in schema["properties"]:
continue

typ = schema["properties"][k]["type"]
if "string" in typ or typ == "string":
schema["properties"][k]["default"] = ""
if "format" not in schema["properties"][k]:
schema["properties"][k]["default"] = ""

return schema

Expand Down

0 comments on commit a3a0e4b

Please sign in to comment.