| # Copyright 2026 The Fuchsia Authors. All rights reserved. |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| |
| import argparse |
| import json |
| from pathlib import Path |
| |
| from shared.protocol import get_schema |
| |
| |
| def main() -> int: |
| parser = argparse.ArgumentParser() |
| parser.add_argument( |
| "--output", type=Path, required=True, help="Output file path" |
| ) |
| args = parser.parse_args() |
| |
| schema = get_schema() |
| args.output.parent.mkdir(parents=True, exist_ok=True) |
| args.output.write_text(json.dumps(schema, indent=4) + "\n") |
| return 0 |