Skip to content

Conversation

@dfcoffin
Copy link

@dfcoffin dfcoffin commented Feb 7, 2026

Summary

Fixes the issue where all endpoints displayed the same generic XML examples (UsagePoint/IntervalBlock) regardless of the actual resource type being accessed.

Changes

New Resource-Specific Response Files (18 files)

Created dedicated response files for each resource type:

New Examples (previously had none):

  • ApplicationInformation - OAuth client registration with clientId, clientSecret, redirectUri, scope, grant types
  • Authorization - OAuth authorization records with active/revoked tokens, authorizedPeriod, publishedPeriod, scope
  • ElectricPowerQualitySummary - Power quality data with flicker, harmonics, voltage events, interruption counts
  • UsageSummary - Billing summaries with costs, consumption, tariff profiles, billing periods

Extracted to Standalone Files:

  • ✅ UsagePoint
  • ✅ MeterReading
  • ✅ ReadingType
  • ✅ IntervalBlock
  • ✅ LocalTimeParameters

Inline Examples:

  • ServiceStatus - Online/offline status indicators

Path Files Updated (24 files)

Every non-Batch path file now references its resource-specific response file:

  • ApplicationInformation endpoints → AtomFeed_ApplicationInformation.yaml
  • Authorization endpoints → AtomFeed_Authorization.yaml
  • ElectricPowerQualitySummary endpoints → AtomFeed_ElectricPowerQualitySummary.yaml
  • UsageSummary endpoints → AtomFeed_UsageSummary.yaml
  • And so on...

Preserved Generic Responses

  • AtomFeed.yaml and AtomEntry.yaml remain intact
  • Still used by the 4 Batch endpoints (correct behavior for multi-resource subscription feeds)

Example Conventions

All new examples follow Green Button standards:

  • Host: data.greenbuttonconnect.org
  • Type 5 UUIDs for all feed/entry IDs
  • Proper Atom namespace: http://www.w3.org/2005/Atom
  • Proper ESPI namespace: http://naesb.org/espi
  • Link attribute order: rel= href= type=
  • Realistic values based on XSD schema definitions

Validation

npm test - Passes with zero errors
npm run build - Successfully generates documentation (1007 KiB)

Files Changed

  • 18 new response files
  • 24 path files updated
  • 1 openapi.yaml updated (added response references)
  • 1 CLAUDE.md added (branch management instructions)

Total: 44 files changed, 875 insertions, 24 deletions

Testing

After merge, verify at https://greenbuttonalliance.github.io/openapi-starter/ that:

  • ApplicationInformation shows OAuth client data
  • Authorization shows token data
  • ElectricPowerQualitySummary shows power quality metrics
  • UsageSummary shows billing data
  • Each resource type displays appropriate examples

Co-Authored-By: Claude Sonnet 4.5 noreply@anthropic.com

dfcoffin and others added 2 commits February 7, 2026 00:02
Create project-specific instructions to ensure:
- New branches are always created before making changes
- Proper branch naming conventions are followed
- OpenAPI development best practices are documented
- Commit message format is standardized

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Created 18 new resource-specific response files so each endpoint shows
appropriate XML examples instead of generic UsagePoint data for all resources.

New examples added for:
- ApplicationInformation (OAuth client registration data)
- Authorization (OAuth authorization records with tokens)
- ElectricPowerQualitySummary (power quality events and measurements)
- UsageSummary (billing summaries with costs and consumption)
- ServiceStatus (online/offline status indicators)

Extracted to standalone files:
- UsagePoint, MeterReading, ReadingType, IntervalBlock, LocalTimeParameters

Updated 24 path files to reference resource-specific responses.
Batch endpoints still use generic multi-resource feed (correct behavior).

All examples follow conventions:
- Use data.greenbuttonconnect.org as host
- Type 5 UUIDs for all IDs
- Proper Atom and ESPI namespaces
- Realistic example values based on XSD schemas

Validation: Passes npm test with zero errors

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@dfcoffin dfcoffin merged commit ef27c4e into main Feb 7, 2026
2 checks passed
@dfcoffin dfcoffin deleted the fix/resource-specific-examples branch February 7, 2026 05:31
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