Lunar Energy · API Governance Rules
Lunar Energy API Rules
Spectral linting rules defining API design standards and conventions for Lunar Energy.
8 Rules
error 4
warn 4
Rule Categories
gridshare
Rules
error
gridshare-info-contact
Gridshare OpenAPI documents must declare a Lunar Energy / Gridshare contact.
$.info.contact
error
gridshare-server-base-url
Servers must point at developer-api.{partner,customer}.[dev0.]{us.,}mygridshare.com.
$.servers[*].url
error
gridshare-bearer-only
All Gridshare endpoints use OAuth 2.0 bearer tokens — no API keys.
$.components.securitySchemes[*]
warn
gridshare-tag-title-case
Tags must be Title Case (e.g. Flex Groups, Operation Mode).
$.tags[*].name
warn
gridshare-operation-summary-title-case
Operation summaries must be Title Case.
$.paths[*][*].summary
error
gridshare-synthid-parameter-name
Device path parameter must be named synthId (synthetic identifier).
$.paths[?(@property =~ /\\{synthId\\}/)]
warn
gridshare-energy-fields-opt-in
Telemetry endpoints must document the include query parameter so energy_Wh fields can be requested.
$.paths[?(@property =~ /telemetry/)].get.parameters[?(@.name == 'include')]
warn
gridshare-error-shape
Error responses (400/401/403/422) reference the documented {message, code} shape.
$.paths[*][*].responses['400','401','403','422'].content.application/json.schema.$ref