Flowdock (Discontinued) · API Governance Rules

Flowdock (Discontinued) API Rules

Spectral linting rules defining API design standards and conventions for Flowdock (Discontinued).

Flowdock (Discontinued) API Rules is a Spectral governance ruleset published by Flowdock (Discontinued) on the APIs.io network, containing 7 lint rules.

The ruleset includes 1 error-severity rule, 5 warning-severity rules, and 1 hint-severity rule.

Tagged areas include Team Chat, Team Inbox, Collaboration, Real-Time Messaging, and Integrations.

Rulesets can be applied to your own OpenAPI specs via Spectral to enforce the same governance standards.

7 Rules error 1 warn 5
View Rules File View on GitHub

Rule Categories

flowdock

Rules

warn
flowdock-title-case-summary
Operation summaries must be Title Case.
$.paths.*[?(@property === 'get' || @property === 'post' || @property === 'put' || @property === 'patch' || @property === 'delete' || @property === 'head' || @property === 'options')].summary
warn
flowdock-resource-naming-snake-case
Path segments should be lowercase snake_case (Flowdock convention).
$.paths
error
flowdock-no-trailing-slash
Paths must not end with a trailing slash.
$.paths
warn
flowdock-org-flow-parameters
Flow-scoped paths must declare `organization` and `flow` path parameters.
$.paths[?(@property =~ /^\/flows\/\{organization\}\/\{flow\}/)].parameters[*].name
warn
flowdock-operationid-camel-case
operationId must be camelCase.
$.paths.*.*.operationId
hint
flowdock-status-banner-required
Top-level info.description should disclose discontinued status.
$.info.description
warn
flowdock-auth-documented
A securityScheme must exist (OAuth2 + Basic for REST, bearer for SCIM, flow_api_token path-param for Push).
$.components.securitySchemes

Spectral Ruleset

Raw ↑
extends: spectral:oas
rules:
  flowdock-title-case-summary:
    description: Operation summaries must be Title Case.
    given: $.paths.*[?(@property === 'get' || @property === 'post' || @property === 'put' || @property === 'patch' || @property === 'delete' || @property === 'head' || @property === 'options')].summary
    severity: warn
    then:
      function: pattern
      functionOptions:
        match: "^([A-Z][A-Za-z0-9]*)(\\s[A-Z][A-Za-z0-9]*)*$"

  flowdock-resource-naming-snake-case:
    description: Path segments should be lowercase snake_case (Flowdock convention).
    given: $.paths
    severity: warn
    then:
      field: "@key"
      function: pattern
      functionOptions:
        match: "^/[a-z0-9_{}/:\\.-]*$"

  flowdock-no-trailing-slash:
    description: Paths must not end with a trailing slash.
    given: $.paths
    severity: error
    then:
      field: "@key"
      function: pattern
      functionOptions:
        notMatch: ".+/$"

  flowdock-org-flow-parameters:
    description: Flow-scoped paths must declare `organization` and `flow` path parameters.
    given: "$.paths[?(@property =~ /^\\/flows\\/\\{organization\\}\\/\\{flow\\}/)].parameters[*].name"
    severity: warn
    then:
      function: truthy

  flowdock-operationid-camel-case:
    description: operationId must be camelCase.
    given: "$.paths.*.*.operationId"
    severity: warn
    then:
      function: pattern
      functionOptions:
        match: "^[a-z][A-Za-z0-9]*$"

  flowdock-status-banner-required:
    description: Top-level info.description should disclose discontinued status.
    given: "$.info.description"
    severity: hint
    then:
      function: pattern
      functionOptions:
        match: "(?i)discontinued|sunset|retired|offline"

  flowdock-auth-documented:
    description: A securityScheme must exist (OAuth2 + Basic for REST, bearer for SCIM, flow_api_token path-param for Push).
    given: "$.components.securitySchemes"
    severity: warn
    then:
      function: truthy