fix(openapi): normalize Path defaults to POSIX in schema generation (#9209)
Pydantic stringifies Path defaults via the host OS's separator, so a
default like Path("models/.convert_cache") serialized to
"models\.convert_cache" whenever the schema was regenerated on Windows
— polluting every diff with cross-OS noise.
Added normalize_path_defaults() to walk the finished OpenAPI schema and
flip backslashes to forward slashes on any node with format: path. Ran
once at the end of get_openapi_func so it covers all current and future
Path-typed fields without per-field annotations. Regenerated openapi.json
and schema.ts cleanly on Windows.
Co-authored-by: Jonathan <34005131+JPPhoto@users.noreply.github.com>
Co-authored-by: Lincoln Stein <lincoln.stein@gmail.com> A
Alexander Eichhorn committed
0963bb6b0d2f1737d674d73abd4cc7b41494147e
Parent: 32b672f
Committed by GitHub <noreply@github.com>
on 5/31/2026, 11:28:27 PM