Skip to content

Conversation

@dfcoffin
Copy link
Contributor

@dfcoffin dfcoffin commented Jan 7, 2026

Summary

Reordered ReadingType entity, DTO, and migration fields to match ESPI 4.0 XSD element sequence (espi.xsd:382-481).

Changes

  • ReadingTypeEntity: Reordered fields 13-18 to match XSD sequence:
    • timeAttribute → tou → uom → cpp → interharmonic → measuringPeriod → argument
  • ReadingTypeDto: Updated @XmlType propOrder and record component order to match XSD
    • Removed description from propOrder (belongs to IdentifiedObject/Atom, not ReadingType)
  • V1__Create_Base_Tables.sql: Reordered reading_types table columns to match XSD sequence
  • ReadingTypeMapper: No changes required (MapStruct maps by field name, not order)

Test Results

✅ All 550 tests passing

  • ReadingTypeRepositoryTest: 16 tests passed
  • Full test suite: All tests passed
  • TestContainers integration tests: Verified with H2, MySQL, PostgreSQL

Schema Compliance

This change ensures ReadingType field order matches the ESPI 4.0 XSD specification exactly, which is critical for:

  • XML marshalling/unmarshalling correctness
  • Schema validation
  • Interoperability with other ESPI implementations

🤖 Generated with Claude Code

Reordered ReadingType entity, DTO, and migration fields to match ESPI 4.0 XSD element sequence (espi.xsd:382-481).

Changes:
- ReadingTypeEntity: Reordered fields 13-18 to match XSD sequence:
  timeAttribute, tou, uom, cpp, interharmonic, measuringPeriod, argument
- ReadingTypeDto: Updated @XmlType propOrder and record component order
  to match XSD (removed description from propOrder as it belongs to IdentifiedObject/Atom)
- V1__Create_Base_Tables.sql: Reordered reading_types table columns to match XSD sequence
- ReadingTypeMapper: No changes required (MapStruct maps by field name, not order)

All tests passing (550 tests).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
@dfcoffin dfcoffin merged commit 8ecad71 into main Jan 8, 2026
5 checks passed
@dfcoffin dfcoffin deleted the feature/schema-compliance-phase-2-reading-type branch January 8, 2026 03:27
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