Skip to content

Add GitHub action to validate records JSON - #5

Merged
sepro merged 1 commit into
mainfrom
claude/add-validate-records-action-yyKM4
Dec 18, 2025
Merged

Add GitHub action to validate records JSON#5
sepro merged 1 commit into
mainfrom
claude/add-validate-records-action-yyKM4

Conversation

@sepro

@sepro sepro commented Dec 18, 2025

Copy link
Copy Markdown
Owner

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.

2 participants