core-agent-ide/codex-rs/app-server-protocol/src
Robby He 017a4a06b2
Fix: Skip Option<()> schema generation to avoid invalid Windows filenames (#7479) (#7969)
## Problem

When generating JSON schemas on Windows, the `codex app-server
generate-json-schema` command fails with a filename error:
```text
Error: Failed to write JSON schema for Option<()>
Caused by:
    0: Failed to write .\Option<()>.json
    1: The filename, directory name, or volume label syntax is incorrect. (os error 123)
```
This occurs because Windows doesn't allow certain characters in
filenames, specifically the angle brackets **<>** used in the
**Option<()>** type name.

## Root Cause

The schema generation process attempts to create individual JSON files
for each schema definition, including `Option<()>`. However, the
characters `<` and `>` are invalid in Windows filenames, causing the
file creation to fail.

## Solution

The fix extends the existing `IGNORED_DEFINITIONS` constant (which was
already being used in the **bundle generation**) to also skip
`Option<()>` when generating individual JSON schema files. This
maintains consistency with the existing behavior where `Option<()>` is
excluded from the bundled schema.

---

close #7479
2025-12-15 09:57:12 -08:00
..
bin Generate JSON schema for app-server protocol (#5063) 2025-10-20 11:45:11 -07:00
protocol Reimplement skills loading using SkillsManager + skills/list op. (#7914) 2025-12-14 09:58:17 -08:00
export.rs Fix: Skip Option<()> schema generation to avoid invalid Windows filenames (#7479) (#7969) 2025-12-15 09:57:12 -08:00
jsonrpc_lite.rs [app-server] remove serde(skip_serializing_if = "Option::is_none") annotations (#5939) 2025-10-30 18:18:53 +00:00
lib.rs [app-server] populate thread>turns>items on thread/resume (#6848) 2025-11-19 15:58:09 +00:00