Zebra Technologies · API Governance Rules
Zebra Technologies — sws api linting ruleset rules
Spectral linting rules defining API design standards and conventions for Zebra Technologies.
24 Rules
error 18
warn 6
Published by Zebra Technologies
Served by the provider at https://github.com/ZebraDevs/SWS-API_Linting_Ruleset/blob/7c42468b9859f2f1b160e9b589090b52f259bc58/.spectral.yml; the copy below was fetched from there.
Rule Categories
no
oas3
path
paths
properties
response
version
zebra
Rules
error
oas3-protocol-https-only
ALL requests MUST go through HTTPS protocol only
$.servers..url
error
oas3-security-section-required
The API contract MUST include a 'security' section at the root level
$
error
oas3-components-required
The API contract MUST include a 'components' section
$
error
oas3-security-schemes-required
The API contract MUST include 'securitySchemes' under components
$.components
warn
zebra-tags-description
All tags should have descriptions
$.tags[*]
error
response-should-have-body
All responses must include a content section
$.paths[*][*].responses[*]
error
zebra-api-version
API version must be specified in info.version
$.info
error
version-in-server-or-path
API should include version in server URL or path
$
error
oas3-no-get-request-body
GET requests MUST NOT have a request body
$.paths[*].get.requestBody
error
oas3-put-with-request-body
PUT requests MUST have a request body
$.paths[*].put
warn
oas3-not-post-to-get-info
POST should not be used for retrieving information
$.paths[*].post
error
oas3-request-support-json
Requests MUST support application/json media type
$.paths.[*].requestBody.content[?(@property.indexOf('json') === -1)]^
error
oas3-response-success-json
Success responses MUST be application/json
$.paths..responses[?(@property >= 200 && @property < 300 && @property != 204)].content[*]~
warn
paths-kebab-case
Paths should be kebab-case
$.paths[*]~
error
oas3-no-verbs-in-paths
API paths MUST be resource-focused and not include verbs
$.paths[*]~
error
no-file-extensions-in-paths
Paths must not include file extensions
$.paths[*]~
error
path-should-have-at-least-one-plural-noun
Each path should contain at least one plural noun segment
$.paths[*]~
error
path-should-not-include-api
The word 'api' should not appear in the path
$.paths[*]~
error
path-parameters-camelCase-alphanumeric
Path parameters MUST follow camelCase
$..parameters[?(@.in == 'path')].name
error
properties-camelCase-alphanumeric
JSON Schema properties MUST follow camelCase
$..properties[*]~
error
zebra-server-url
Server URL must be specified
$.servers
warn
zebra-server-description
Each server must have a description
$.servers[*]
warn
zebra-response-examples
Responses should include examples
$.paths[*][*].responses[*]
warn
zebra-schema-properties-description
Schema properties should have descriptions
$..properties[*]
Spectral Ruleset
Work with this as data
Every ruleset here is available over the APIs.io API and to AI agents over MCP.