Skip to content

Commit

Permalink
facebook: use default empty string for primary keys instead of required
Browse files Browse the repository at this point in the history
  • Loading branch information
mdibaiee committed Mar 20, 2024
1 parent 0bba128 commit 59cefb7
Show file tree
Hide file tree
Showing 2 changed files with 84 additions and 58 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -301,16 +301,9 @@ def get_json_schema(self) -> Mapping[str, Any]:
if k not in schema["properties"]:
continue

tys = schema["properties"][k]["type"]

if "null" in tys:
schema["properties"][k]["type"].remove("null")

if "required" not in schema:
schema["required"] = []

if k not in schema["required"]:
schema["required"].append(k)
typ = schema["properties"][k]["type"]
if "string" in typ or typ == "string":
schema["properties"][k]["default"] = ""

return schema

Expand Down
Loading

0 comments on commit 59cefb7

Please sign in to comment.