Mindbody · API Governance Rules
Mindbody API Rules
Spectral linting rules defining API design standards and conventions for Mindbody.
44 Rules
error 16
warn 23
info 5
Rule Categories
delete
get
global
info
oas
operation
parameter
paths
post
request
response
schema
security
servers
tags
Rules
error
info-title-mindbody-prefix
API title must begin with "Mindbody".
$.info.title
error
info-description-required
API description must be present and meaningful (>= 60 chars).
$.info
warn
info-description-length
Description should be at least 60 characters.
$.info.description
warn
info-contact-required
Mindbody contact block must be present.
$.info
warn
info-license-required
License must be declared.
$.info
error
oas-version-3
Use OpenAPI 3.0.x.
$.openapi
error
servers-defined
At least one server URL must be defined.
$.servers
error
servers-https
All server URLs must use HTTPS.
$.servers[*].url
warn
servers-mindbody-host
Server URLs must point at api.mindbodyonline.com or push-api.mindbodyonline.com.
$.servers[*].url
warn
paths-version-prefix
Public API paths must include the /public/v6 prefix; Webhooks paths use /api/v1.
$.paths.*~
error
paths-no-trailing-slash
Paths must not end with a trailing slash.
$.paths.*~
error
paths-no-query-strings
Paths must not contain query strings.
$.paths.*~
warn
paths-lowercase-segments
Path segments must be lowercase (Mindbody convention).
$.paths.*~
error
operation-operationid-required
Every operation must have an operationId.
$.paths.*[get,post,put,patch,delete]
warn
operation-operationid-camelcase
operationId should use camelCase.
$.paths.*[get,post,put,patch,delete].operationId
warn
operation-operationid-verb-prefix
operationId should start with a verb (get, list, add, update, delete, send, check, validate, search, upsert, return).
$.paths.*[get,post,put,patch,delete].operationId
error
operation-summary-required
Every operation must have a summary.
$.paths.*[get,post,put,patch,delete]
warn
operation-summary-mindbody-prefix
Operation summaries must begin with "Mindbody".
$.paths.*[get,post,put,patch,delete].summary
warn
operation-description-required
Every operation must have a description.
$.paths.*[get,post,put,patch,delete]
error
operation-tags-required
Every operation must have at least one tag.
$.paths.*[get,post,put,patch,delete]
warn
tags-defined-globally
Top-level tags array must be defined.
$
warn
tags-name-titlecase
Tag names should use Title Case (e.g. "Cross Site", "User Token").
$.tags[*].name
warn
tags-description-required
Every tag should have a description.
$.tags[*]
warn
parameter-description-required
Every parameter should have a description.
$.paths.*[get,post,put,patch,delete].parameters[*]
warn
parameter-siteid-header
SiteId must travel in the header, not the query.
$.paths.*[get,post,put,patch,delete].parameters[?(@.name=='SiteId' || @.name=='siteId')]
error
parameter-apikey-not-in-query
API-Key must never appear as a query parameter.
$.paths.*[get,post,put,patch,delete].parameters[?(@.name=='API-Key' || @.name=='ApiKey' || @.name=='api_key')]
info
parameter-pagination-naming
Pagination uses `request.limit` and `request.offset` (Mindbody convention).
$.paths.*[get].parameters[?(@.in=='query' && (@.name=='limit' || @.name=='offset'))]
error
request-body-json
Request bodies must offer application/json.
$.paths.*[post,put,patch].requestBody.content
error
response-success-required
Every operation must define a 2xx response.
$.paths.*[get,post,put,patch,delete].responses
warn
response-401-defined
Operations should document 401 Unauthorized.
$.paths.*[get,post,put,patch,delete].responses
info
response-404-defined
Operations should document 404 Not Found.
$.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
schema-property-pascalcase
Mindbody JSON property names are PascalCase (e.g. ClientId, SiteId, Email).
$.components.schemas[*].properties.*~
info
schema-id-property-naming
Identifier properties should follow {Entity}Id PascalCase (ClientId, SiteId, StaffId).
$.components.schemas[*].properties[?(@property.match(/^[Ii]d$|^id_|^Id_/))]~
warn
schema-type-required
Schemas must declare `type`.
$.components.schemas.*
error
security-schemes-defined
At least one security scheme must be defined.
$.components.securitySchemes
error
security-apikey-header
Mindbody API key must travel in the `API-Key` request header.
$.components.securitySchemes[?(@.type=='apiKey')]
warn
security-oauth2-mindbody-urls
OAuth 2 flows must point at Mindbody Identity Service.
$.components.securitySchemes[?(@.type=='oauth2')].flows.authorizationCode
warn
global-security-defined
Global security requirement must be defined.
$
error
get-no-request-body
GET operations must not declare a request body.
$.paths.*.get
warn
delete-no-request-body
DELETE operations should not declare a request body.
$.paths.*.delete
info
post-has-body-or-explicit-query
POST operations should declare a request body when the operation mutates state.
$.paths.*.post
info
operation-microcks-extension
Every operation should carry an x-microcks-operation extension for mock-server compatibility.
$.paths.*[get,post,put,patch,delete]
warn
operation-deprecated-documented
Deprecated operations must explain the replacement in description.
$.paths.*[get,post,put,patch,delete][?(@.deprecated==true)]