Dexcom · API Governance Rules
Dexcom API Rules
Spectral linting rules defining API design standards and conventions for Dexcom.
37 Rules
error 14
warn 19
info 4
Rule Categories
info
openapi
operation
parameter
paths
response
schema
security
servers
tag
tags
Rules
error
info-title-required
Every API must have a title in the info object.
$.info
warn
info-title-prefix
Titles should start with "Dexcom" for portfolio consistency.
$.info.title
error
info-description-required
The info object must include a description explaining the API purpose.
$.info
warn
info-description-min-length
Info descriptions should be at least 80 characters to be meaningful.
$.info.description
error
info-version-required
A version string is required in the info object (e.g. v3).
$.info
warn
info-version-format
API version should match the v{N} pattern Dexcom uses (v2, v3).
$.info.version
error
openapi-version-3
Specs must declare OpenAPI 3.x.
$.openapi
error
servers-required
At least one server must be declared.
$.servers
error
servers-https
All Dexcom server URLs must use HTTPS.
$.servers[*].url
warn
servers-dexcom-host
Server URLs should point to a Dexcom-controlled host (api.dexcom.com, api.dexcom.eu, api.dexcom.jp, sandbox-api.dexcom.com).
$.servers[*].url
warn
servers-description
Each server must include a description (e.g. Production, Sandbox).
$.servers[*]
warn
paths-versioned
Paths should be versioned with a /v{N}/ prefix as Dexcom does.
$.paths.*~
error
paths-no-trailing-slash
Paths must not end with a trailing slash.
$.paths.*~
error
paths-no-query-string
Paths must not embed query strings; use parameters instead.
$.paths.*~
warn
paths-lower-camel-case
Path segments should use lowerCamelCase (e.g. dataRange) consistent with Dexcom's API.
$.paths.*~
error
operation-operationId-required
Every operation must define an operationId.
$.paths.*[get,put,post,delete,patch,options,head]
warn
operation-operationId-camel-case
operationIds must be camelCase (e.g. getEgvsV3, exchangeAuthorizationCode).
$.paths.*[get,put,post,delete,patch,options,head].operationId
error
operation-summary-required
Every operation must have a summary.
$.paths.*[get,put,post,delete,patch,options,head]
warn
operation-summary-title-case
Summaries should be Title Case (each significant word capitalized).
$.paths.*[get,put,post,delete,patch,options,head].summary
warn
operation-description-required
Every operation should include a description.
$.paths.*[get,put,post,delete,patch,options,head]
warn
operation-tags-required
Operations must declare at least one tag for documentation grouping.
$.paths.*[get,put,post,delete,patch,options,head]
info
tags-defined
A global tags array should be defined at the spec level.
$
warn
tags-title-case
Tag names should be Title Case (e.g. "Estimated Glucose Values").
$.tags[*].name
warn
tag-description-required
Each declared tag should have a description.
$.tags[*]
warn
parameter-description-required
Parameters must include a description.
$.paths.*.*.parameters[*]
warn
parameter-camel-case
Parameter names should use lowerCamelCase (e.g. startDate, endDate, lastSyncTime, client_id is permitted only for OAuth bodies).
$.paths.*.*.parameters[?(@.in!='header')].name
error
parameter-date-iso8601
startDate and endDate query parameters must be defined as date-time strings.
$.paths.*.*.parameters[?(@.name=='startDate' || @.name=='endDate')]
error
response-success-required
Every operation must define at least one 2xx response.
$.paths.*[get,put,post,delete,patch,options,head].responses
warn
response-description-required
Each response must have a description.
$.paths.*.*.responses[*]
warn
response-application-json
2xx responses should declare application/json content.
$.paths.*.*.responses['200','201','202'].content
warn
schema-property-camel-case
Schema properties should use lowerCamelCase (systemTime, displayTime, transmitterId, transmitterGeneration).
$.components.schemas.*.properties.*~
info
schema-datetime-format
Properties whose names end in "Time" or "Date" should declare format date-time.
$.components.schemas.*.properties[?(@property.match(/(Time|Date)$/))]
error
security-defined
A global security requirement must be declared.
$
error
security-scheme-oauth2
Dexcom uses OAuth 2.0; an OAuth2 security scheme must be defined.
$.components.securitySchemes
warn
security-oauth2-authorization-code
The OAuth2 scheme should expose the authorizationCode flow with offline_access scope.
$.components.securitySchemes[?(@.type=='oauth2')]
info
operation-microcks-extension
Each operation should declare x-microcks-operation for mock-server compatibility.
$.paths.*[get,put,post,delete,patch,options,head]
info
response-named-examples
Successful JSON responses should include named examples for Microcks.
$.paths.*.*.responses['200','201','202'].content.application/json