JSONPlaceholder · API Governance Rules
JSONPlaceholder API Rules
Spectral linting rules defining API design standards and conventions for JSONPlaceholder.
34 Rules
error 13
warn 18
info 3
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
delete
get
info
no
openapi
operation
parameter
paths
post
request
response
schema
servers
tag
Rules
warn
info-title-jsonplaceholder-prefix
Spec title should begin with "JSONPlaceholder".
$.info
error
info-description-required
Spec must include a non-empty description.
$.info
error
info-version-required
Spec must declare a version.
$.info
warn
info-license-required
Spec must include license info (JSONPlaceholder is MIT).
$.info
warn
openapi-version-3-0-3
Specs must target OpenAPI 3.0.3.
$.openapi
error
servers-https-required
All server URLs must use HTTPS.
$.servers[*].url
warn
servers-typicode-host
Production server URL must point at jsonplaceholder.typicode.com.
$.servers[*].url
error
paths-lowercase
Paths must be lowercase (collection nouns are plural lowercase).
$.paths.*~
error
paths-no-trailing-slash
Paths must not end with a trailing slash.
$.paths.*~
warn
paths-plural-resources
Top-level resources use plural nouns (posts, comments, albums, photos, todos, users).
$.paths.*~
error
operation-summary-required
Every operation must have a summary.
$.paths.*[get,post,put,patch,delete]
warn
operation-description-required
Every operation must have a description.
$.paths.*[get,post,put,patch,delete]
warn
operation-summary-jsonplaceholder-prefix
Every operation summary must start with "JSONPlaceholder".
$.paths.*[get,post,put,patch,delete].summary
error
operation-operationid-required
Every operation must declare an operationId.
$.paths.*[get,post,put,patch,delete]
warn
operation-operationid-camelcase
operationId must be camelCase.
$.paths.*[get,post,put,patch,delete].operationId
info
operation-operationid-verb-prefix
operationId should begin with a known verb (list/get/create/replace/update/delete).
$.paths.*[get,post,put,patch,delete].operationId
error
operation-tags-required
Every operation must declare at least one tag.
$.paths.*[get,post,put,patch,delete]
info
operation-microcks-extension
Every operation should declare x-microcks-operation for mock-server compatibility.
$.paths.*[get,post,put,patch,delete]
warn
tag-title-case
Global tag names must use Title Case (Posts, Comments, Albums, Photos, Todos, Users).
$.tags[*].name
warn
tag-description-required
Each global tag must include a description.
$.tags[*]
warn
parameter-description-required
Every parameter must have a description.
$.paths.*[get,post,put,patch,delete].parameters[*]
warn
parameter-camelcase
Parameter names must be camelCase (e.g. userId, postId, albumId).
$.paths.*[get,post,put,patch,delete].parameters[*].name
info
parameter-id-suffix
Identifier parameters should follow the {resource}Id pattern.
$.paths.*[get,post,put,patch,delete].parameters[?(@.in=='query')].name
error
request-body-json-content
Request bodies must accept application/json.
$.paths.*[post,put,patch].requestBody.content
error
response-success-required
Every operation must define a 2xx success response.
$.paths.*[get,post,put,patch,delete].responses
warn
response-description-required
Every response must have a description.
$.paths.*[get,post,put,patch,delete].responses.*
warn
response-json-content
Success responses must return application/json.
$.paths.*[get,post,put,patch,delete].responses[?(@property.match(/^2\d\d$/))].content
warn
schema-property-camelcase
Schema property names must be camelCase (matches the JSONPlaceholder JSON shape).
$.components.schemas.*.properties.*~
warn
schema-description-required
Top-level schemas must include a description.
$.components.schemas.*
error
schema-type-required
Top-level schemas must declare a type.
$.components.schemas.*
error
get-no-request-body
GET operations must not declare a request body.
$.paths.*.get
error
delete-no-request-body
DELETE operations must not declare a request body.
$.paths.*.delete
warn
post-put-patch-require-body
POST, PUT, and PATCH operations should declare a request body.
$.paths.*[post,put,patch]
warn
no-empty-descriptions
Descriptions must be non-empty when present.
$..description
Spectral Ruleset
Work with this as data
Every ruleset here is available over the APIs.io API and to AI agents over MCP.