Flipdish · API Governance Rules

Flipdish — spectral rules rules

Spectral linting rules defining API design standards and conventions for Flipdish.

32 Rules error 16 warn 16
Published by Flipdish Served by the provider at https://github.com/flipdishbytes/spectral-rules/blob/a7004f6615c93c9017c310e8e20543b1100cb602/.spectral.yaml; the copy below was fetched from there.
View Rules File View on GitHub

Rule Categories

allowed authorization beta camel case delete error expand explicit json name naming no operation plural post public resource response simple unique uri url valid

Rules

error
operation-summary
All operations must have a summary
$.paths[*][*]
error
operation-description
All operations must have a description
$.paths[*][*]
error
error-format
4xx and 5xx responses must include an 'error' object with message and code
$.paths[*][*].responses[400,401,403,404,409,414,429,500].content['application/json'].schema
error
allowed-server-urls
Only Flipdish production domains should be in the server URLs
$.servers[*].url
warn
naming-path-segments
Path segments should be lowerCamelCase
$.paths
error
response-status-codes
Only approved status codes should be used
$.paths[*][*].responses
error
valid-contact-email
The contact email must be help@flipdish.com
$.info.contact.email
warn
beta-description
Beta endpoints must include a warning in the description
$.paths[*][get,post,put,delete]
error
url-pattern-structure
URLs must follow the pattern /{grouping}/orgs/{orgId}/{path-to-resource}
$.paths
error
no-api-in-path
URL paths should not include 'api' in the path
$.paths
warn
plural-resource-collections
Resource collections should use plural names
$.paths
error
allowed-http-methods
Only GET, POST, DELETE methods are allowed
$.paths[*]
error
no-put-patch-methods
PUT and PATCH methods are not allowed
$.paths[*]
error
response-data-wrapper
Successful responses must include a 'data' field
$.paths[*][*].responses[200,201].content['application/json'].schema
error
post-create-status
POST operations that create resources must return 201
$.paths[*].post
warn
delete-no-content-status
DELETE operations should return 204 No Content
$.paths[*].delete
warn
case-insensitive-query-params
Query parameters should be documented as case insensitive
$.paths[*][*].parameters[*]
warn
name-contains-pattern
Simple search endpoints should use 'nameContains' parameter
$.paths[*][get].parameters[*]
warn
no-type-in-field-names
Field names should not include type or format information
$.components.schemas[*].properties
warn
camel-case-field-names
Field names should use camelCase
$.components.schemas[*].properties
warn
public-id-format
Public facing IDs should follow the format [prefix][incrementing integer]
$.components.schemas[*].properties.*
warn
authorization-header
Operations should use FD-Authorization header from Cookie
$.paths[*][*].security
error
no-global-versioning
Global path-based versioning is not allowed
$.paths
warn
simple-version-numbers
Version numbers should be simple (v1, v2) not detailed (v1.0, v2.0)
$.paths
error
json-content-type
Responses should use application/json content type
$.paths[*][*].responses[*].content
warn
explicit-types
Request and response schemas should be explicitly defined
$.paths[*][*]
error
unique-operation-ids
All operations must have unique operationId
$.paths[*][*]
error
operation-tags
All operations must have at least one tag
$.paths[*][*]
warn
response-examples
Responses should include examples
$.paths[*][*].responses[200,201].content['application/json']
warn
uri-length-validation
URLs should not exceed 2083 characters
$.paths
warn
expand-parameter-documentation
Endpoints with expandable resources should document the expand parameter
$.paths[*][get].parameters[*]
warn
resource-state-modeling
APIs should model resource state, not behavior
$.paths[*][*]

Spectral Ruleset

Raw ↑
# harvested from https://github.com/flipdishbytes/spectral-rules/blob/a7004f6615c93c9017c310e8e20543b1100cb602/.spectral.yaml on 2026-10-09 — a Spectral ruleset published in the provider's own GitHub repository (flipdishbytes/spectral-rules); found by GitHub code search, fetched verbatim
x-method: harvested
x-stamped: 2026-10-09
x-source-url: https://github.com/flipdishbytes/spectral-rules/blob/a7004f6615c93c9017c310e8e20543b1100cb602/.spectral.yaml
extends: ["spectral:oas", "spectral:asyncapi"]

rules:
  operation-summary:
    description: "All operations must have a summary"
    severity: error
    given: "$.paths[*][*]"
    then:
      field: summary
      function: truthy

  operation-description:
    description: "All operations must have a description"
    severity: error
    given: "$.paths[*][*]"
    then:
      field: description
      function: truthy

  error-format:
    description: "4xx and 5xx responses must include an 'error' object with message and code"
    severity: error
    given: "$.paths[*][*].responses[400,401,403,404,409,414,429,500].content['application/json'].schema"
    then:
      field: properties.error
      function: truthy

  allowed-server-urls:
    description: "Only Flipdish production domains should be in the server URLs"
    severity: error
    given: "$.servers[*].url"
    then:
      function: pattern
      functionOptions:
        match: "^https://api\\.flipdish\\.co($|/)"

  naming-path-segments:
    description: "Path segments should be lowerCamelCase"
    severity: warn
    given: "$.paths"
    then:
      function: pattern
      functionOptions:
        match: "^/([a-z]+(?:[A-Z][a-z0-9]*)*/?)*$"

  response-status-codes:
    description: "Only approved status codes should be used"
    severity: error
    given: "$.paths[*][*].responses"
    then:
      field: "@key"
      function: enumeration
      functionOptions:
        values: ["200", "201", "204", "400", "401", "403", "404", "409", "414", "429", "500"]
  
  valid-contact-email:
    description: "The contact email must be help@flipdish.com"
    severity: error
    given: "$.info.contact.email"
    then:
      function: pattern
      functionOptions:
        match: "^help@flipdish\\.com$"

  beta-description:
    description: "Beta endpoints must include a warning in the description"
    severity: warn
    given: "$.paths[*][get,post,put,delete]"
    then:
      field: description
      function: pattern
      functionOptions:
        match: ".*Beta.*"

  # URL Pattern and Structure Rules
  url-pattern-structure:
    description: "URLs must follow the pattern /{grouping}/orgs/{orgId}/{path-to-resource}"
    severity: error
    given: "$.paths"
    then:
      function: pattern
      functionOptions:
        match: "^/([a-z]+(?:[A-Z][a-z0-9]*)*)/orgs/\\{[^}]+\\}(/[a-z]+(?:[A-Z][a-z0-9]*)*)*$"

  no-api-in-path:
    description: "URL paths should not include 'api' in the path"
    severity: error
    given: "$.paths"
    then:
      function: pattern
      functionOptions:
        match: "^(?!.*/api/).*$"

  plural-resource-collections:
    description: "Resource collections should use plural names"
    severity: warn
    given: "$.paths"
    then:
      function: pattern
      functionOptions:
        match: "^/([a-z]+(?:[A-Z][a-z0-9]*)*)/orgs/\\{[^}]+\\}/([a-z]+(?:[A-Z][a-z0-9]*)*s?)(/\\{[^}]+\\})*$"

  # HTTP Method Rules
  allowed-http-methods:
    description: "Only GET, POST, DELETE methods are allowed"
    severity: error
    given: "$.paths[*]"
    then:
      field: "@key"
      function: enumeration
      functionOptions:
        values: ["get", "post", "delete"]

  no-put-patch-methods:
    description: "PUT and PATCH methods are not allowed"
    severity: error
    given: "$.paths[*]"
    then:
      field: "@key"
      function: enumeration
      functionOptions:
        values: ["get", "post", "delete"]

  # Response Structure Rules
  response-data-wrapper:
    description: "Successful responses must include a 'data' field"
    severity: error
    given: "$.paths[*][*].responses[200,201].content['application/json'].schema"
    then:
      field: properties.data
      function: truthy

  # Status Code Rules
  post-create-status:
    description: "POST operations that create resources must return 201"
    severity: error
    given: "$.paths[*].post"
    then:
      field: responses
      function: schema
      functionOptions:
        schema:
          type: object
          required: ["201"]

  delete-no-content-status:
    description: "DELETE operations should return 204 No Content"
    severity: warn
    given: "$.paths[*].delete"
    then:
      field: responses
      function: schema
      functionOptions:
        schema:
          type: object
          required: ["204"]

  # Query Parameter Rules
  case-insensitive-query-params:
    description: "Query parameters should be documented as case insensitive"
    severity: warn
    given: "$.paths[*][*].parameters[*]"
    then:
      field: description
      function: pattern
      functionOptions:
        match: ".*[Cc]ase [Ii]nsensitive.*"

  name-contains-pattern:
    description: "Simple search endpoints should use 'nameContains' parameter"
    severity: warn
    given: "$.paths[*][get].parameters[*]"
    then:
      field: name
      function: pattern
      functionOptions:
        match: "^nameContains$"

  # Field Naming Rules
  no-type-in-field-names:
    description: "Field names should not include type or format information"
    severity: warn
    given: "$.components.schemas[*].properties"
    then:
      function: pattern
      functionOptions:
        match: "^(?!.*(?:Iso|Type|Format|Code)).*$"

  camel-case-field-names:
    description: "Field names should use camelCase"
    severity: warn
    given: "$.components.schemas[*].properties"
    then:
      function: pattern
      functionOptions:
        match: "^[a-z]+(?:[A-Z][a-z0-9]*)*$"

  # Public Facing ID Rules
  public-id-format:
    description: "Public facing IDs should follow the format [prefix][incrementing integer]"
    severity: warn
    given: "$.components.schemas[*].properties.*"
    then:
      field: "@key"
      function: pattern
      functionOptions:
        match: ".*[Ii]d$"

  # Authorization Rules
  authorization-header:
    description: "Operations should use FD-Authorization header from Cookie"
    severity: warn
    given: "$.paths[*][*].security"
    then:
      function: truthy

  # Versioning Rules
  no-global-versioning:
    description: "Global path-based versioning is not allowed"
    severity: error
    given: "$.paths"
    then:
      function: pattern
      functionOptions:
        match: "^(?!.*/v\\d+/).*$"

  simple-version-numbers:
    description: "Version numbers should be simple (v1, v2) not detailed (v1.0, v2.0)"
    severity: warn
    given: "$.paths"
    then:
      function: pattern
      functionOptions:
        match: "^(?!.*/v\\d+\\.\\d+/).*$"

  # Content Type Rules
  json-content-type:
    description: "Responses should use application/json content type"
    severity: error
    given: "$.paths[*][*].responses[*].content"
    then:
      field: "@key"
      function: enumeration
      functionOptions:
        values: ["application/json"]

  # Schema Validation Rules
  explicit-types:
    description: "Request and response schemas should be explicitly defined"
    severity: warn
    given: "$.paths[*][*]"
    then:
      field: requestBody
      function: truthy

  # Operation ID Rules
  unique-operation-ids:
    description: "All operations must have unique operationId"
    severity: error
    given: "$.paths[*][*]"
    then:
      field: operationId
      function: truthy

  # Tag Rules
  operation-tags:
    description: "All operations must have at least one tag"
    severity: error
    given: "$.paths[*][*]"
    then:
      field: tags
      function: truthy

  # Example Rules
  response-examples:
    description: "Responses should include examples"
    severity: warn
    given: "$.paths[*][*].responses[200,201].content['application/json']"
    then:
      field: example
      function: truthy

  # URI Length Rule
  uri-length-validation:
    description: "URLs should not exceed 2083 characters"
    severity: warn
    given: "$.paths"
    then:
      function: pattern
      functionOptions:
        match: "^.{1,2083}$"

  # Expand Parameter Rules
  expand-parameter-documentation:
    description: "Endpoints with expandable resources should document the expand parameter"
    severity: warn
    given: "$.paths[*][get].parameters[*]"
    then:
      field: name
      function: pattern
      functionOptions:
        match: "^expand$"

  # Resource State Rules
  resource-state-modeling:
    description: "APIs should model resource state, not behavior"
    severity: warn
    given: "$.paths[*][*]"
    then:
      field: summary
      function: pattern
      functionOptions:
        match: "^(?!.*(?:action|execute|perform|run)).*$"

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/flipdish-spectral-rules-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.