SpacetimeDB
SpacetimeDB copied to clipboard
Make `spacetime describe` return a full JSON-serialized `ModuleDef` that can be passed to `spacetime generate --json-module`
Should be relatively easy; as of public PR 1343 the /database/schema/:name_or_address GET HTTP route already has a query parameter module_def which causes it to return a full ModuleDef. I (pgoldman 2024-08-04) contend that this should become the main / only behavior of that route, since the non-ModuleDef catalog format is not useful, but that's not what this ticket is about. All that's necessary is to expose that query param through the CLI.
Definition of done:
spacetime describe bitcraft > bitcraft_module_def.json
mkdir -p bitcraft_module_bindings
spacetime generate --lang csharp --out-dir bitcraft_module_bindings --json-module bitcraft_module_def.json
generates valid module bindings for a running BitCraft module without access to its source code.
May add additional arguments to spacetime describe to make this work, e.g. --format json and/or --module-def, if desired.