Skip to content

Conversation

@sepro
Copy link
Owner

@sepro sepro commented Dec 18, 2025

This commit fixes validation failures in GitHub Actions on Linux when JSON files contain Windows-style path separators (backslashes).

Changes:

  • Add discriminator fields to all record entry models (entry_type)
  • Use Pydantic's discriminated unions for better error messages
  • Preprocess JSON data on load to normalize backslashes to forward slashes
  • Add entry_type fields automatically based on RecordType.type
  • Normalize paths to Unix-style (forward slashes) when saving JSON
  • Handle None values properly in preprocessing

Fixes validation errors where FilePath validator failed on Linux CI when paths used Windows-style separators. Now works across platforms.

This commit fixes validation failures in GitHub Actions on Linux when
JSON files contain Windows-style path separators (backslashes).

Changes:
- Add discriminator fields to all record entry models (entry_type)
- Use Pydantic's discriminated unions for better error messages
- Preprocess JSON data on load to normalize backslashes to forward slashes
- Add entry_type fields automatically based on RecordType.type
- Normalize paths to Unix-style (forward slashes) when saving JSON
- Handle None values properly in preprocessing

Fixes validation errors where FilePath validator failed on Linux CI
when paths used Windows-style separators. Now works across platforms.
@sepro sepro merged commit 7d48f79 into main Dec 18, 2025
2 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants