Shopify Admin API · API Governance Rules

Shopify Admin API API Rules

Spectral linting rules defining API design standards and conventions for Shopify Admin API.

9 Rules error 3 warn 5 info 1
View Rules File View on GitHub

Rule Categories

shopify

Rules

warn
shopify-admin-path-version
Shopify Admin REST API paths must include the API version in the server URL, not the path
$.paths[*]~
info
shopify-admin-json-suffix
Shopify Admin REST API paths typically end with .json
$.paths[*]~
warn
shopify-admin-resource-naming
Shopify Admin REST API resource names should use plural snake_case
$.paths[*]~
error
shopify-admin-access-token-required
Shopify Admin REST API requires X-Shopify-Access-Token authentication
$.components.securitySchemes
error
shopify-admin-operation-ids
All Shopify Admin API operations must have unique operationIds
$.paths[*][get,post,put,delete,patch]
error
shopify-admin-response-200
GET operations must have a 200 response defined
$.paths[*].get
warn
shopify-admin-tag-defined
All operations must have at least one tag for grouping
$.paths[*][get,post,put,delete,patch]
warn
shopify-admin-path-parameter-names
Path parameters should use snake_case naming (e.g., product_id, customer_id)
$.paths[*].parameters[?(@.in == 'path')].name
warn
shopify-admin-no-trailing-slash
Shopify Admin API paths must not have trailing slashes
$.paths[*]~

Spectral Ruleset

Raw ↑
extends: spectral:oas
rules:
  shopify-admin-path-version:
    description: Shopify Admin REST API paths must include the API version in the server URL, not the path
    severity: warn
    given: "$.paths[*]~"
    then:
      function: pattern
      functionOptions:
        notMatch: "^/admin/api/"

  shopify-admin-json-suffix:
    description: Shopify Admin REST API paths typically end with .json
    severity: info
    given: "$.paths[*]~"
    then:
      function: pattern
      functionOptions:
        match: "\\.(json)$|\\{[a-z_]+\\}"

  shopify-admin-resource-naming:
    description: Shopify Admin REST API resource names should use plural snake_case
    severity: warn
    given: "$.paths[*]~"
    then:
      function: pattern
      functionOptions:
        match: "^/[a-z][a-z0-9_]*s(\\.json|/|$)"

  shopify-admin-access-token-required:
    description: Shopify Admin REST API requires X-Shopify-Access-Token authentication
    severity: error
    given: "$.components.securitySchemes"
    then:
      function: schema
      functionOptions:
        schema:
          type: object
          required:
            - AccessToken

  shopify-admin-operation-ids:
    description: All Shopify Admin API operations must have unique operationIds
    severity: error
    given: "$.paths[*][get,post,put,delete,patch]"
    then:
      field: operationId
      function: truthy

  shopify-admin-response-200:
    description: GET operations must have a 200 response defined
    severity: error
    given: "$.paths[*].get"
    then:
      field: responses.200
      function: truthy

  shopify-admin-tag-defined:
    description: All operations must have at least one tag for grouping
    severity: warn
    given: "$.paths[*][get,post,put,delete,patch]"
    then:
      field: tags
      function: truthy

  shopify-admin-path-parameter-names:
    description: Path parameters should use snake_case naming (e.g., product_id, customer_id)
    severity: warn
    given: "$.paths[*].parameters[?(@.in == 'path')].name"
    then:
      function: pattern
      functionOptions:
        match: "^[a-z][a-z0-9_]*$"

  shopify-admin-no-trailing-slash:
    description: Shopify Admin API paths must not have trailing slashes
    severity: warn
    given: "$.paths[*]~"
    then:
      function: pattern
      functionOptions:
        notMatch: "/$"

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/shopify-admin-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.