OpenWeatherMap · API Governance Rules
OpenWeatherMap API Rules
Spectral linting rules defining API design standards and conventions for OpenWeatherMap.
11 Rules
error 1
warn 10
Rule Categories
openweathermap
Rules
warn
openweathermap-summary-required
Every operation must have a summary in Title Case.
$.paths.*[get,post,put,delete,patch]
warn
openweathermap-summary-title-case
Operation summaries should use Title Case (each major word capitalized).
$.paths.*[get,post,put,delete,patch].summary
warn
openweathermap-description-required
Every operation must have a description.
$.paths.*[get,post,put,delete,patch]
error
openweathermap-operationid-required
Every operation must have an operationId.
$.paths.*[get,post,put,delete,patch]
warn
openweathermap-operationid-camelcase
operationId values should be camelCase.
$.paths.*[get,post,put,delete,patch].operationId
warn
openweathermap-tags-required
Every operation must declare at least one tag.
$.paths.*[get,post,put,delete,patch]
warn
openweathermap-appid-required
Every operation must accept an appid query parameter for API key auth.
$.paths[*][get,post,put,delete,patch].parameters[?(@.name=='appid')]
warn
openweathermap-coord-lat-lon-required
Weather endpoints should accept lat and lon parameters.
$.paths['/weather','/forecast','/forecast/hourly','/forecast/daily','/forecast/climate','/air_pollution','/air_pollution/forecast','/air_pollution/history','/current','/timeline/1min','/timeline/15min','/timeline/1h','/timeline/1day'].get.parameters[*].name
warn
openweathermap-units-enum
The units parameter must be one of standard, metric, or imperial.
$.paths.*[get,post].parameters[?(@.name=='units')]
warn
openweathermap-security-appid
Specs should declare an appid apiKey security scheme.
$.components.securitySchemes
warn
openweathermap-error-responses
Operations should document 400, 401, and 429 error responses.
$.paths.*[get,post,put,delete,patch].responses