Commit ecec308
committed
fix: pin datamodel-code-generator to 0.25.0 to match original generation
Issue: Models were originally generated with an unknown version of datamodel-code-generator
installed globally. When regenerated with v0.43.0, it introduced breaking changes:
- Enum → StrEnum (changes string comparison behavior)
- Field(...) → Annotated[type, Field(...)] (different syntax)
Investigation: Tested versions 0.25.0 through 0.35.0 and found v0.25.0 produces
output matching the original generation:
- Uses Enum (not StrEnum) - maintains backwards compatibility
- Uses Field(..., description=) syntax (not Annotated)
- Supports Pydantic v2 RootModel pattern
Changes:
- Pinned datamodel-code-generator==0.25.0 in pyproject.toml
- Removed --use-annotated flag from generation script
- Regenerated models with correct version
- All model tests now pass (46/46)
This ensures:
✓ No breaking changes for customers using EventType, Operator, etc.
✓ Consistent generation across environments
✓ Backwards compatible enum behavior (EventType.model != 'model')
✨ Created with OpenCode1 parent f7f37bb commit ecec308
File tree
3 files changed
+721
-968
lines changed- scripts
- src/honeyhive/models
3 files changed
+721
-968
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
59 | | - | |
| 59 | + | |
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
101 | | - | |
| 101 | + | |
| 102 | + | |
102 | 103 | | |
103 | 104 | | |
104 | 105 | | |
| |||
0 commit comments