Skip to content

Commit

Permalink
wip: add main check
Browse files Browse the repository at this point in the history
  • Loading branch information
korikuzma committed Oct 14, 2024
1 parent 4d1a04c commit db2f49e
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions examples/pydantic_to_json_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,10 @@ def generate(self, schema, mode="validation"):
return json_schema


with open("examples/Allele.json", "w") as wf:
json.dump(
Allele.model_json_schema(schema_generator=GksGenerateJsonSchema), wf, indent=2
)
if __name__ == "__main__":
with open("examples/Allele.json", "w") as wf:
json.dump(
Allele.model_json_schema(schema_generator=GksGenerateJsonSchema),
wf,
indent=2,
)

0 comments on commit db2f49e

Please sign in to comment.