[app-server] feat: add command to generate json schema (#6406)

Add a `codex generate-json-schema` command for generating a JSON schema
bundle of app-server types, analogous to the existing `codex
generate-ts` command for Typescript.
This commit is contained in:
Owen Lin
2025-11-10 08:59:14 -08:00
committed by GitHub
parent 5916153157
commit fbdedd9a06
3 changed files with 61 additions and 23 deletions

View File

@@ -666,6 +666,8 @@ fn ts_files_in_recursive(dir: &Path) -> Result<Vec<PathBuf>> {
Ok(files)
}
/// Generate an index.ts file that re-exports all generated types.
/// This allows consumers to import all types from a single file.
fn generate_index_ts(out_dir: &Path) -> Result<PathBuf> {
let mut entries: Vec<String> = Vec::new();
let mut stems: Vec<String> = ts_files_in(out_dir)?