Vapora/justfiles/assets.just

14 lines
586 B
Text
Raw Normal View History

# API catalog export
#
# Generates api-catalog.json from all #[onto_api] registered routes in vapora-backend.
# Run after any handler annotation is added or changed.
# Commit alongside the annotation changes — they are paired artifacts.
# Export #[onto_api] routes from vapora-backend to api-catalog.json
[doc("Export #[onto_api] routes to api-catalog.json")]
export-api-catalog:
#!/usr/bin/env nu
cargo run -p vapora-backend -- --dump-api-catalog out> api-catalog.json
let count = open api-catalog.json | length
print $"exported ($count) routes to api-catalog.json"