Mojang · API Governance Rules
Mojang API Rules
Spectral linting rules defining API design standards and conventions for Mojang.
48 Rules
error 12
warn 24
info 12
Rules by declared severity: the level each rule assigns to a violation. These are not lint results.
Generated by API Evangelist
Written by API Evangelist tooling for Mojang's APIs. It is a starting point, not a ruleset Mojang publishes or enforces.
Rule Categories
error
general
http
info
openapi
operation
parameter
paths
query
request
response
schema
security
servers
tag
Rules
error
info-title-required
Every Mojang spec must declare info.title.
$.info
warn
info-title-mojang-or-minecraft-prefix
Spec titles must start with "Mojang " or "Minecraft Services " to identify which host surface the document describes.
$.info.title
warn
info-description-required
Spec info must include a meaningful description.
$.info
error
info-version-required
Spec version must be declared.
$.info
info
info-contact-required
Provide a contact block pointing to www.minecraft.net.
$.info
info
info-license-required
Spec must reference Mojang's brand-and-asset usage guidelines.
$.info
error
openapi-version-3
Mojang specs are emitted as OpenAPI 3.0.x.
$.openapi
error
servers-defined
Every spec must declare at least one server URL.
$
error
servers-https-required
Mojang only serves over HTTPS.
$.servers[*].url
warn
servers-canonical-mojang-host
The server URL must match one of the documented Mojang hosts (api.mojang.com, sessionserver.mojang.com, api.minecraftservices.com).
$.servers[*].url
warn
servers-description-required
Each server entry must carry a description.
$.servers[*]
warn
paths-kebab-case
Path segments use lowercase kebab-case (or template parameters).
$.paths[*]~
error
paths-no-trailing-slash
Paths must not end with a trailing slash.
$.paths[*]~
error
paths-no-query-string
Paths must not embed query strings; use parameters instead.
$.paths[*]~
error
operation-operationid-required
Every operation must declare an operationId.
$.paths[*][get,post,put,patch,delete]
warn
operation-operationid-camel-case
operationId must use camelCase.
$.paths[*][get,post,put,patch,delete].operationId
warn
operation-operationid-verb-prefix
operationId must start with one of the Mojang verb prefixes (get, lookup, change, update, report, reset, show, hide, join, login, check, has).
$.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-title-case
Summaries are Title Case (first word capitalised, every significant word capitalised). Acronyms such as UUID are preserved.
$.paths[*][get,post,put,patch,delete].summary
warn
operation-description-required
Every operation must declare a description.
$.paths[*][get,post,put,patch,delete]
warn
operation-tags-required
Every operation must be tagged.
$.paths[*][get,post,put,patch,delete]
info
operation-microcks-extension-required
Every operation must include x-microcks-operation for mock compatibility.
$.paths[*][get,post,put,patch,delete]
warn
tag-pascal-case
Tags are PascalCase capability names.
$.tags[*].name
warn
tag-description-required
Each global tag must carry a description.
$.tags[*]
warn
parameter-description-required
Every parameter must declare a description.
$.paths[*][get,post,put,patch,delete].parameters[*]
error
parameter-schema-required
Every parameter must declare a schema with a type.
$.paths[*][get,post,put,patch,delete].parameters[*]
info
parameter-name-camel-case
Query, path and header parameter names use camelCase (uuid, username, serverId, prevent_proxy is a legacy exception). Headers may use hyphen-case.
$.paths[*][get,post,put,patch,delete].parameters[?(@.in=='query' || @.in=='path')]
info
parameter-example-encouraged
Provide an example for each parameter to support Microcks mocks.
$.paths[*][get,post,put,patch,delete].parameters[*]
warn
request-body-json-content
Request bodies must include an application/json media type.
$.paths[*][post,put,patch].requestBody.content
info
request-body-description-required
Request bodies must declare a description.
$.paths[*][post,put,patch].requestBody
error
response-success-required
Every operation must declare at least one 2xx response.
$.paths[*][get,post,put,patch,delete].responses
warn
response-description-required
Every response must declare a description.
$.paths[*][get,post,put,patch,delete].responses.*
info
response-401-on-authenticated
Authenticated paths must document 401 to make missing-token behaviour explicit for clients.
$.paths[*][get,post,put,patch,delete][?(@.security)]
info
response-429-encouraged
Mojang rate limits aggressively; document 429 where appropriate.
$.paths[*][get,post,put,patch,delete].responses
warn
schema-name-pascal-case
Component schema names use PascalCase.
$.components.schemas[*]~
info
schema-property-camel-case
JSON property names use camelCase across the Mojang surface (id, name, capeId, profileActions, lastUpdated, ...). Legacy snake_case such as access_token in the OAuth response is tolerated; otherwise stick to camelCase.
$.components.schemas[*].properties[*]~
warn
schema-description-required
Top-level schemas must carry a description.
$.components.schemas[*]
warn
schema-property-type-required
Each non-$ref schema property must declare a type.
$.components.schemas[*].properties[?(!@property.match(/^\$ref$/))][?(!@.$ref)]
warn
security-scheme-defined
Bearer scheme must be defined when authenticated paths exist.
$.components.securitySchemes
info
security-bearer-format
When defined, the bearer scheme must use JWT bearerFormat.
$.components.securitySchemes.bearerAuth
error
http-get-no-request-body
GET operations must not declare a request body.
$.paths[*].get
warn
http-delete-returns-204-or-200
DELETE operations must return 200 or 204.
$.paths[*].delete.responses
warn
general-no-empty-descriptions
Descriptions must not be empty strings.
$..description
info
general-deprecation-documented
Deprecated operations must be flagged with `deprecated: true` and explain the migration path in their description (e.g. /user/profiles/ {uuid}/names returns 410 Gone).
$.paths[*][get,post,put,patch,delete][?(@.deprecated == true)]
warn
query-params-casing
Query parameters should be snake_case (the dominant convention in this API).
$.paths[*][get,post,put,patch,delete].parameters[?(@.in=='query')]
warn
schema-names-casing
Component schema names should be PascalCase (the dominant convention in this API).
$.components.schemas
info
schema-properties-casing
Schema properties should be snake_case (the dominant convention in this API).
$.components.schemas[*].properties
warn
error-schema-defined
A shared error schema (Error) should be defined for error payloads.
$.components.schemas
Spectral Ruleset
Work with this as data
Every ruleset here is available over the APIs.io API and to AI agents over MCP.