IPinfo · API Governance Rules
IPinfo API Rules
Spectral linting rules defining API design standards and conventions for IPinfo.
24 Rules
error 3
warn 19
info 2
Rule Categories
ipinfo
Rules
warn
ipinfo-info-contact
Info object should specify a contact for support.
$.info
warn
ipinfo-info-license
Info object should specify a license.
$.info
warn
ipinfo-info-version-semver
Info version should follow semantic versioning.
$.info.version
warn
ipinfo-server-uses-api-subdomain
Servers should target the api.ipinfo.io host (or its v4/v6 variants).
$.servers[*].url
error
ipinfo-security-schemes-defined
Specs must define at least one security scheme (Basic, Bearer, or ApiKey).
$.components.securitySchemes
warn
ipinfo-operation-has-security
Every operation should declare an explicit security requirement.
$.paths[*][get,post,put,patch,delete]
warn
ipinfo-path-no-trailing-slash
Paths should not have trailing slashes (except root).
$.paths
warn
ipinfo-operation-id-camel
operationId should be camelCase (e.g. getInformationByIp).
$.paths[*][get,post,put,patch,delete].operationId
error
ipinfo-operation-has-tag
Every operation should declare at least one tag.
$.paths[*][get,post,put,patch,delete]
warn
ipinfo-operation-single-tag
IPinfo operations carry exactly one tag.
$.paths[*][get,post,put,patch,delete].tags
error
ipinfo-operation-has-summary
Every operation should have a summary.
$.paths[*][get,post,put,patch,delete]
warn
ipinfo-operation-has-description
Every operation should have a description.
$.paths[*][get,post,put,patch,delete]
warn
ipinfo-summary-title-case
Operation summaries should be Title Case and start with IPinfo.
$.paths[*][get,post,put,patch,delete].summary
warn
ipinfo-summary-no-trailing-period
Operation summaries should not end with a period.
$.paths[*][get,post,put,patch,delete].summary
warn
ipinfo-response-has-200
GET operations should declare a 200 response.
$.paths[*].get.responses
warn
ipinfo-response-has-429
Operations should declare a 429 Too Many Requests response.
$.paths[*][get,post].responses
warn
ipinfo-response-json-media
Responses should use application/json content type.
$.paths[*][get,post].responses[200].content
warn
ipinfo-parameter-has-description
All parameters should have a description.
$.paths[*][*].parameters[*]
warn
ipinfo-path-parameter-snake-case
Path parameter names should be snake_case (e.g. ip, asn, field).
$.paths[*][*].parameters[?(@.in=='path')].name
warn
ipinfo-schema-property-snake-case
Schema property names should be snake_case.
$.components.schemas[*].properties
warn
ipinfo-schema-has-type
All schemas should declare a type.
$.components.schemas[*]
info
ipinfo-schema-has-example
Top-level response schemas should include an example.
$.components.schemas[?(@property.match(/Response$/))]
warn
ipinfo-tags-declared-globally
Tags should be declared globally with a description.
$.tags
info
ipinfo-global-tag-has-description
Each globally declared tag should have a description.
$.tags[*]