INNER CODE UNIT · Python
main
blockscout/blockscout · .agents/skills/openapi-spec/scripts/leaf-schemas-collect-facts.py:58
def main() -> int:
if not SCHEMAS_DIR.is_dir():
print(
f"ERROR: schemas dir not found: {SCHEMAS_DIR}",
file=sys.stderr,
)
return 2
leafs = []
for path in sorted(SCHEMAS_DIR.glob("*.ex")):
leafs.append(_collect_leaf(path))
json.dump(
{"leafs": leafs},
sys.stdout,
indent=2,
ensure_ascii=False,
)