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.
View Rules File View on GitHub

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

zebra-technologies-sws-api-linting-ruleset-spectral-rules.yml Raw ↑
# harvested from https://github.com/ZebraDevs/SWS-API_Linting_Ruleset/blob/7c42468b9859f2f1b160e9b589090b52f259bc58/.spectral.yml on 2026-10-09 — a Spectral ruleset published in the provider's own GitHub repository (ZebraDevs/SWS-API_Linting_Ruleset); found by GitHub code search, fetched verbatim
x-method: harvested
x-stamped: 2026-10-09
x-source-url: https://github.com/ZebraDevs/SWS-API_Linting_Ruleset/blob/7c42468b9859f2f1b160e9b589090b52f259bc58/.spectral.yml
# Zebra Technologies Shared API Style Rules
# Version: 1.0.0
# Description: Centralized Spectral ruleset for all Zebra Technologies APIs
# Last Updated: November 2025

extends: spectral:oas

documentationUrl: https://confluence.zebra.com/spaces/SSAS/pages/34043

rules:
  # ========================================
  # SECURITY RULES
  # ========================================
  
  oas3-protocol-https-only: 
    description: "ALL requests MUST go through HTTPS protocol only"
    formats: [oas3]
    severity: error
    message: "Servers MUST be HTTPS and no other protocol is allowed."
    given: $.servers..url
    then:
      function: pattern
      functionOptions:
        match: "/^https:/"

  oas3-security-section-required:
    description: "The API contract MUST include a 'security' section at the root level"
    severity: error
    formats: [oas2, oas3]
    given: "$"
    then:
      field: "security"
      function: truthy

  oas3-components-required:
    description: "The API contract MUST include a 'components' section"
    severity: error
    formats: [oas2, oas3]
    given: "$"
    then:
      field: "components"
      function: truthy

  oas3-security-schemes-required:
    description: "The API contract MUST include 'securitySchemes' under components"
    severity: error
    formats: [oas2, oas3]
    given: "$.components"
    then:
      field: "securitySchemes"
      function: truthy

  # ========================================
  # DOCUMENTATION RULES
  # ========================================
  
  info-contact: error
  info-description: error
  operation-description: error
  operation-operationId: error
  operation-operationId-unique: error
  operation-success-response: error
  operation-tag-defined: error

  zebra-tags-description:
    description: "All tags should have descriptions"
    severity: warn
    given: $.tags[*]
    then:
      field: description
      function: truthy

  response-should-have-body:
    description: "All responses must include a content section"
    message: "Response for status code '{{property}}' is missing a content section"
    severity: error
    given: $.paths[*][*].responses[*]
    then:
      field: content
      function: truthy

  # ========================================
  # VERSIONING RULES
  # ========================================
  
  zebra-api-version:
    description: "API version must be specified in info.version"
    severity: error
    given: $.info
    then:
      field: version
      function: truthy

  version-in-server-or-path:
    description: "API should include version in server URL or path"
    message: "Neither server URL nor path contains a version number (e.g., /v1/, /v2/)"
    severity: error
    given: "$"
    then:
      function: pattern
      functionOptions:
        match: "(\\/v[0-9]+(\\/|$)|\"url\":\\s*\"[^\"]*\\/v[0-9]+[^\"]*\")"

  # ========================================
  # HTTP METHOD RULES
  # ========================================
  
  oas3-no-get-request-body:
    description: "GET requests MUST NOT have a request body"
    severity: error
    formats: [oas2, oas3]
    given: "$.paths[*].get.requestBody"
    then:
      function: falsy

  oas3-put-with-request-body:
    description: "PUT requests MUST have a request body"
    severity: error
    formats: [oas2, oas3]
    given: "$.paths[*].put"
    then:
      field: "requestBody"
      function: truthy

  oas3-not-post-to-get-info:
    description: "POST should not be used for retrieving information"
    severity: warn
    formats: [oas2, oas3]
    given: "$.paths[*].post"
    then:
      field: "summary"
      function: pattern
      functionOptions:
        notMatch: "(retrieve|fetch|get|read)"

  # ========================================
  # CONTENT TYPE RULES
  # ========================================
  
  oas3-request-support-json:
    description: "Requests MUST support application/json media type"
    formats: [oas3]
    severity: error
    given: $.paths.[*].requestBody.content[?(@property.indexOf('json') === -1)]^
    then:
      function: falsy

  oas3-response-success-json:
    description: "Success responses MUST be application/json"
    severity: error
    given: $.paths..responses[?(@property >= 200 && @property < 300 && @property != 204)].content[*]~
    formats: [oas3]
    then:
      function: enumeration
      functionOptions:
        values:
          - application/json

  # ========================================
  # PATH AND NAMING RULES
  # ========================================
  
  paths-kebab-case:
    description: "Paths should be kebab-case"
    message: "Path should be kebab-case (lowercase with hyphens)"
    severity: warn
    given: $.paths[*]~
    then:
      function: pattern
      functionOptions:
        match: "^(\/|[a-z0-9-.]+|{[a-zA-Z0-9_]+})+$"

  oas3-no-verbs-in-paths:
    description: "API paths MUST be resource-focused and not include verbs"
    severity: error
    given: $.paths[*]~
    then:
      function: pattern
      functionOptions:
        notMatch: "\\b(get|update|create|delete|fetch|retrieve|search|list)\\b"

  no-file-extensions-in-paths:
    description: "Paths must not include file extensions"
    severity: error
    given: $.paths[*]~
    then:
      function: pattern
      functionOptions:
        notMatch: "\\.(json|xml|html|txt)$"

  path-should-have-at-least-one-plural-noun:
    description: "Each path should contain at least one plural noun segment"
    severity: error
    given: $.paths[*]~
    then:
      function: pattern
      functionOptions:
        match: "(?<=/)[a-zA-Z0-9-]+s(?=/|$)"

  path-should-not-include-api:
    description: "The word 'api' should not appear in the path"
    severity: error
    given: $.paths[*]~
    then:
      function: pattern
      functionOptions:
        notMatch: "(?<=/)api(?=/|$)"

  # ========================================
  # PARAMETER NAMING RULES
  # ========================================
  
  path-parameters-camelCase-alphanumeric:
    description: "Path parameters MUST follow camelCase"
    severity: error
    given: $..parameters[?(@.in == 'path')].name
    then:
      function: pattern
      functionOptions:
        match: "^[a-z][a-zA-Z0-9]+$"

  properties-camelCase-alphanumeric:
    description: "JSON Schema properties MUST follow camelCase"
    severity: error
    given: $..properties[*]~
    then:
      function: pattern
      functionOptions:
        match: "^[a-z$_][a-zA-Z0-9$_]*$"

  # ========================================
  # ZEBRA-SPECIFIC RULES
  # ========================================
  
  zebra-server-url:
    description: "Server URL must be specified"
    severity: error
    given: $.servers
    then:
      function: truthy

  zebra-server-description:
    description: "Each server must have a description"
    severity: warn
    given: $.servers[*]
    then:
      field: description
      function: truthy

  zebra-response-examples:
    description: "Responses should include examples"
    severity: warn
    given: $.paths[*][*].responses[*]
    then:
      field: examples
      function: truthy

  zebra-schema-properties-description:
    description: "Schema properties should have descriptions"
    severity: warn
    given: $..properties[*]
    then:
      field: description
      function: truthy

Work with this as data

Every ruleset here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for spectral rules

4 MCP tools reach this
  • find_rulesBrowse and filter every ruleset in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This ruleset
curl "https://apis.io/api/v1/rules/zebra-technologies-sws-api-linting-ruleset-spectral-rules"
All spectral rules
curl "https://apis.io/api/v1/rules?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.