Skip to content

Conversation

@dfcoffin
Copy link

@dfcoffin dfcoffin commented Feb 8, 2026

Summary

  • Add 9 customer resource types with 34 schema files
  • Add 18 response definitions with cust-feed/cust-entry link types
  • Add 18 Data Custodian path definitions
  • Update main OpenAPI spec to integrate customer resources

This expansion enables Spring Boot developers to generate complete server implementations covering both energy usage data and customer/billing information APIs following the NAESB REQ.21 ESPI standard.

What's New

Customer Resources Added:

  1. Customer - Organization receiving services
  2. CustomerAccount - Billing account information
  3. CustomerAgreement - Service agreement terms
  4. EndDevice - Meter/device at location
  5. Meter - Specific meter details (extends EndDevice)
  6. ProgramDateIdMappings - Program date mappings
  7. ServiceLocation - Physical service address
  8. ServiceSupplier - Utility/supplier information
  9. Statement - Billing statement information

Supporting Types: 25 additional types including Organisation, StreetAddress, Document, Agreement, Asset, Location, Status, Priority, and more.

Key Implementation Details:

  • Uses http://naesb.org/espi/customer XML namespace (separate from energy data)
  • Link types use cust-feed/{Resource} and cust-entry/{Resource} convention
  • All endpoints follow ESPI REQ.21.6.2.1 access patterns
  • OAuth2 security with standard ESPI query parameters
  • Function blocks annotated (FB_50 through FB_58)

Files Added:

  • 34 schema files in openapi/components/schemas/
  • 18 response files in openapi/components/responses/
  • 18 path files in openapi/paths/
  • Updated openapi/openapi.yaml with customer resource integration

Test plan

  • OpenAPI spec validates with zero errors (npm test)
  • Documentation builds successfully (npm run build)
  • All customer resources use correct http://naesb.org/espi/customer namespace
  • Link types use cust-feed/cust-entry convention (not espi-feed/espi-entry)
  • All examples use https://data.greenbuttonconnect.org as host
  • Manual review of XML examples against ESPI 4.1 standard
  • Test Spring Boot code generation with customer resources

Future Enhancements

Follow-up PRs could add:

  • Subscription-scoped paths (/espi/1_1/resource/Subscription/{subscriptionId}/{Resource})
  • Batch paths (/espi/1_1/resource/Batch/RetailCustomer/{retailCustomerId}/{Resource})
  • Enhanced XML examples with more realistic PII data

🤖 Generated with Claude Code

dfcoffin and others added 4 commits February 7, 2026 22:36
Add 34 customer resource schema files with customer namespace:
- 9 main resources: Customer, CustomerAccount, CustomerAgreement,
  EndDevice, Meter, ServiceLocation, ServiceSupplier, Statement,
  ProgramDateIdMappings
- 25 supporting types: Organisation, StreetAddress, Document,
  Agreement, Asset, Location, Status, Priority, and more

All schemas use http://naesb.org/espi/customer namespace with
'customer' prefix per ESPI 4.1 specification.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Add 18 response files (Feed and Entry for each of 9 resources):
- AtomFeed and AtomEntry responses for Customer, CustomerAccount,
  CustomerAgreement, ServiceLocation, EndDevice, Meter,
  ServiceSupplier, Statement, and ProgramDateIdMappings

Response link types use cust-feed/{Resource} and cust-entry/{Resource}
convention to distinguish from energy resource responses.

All examples use https://data.greenbuttonconnect.org as host and
http://naesb.org/espi/customer XML namespace.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Add 18 path definition files for Data Custodian access:
- Collection paths: /espi/1_1/resource/{Resource}
- Individual paths: /espi/1_1/resource/{Resource}/{id}
- All 9 customer resources: Customer, CustomerAccount,
  CustomerAgreement, ServiceLocation, EndDevice, Meter,
  ServiceSupplier, Statement, ProgramDateIdMappings

Paths follow ESPI REQ.21.6.2.1 patterns with OAuth2 security,
standard query parameters (published-max/min, updated-max/min,
max-results, start-index, depth), and appropriate function block
annotations (FB_50-58).

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Update openapi/openapi.yaml to include customer resources:
- Add 18 customer resource paths to paths section
- Add 9 customer resource schemas to components.schemas
- Add 18 customer resource responses to components.responses
- Add Customer Resources tag and tag group
- Update API description to mention customer/billing data
- Document customer namespace and PII considerations

Enables Spring Boot code generation for complete ESPI API including
both energy usage data and customer/billing information.

Spec validates with zero errors (redocly lint) and builds successfully.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@dfcoffin dfcoffin merged commit 4755d6c into main Feb 8, 2026
2 checks passed
@dfcoffin dfcoffin deleted the feature/add-customer-resources branch February 8, 2026 03:52
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.

1 participant