Etsy · API Governance Rules
Etsy API Rules
Spectral linting rules defining API design standards and conventions for Etsy.
54 Rules
error 17
warn 26
info 11
Rule Categories
api
deprecation
examples
global
info
no
oauth2
openapi
operation
parameter
paths
post
request
response
schema
security
servers
Rules
error
info-title-etsy-prefix
info.title MUST start with 'Etsy' to match the published spec name.
$.info.title
warn
info-description-required
info.description is required and SHOULD be at least 60 characters.
$.info
error
info-version-required
info.version is required (Etsy publishes 3.0.0 today).
$.info
warn
info-license-required
Provide license info pointing at the Etsy API Terms of Use.
$.info
warn
error
openapi-version-3
Spec MUST be OpenAPI 3.0.x (Etsy publishes 3.0.2).
$.openapi
error
servers-defined
Servers array MUST be defined.
$
error
servers-https-only
All server URLs MUST use HTTPS.
$.servers[*].url
warn
servers-etsy-host
Server host MUST be openapi.etsy.com or api.etsy.com.
$.servers[*].url
warn
servers-description-required
Each server entry SHOULD have a description.
$.servers[*]
error
paths-v3-application-prefix
Every path MUST live under /v3/application as published by Etsy.
$.paths.*~
warn
paths-kebab-case
Path segments MUST be lowercase kebab-case (alphanumerics + hyphen).
$.paths.*~
error
paths-no-trailing-slash
Paths MUST NOT end with a trailing slash.
$.paths.*~
error
paths-no-query-string
Path keys MUST NOT contain query strings.
$.paths.*~
warn
paths-path-param-snake-case
Path parameters MUST be snake_case (e.g. shop_id, listing_id).
$.paths.*~
error
operation-operationId-required
Every operation MUST have an operationId.
$.paths.*[get,put,post,delete,patch,options,head]
warn
operation-operationId-camel-case
operationId MUST be camelCase.
$.paths.*[get,put,post,delete,patch,options,head].operationId
warn
operation-summary-required
Every operation MUST have a summary.
$.paths.*[get,put,post,delete,patch,options,head]
warn
operation-summary-etsy-prefix
Operation summary MUST be prefixed with 'Etsy '.
$.paths.*[get,put,post,delete,patch,options,head].summary
warn
operation-description-required
Every operation MUST have a description.
$.paths.*[get,put,post,delete,patch,options,head]
warn
operation-tags-required
Every operation MUST be tagged.
$.paths.*[get,put,post,delete,patch,options,head]
info
operation-x-microcks-required
Every operation SHOULD declare x-microcks-operation for mock-server compatibility.
$.paths.*[get,put,post,delete,patch,options,head]
warn
global-tags-defined
Global tags array MUST be defined at the document root.
$
info
global-tags-description-required
Each global tag SHOULD have a description.
$.tags[*]
warn
parameter-description-required
Every parameter MUST have a description.
$.paths.*[get,put,post,delete,patch,options,head].parameters[*]
warn
parameter-name-snake-case
Parameter names MUST be snake_case (matches Etsy's published convention).
$.paths.*[get,put,post,delete,patch,options,head].parameters[*].name
error
parameter-schema-required
Every parameter MUST have a schema with a type.
$.paths.*[get,put,post,delete,patch,options,head].parameters[*]
info
parameter-pagination-limit-offset
Use 'limit' and 'offset' for pagination (Etsy's published convention).
$.paths.*[get,put,post,delete,patch,options,head].parameters[?(@.in=="query")].name
error
parameter-api-key-in-header
API keys MUST be carried in the x-api-key header, never in query params.
$.paths.*[get,put,post,delete,patch,options,head].parameters[?(@.in=="query")].name
info
request-body-description-required
Request bodies SHOULD have a description.
$.paths.*[get,put,post,delete,patch,options,head].requestBody
warn
request-body-content-type
Request bodies MUST declare application/json or application/x-www-form-urlencoded.
$.paths.*[get,put,post,delete,patch,options,head].requestBody.content
error
response-2xx-required
Every operation MUST define at least one 2xx response.
$.paths.*[get,put,post,delete,patch,options,head].responses
warn
response-400-on-write
Write operations (POST/PUT/PATCH/DELETE) SHOULD document a 400 response.
$.paths.*[post,put,patch,delete].responses
warn
response-401-required
Every operation SHOULD document a 401 response (auth-gated API).
$.paths.*[get,put,post,delete,patch,options,head].responses
info
response-403-required
Every operation SHOULD document a 403 response (scope-gated).
$.paths.*[get,put,post,delete,patch,options,head].responses
info
response-404-on-resource
Operations with path parameters SHOULD document a 404 response.
$.paths[?(@property.match(/\{[a-z_]+\}/))][get,put,post,delete,patch].responses
info
response-500-required
Every operation SHOULD document a 500 response.
$.paths.*[get,put,post,delete,patch,options,head].responses
error
response-description-required
Every response MUST have a description.
$.paths.*[get,put,post,delete,patch,options,head].responses[*]
warn
response-content-type
Response bodies MUST be application/json.
$.paths.*[get,put,post,delete,patch,options,head].responses[*].content
warn
schema-property-snake-case
Schema property names MUST be snake_case (Etsy's published convention).
$.components.schemas[*].properties[*]~
warn
schema-type-required
Schemas MUST declare a type.
$.components.schemas[*]
info
schema-id-naming
Identifier properties SHOULD follow {entity}_id naming.
$.components.schemas[*].properties[?(@.description && @property.match(/[Ii]dentifier/))]~
error
global-security-defined
Global security MUST be declared.
$
error
api-key-scheme-required
An api_key security scheme (x-api-key header) MUST be defined.
$.components.securitySchemes.api_key
error
api-key-header-name
The api_key scheme MUST use the x-api-key header.
$.components.securitySchemes.api_key
warn
oauth2-scheme-required
An oauth2 security scheme MUST be defined for user-scoped operations.
$.components.securitySchemes.oauth2
warn
oauth2-authorization-code-flow
OAuth2 MUST expose an authorizationCode flow.
$.components.securitySchemes.oauth2.flows
warn
security-scheme-description-required
Each security scheme MUST be documented with a description.
$.components.securitySchemes[*]
error
no-get-body
GET operations MUST NOT have a request body.
$.paths.*.get
warn
no-delete-body
DELETE operations SHOULD NOT have a request body.
$.paths.*.delete
info
post-put-request-body
POST and PUT operations SHOULD declare a request body.
$.paths.*[post,put]
warn
no-empty-descriptions
Descriptions MUST NOT be empty strings.
$..description
info
deprecation-documented
Deprecated operations SHOULD document the replacement in description.
$.paths.*[?(@.deprecated==true)]
info
examples-encouraged
Operations SHOULD include at least one example for their default 2xx response.
$.paths.*[get,put,post,delete,patch,options,head].responses["200","201","202","204"].content[*]