Polygon · API Governance Rules
Polygon API Rules
Spectral linting rules defining API design standards and conventions for Polygon.
21 Rules
error 4
warn 13
info 4
Rule Categories
polygon
Rules
warn
polygon-info-title-includes-polygon
Info title must include "Polygon" to identify provider.
$.info.title
warn
polygon-info-version-semver-or-numeric
Info version must be a simple semver or numeric string (e.g. "1.0").
$.info.version
warn
polygon-info-contact-required
Info object must include a contact.
$.info
warn
polygon-servers-rest-host
REST OpenAPI specs must use api.polygon.io.
$.servers[*].url
error
polygon-security-defined
A global security requirement must be declared.
$
warn
polygon-security-schemes-required
Both apiKeyQuery and bearerAuth schemes must be defined.
$.components.securitySchemes
warn
polygon-apikey-query-param-name
The API key query parameter must be named apiKey.
$.components.securitySchemes.apiKeyQuery
error
polygon-path-versioned
All paths must be versioned (start with /v1, /v2, or /v3).
$.paths
warn
polygon-path-no-trailing-slash
Paths must not have a trailing slash.
$.paths
warn
polygon-path-lowercase
Path segments should be lowercase (with optional dashes and braces).
$.paths
error
polygon-operation-id-required
Every operation must have an operationId.
$.paths[*][get,post,put,patch,delete]
warn
polygon-operation-id-camel-case
operationId must be lowerCamelCase.
$.paths[*][get,post,put,patch,delete].operationId
warn
polygon-operation-summary-title-case
Operation summaries should be in Title Case.
$.paths[*][get,post,put,patch,delete].summary
error
polygon-operation-tags-required
Each operation must declare at least one tag.
$.paths[*][get,post,put,patch,delete]
info
polygon-operation-description-recommended
Operations should include a description.
$.paths[*][get,post,put,patch,delete]
warn
polygon-parameter-name-snake-or-camel
Parameter names should be snake_case or lowerCamelCase.
$..parameters[*].name
warn
polygon-limit-parameter-bounds
A "limit" query parameter must define minimum and maximum.
$..parameters[?(@.name == 'limit' && @.in == 'query')]
info
polygon-response-status-field
Response wrapper schemas should expose a status property.
$.components.schemas[?(@property.endsWith('Response'))].properties
info
polygon-response-request-id
Response wrapper schemas should expose a request_id property.
$.components.schemas[?(@property.endsWith('Response'))].properties
info
polygon-pagination-next-url
Paginated responses should expose a next_url property as a URI string.
$.components.schemas[?(@property.endsWith('Response'))].properties.next_url
warn
polygon-tag-title-case
Tag names should be Title Case (no spaces, e.g. CorporateActions).
$.tags[*].name