ipify · API Governance Rules
ipify API Rules
Spectral linting rules defining API design standards and conventions for ipify.
37 Rules
error 15
warn 17
info 5
Authorship not recorded
No authorship marker is recorded for this file. It is not presented as the provider's; it was most likely written by an API Evangelist pass before outputs were stamped.
Rule Categories
deprecation
example
get
info
ipify
openapi
operation
parameter
paths
response
schema
security
servers
tag
tags
Rules
error
info-title-required
Info object must define a title.
$.info
warn
info-title-prefix-ipify
Spec title should start with `ipify` for consistent provider branding.
$.info.title
error
info-description-required
Info object must include a description of the API.
$.info
warn
info-contact-required
Info object should include a contact for the provider.
$.info
warn
info-license-required
Info object should declare a license (MIT for the free API, Commercial for Geolocation).
$.info
error
openapi-version-3
All ipify specs must declare OpenAPI 3.x.
$.openapi
error
servers-required
A `servers` array must be defined at the document root.
$
error
servers-must-be-https
ipify endpoints are HTTPS-only. No `http://` server URLs allowed.
$.servers[*].url
warn
servers-description-required
Each server entry must explain which surface it points to (IPv4, IPv6, dual-stack, account utility, etc.).
$.servers[*]
error
paths-no-trailing-slash
Paths must not end with a trailing slash (except the root `/`).
$.paths
error
paths-no-query-strings
Paths must not contain query strings — express them as parameters.
$.paths
warn
paths-lowercase-segments
Path segments must be lowercase kebab-case (matches ipify's `/country`, `/country,city`, `/service/account-balance`).
$.paths
error
operation-operationId-required
Every operation must declare an `operationId`.
$.paths[*][get,post,put,patch,delete]
warn
operation-operationId-camelcase
operationId must be camelCase (e.g. `getPublicIp`, `getCountryLocation`, `getAccountBalance`).
$.paths[*][get,post,put,patch,delete].operationId
error
operation-summary-required
Every operation must declare a `summary`.
$.paths[*][get,post,put,patch,delete]
warn
operation-summary-prefix-ipify
Operation summary must start with `ipify ` for consistent provider branding.
$.paths[*][get,post,put,patch,delete].summary
warn
operation-description-required
Every operation must declare a `description`.
$.paths[*][get,post,put,patch,delete]
error
operation-tags-required
Every operation must declare at least one tag.
$.paths[*][get,post,put,patch,delete]
warn
operation-microcks-extension-required
Every operation must declare an `x-microcks-operation` extension for mock-server compatibility.
$.paths[*][get,post,put,patch,delete]
warn
tags-root-defined
A root `tags` array must enumerate every tag with a description.
$
warn
tags-title-case
Tag names must be Title Case (e.g. `IP Address`, `Geolocation`, `Account`).
$.tags[*].name
warn
tag-description-required
Every declared tag must include a description.
$.tags[*]
warn
parameter-description-required
Every parameter must include a description.
#Parameter
warn
parameter-camelcase
Query/path parameter names must be camelCase (matches ipify's `apiKey`, `ipAddress`, `reverseIp`, `escapedUnicode`).
$.paths[*][*].parameters[?(@.in == 'query' || @.in == 'path')].name
error
parameter-schema-required
Every parameter must declare a `schema` with a `type`.
$.paths[*][*].parameters[*]
error
response-2xx-required
Every operation must declare at least one 2xx success response.
$.paths[*][get,post,put,patch,delete].responses
warn
response-description-required
Every response must include a description.
$.paths[*][*].responses[*]
info
response-error-codes-geolocation
Geolocation operations should document 400, 401, 403, 422, and 429 error responses.
$.paths[/country,/country\,city,/country\,city\,vpn][get].responses
warn
schema-camelcase-properties
Schema property names must be camelCase (matches the Geolocation API's `postalCode`, `geonameId`, `escapedUnicode`).
$.components.schemas[*].properties
warn
schema-description-required
Every top-level component schema must include a description.
$.components.schemas[*]
error
schema-type-required
Every top-level component schema must declare a `type`.
$.components.schemas[*]
info
security-scheme-apikey-query
The Geolocation API authenticates with an `apiKey` query parameter (no other schemes are supported).
$.components.securitySchemes[*]
info
security-public-api-no-auth
The free public IP API (`api.ipify.org`) must not declare a security scheme — it is intentionally unauthenticated.
$.paths[/].get
error
get-no-request-body
GET operations must not declare a request body — both ipify APIs are GET-only.
$.paths[*].get
error
ipify-get-only-api
ipify exposes only GET operations. Reject any POST/PUT/PATCH/DELETE.
$.paths[*]
info
deprecation-documented
Deprecated operations and schemas must be marked with `deprecated: true` (e.g. the VPN/proxy block).
$..deprecated
info
example-encouraged
Schema properties should include `example` values to support mock-server scenarios.
$.components.schemas[*].properties[*]
Spectral Ruleset
Work with this as data
Every ruleset here is available over the APIs.io API and to AI agents over MCP.