Wufoo · API Governance Rules

Wufoo API Rules

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

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

The ruleset includes 4 error-severity rules, 2 warning-severity rules, and 1 info-severity rule.

Tagged areas include Forms, Form Builder, Surveys, Data Collection, and Webhooks.

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

7 Rules error 4 warn 2 info 1
View Rules File View on GitHub

Rule Categories

wufoo

Rules

error
wufoo-info-contact
Info object MUST include contact name and url.
$.info
error
wufoo-operation-id-camelcase
operationId MUST be camelCase.
$.paths.*.*.operationId
warn
wufoo-summary-title-case
Operation summary SHOULD be Title Case (each word capitalized).
$.paths.*.*.summary
error
wufoo-tags-title-case
Tags MUST be Title Case.
$.tags[*].name
warn
wufoo-format-path-param
Every path MUST end in a {format} extension parameter.
$.paths
error
wufoo-basic-auth-only
Security scheme MUST be HTTP Basic Auth.
$.components.securitySchemes.*
info
wufoo-response-envelope
GET list responses SHOULD wrap collections in a top-level envelope (Forms/Entries/Reports/etc).
$.paths.*.get.responses.200.content.application/json.schema

Spectral Ruleset

Raw ↑
extends:
  - spectral:oas

rules:
  wufoo-info-contact:
    description: Info object MUST include contact name and url.
    given: $.info
    severity: error
    then:
      - field: contact.name
        function: truthy
      - field: contact.url
        function: truthy

  wufoo-operation-id-camelcase:
    description: operationId MUST be camelCase.
    given: $.paths.*.*.operationId
    severity: error
    then:
      function: pattern
      functionOptions:
        match: '^[a-z][a-zA-Z0-9]+$'

  wufoo-summary-title-case:
    description: Operation summary SHOULD be Title Case (each word capitalized).
    given: $.paths.*.*.summary
    severity: warn
    then:
      function: pattern
      functionOptions:
        match: '^([A-Z][a-zA-Z0-9]*)(\s+(For|And|Or|To|Of|In|On|By|A|An|The|[A-Z][a-zA-Z0-9]*))*$'

  wufoo-tags-title-case:
    description: Tags MUST be Title Case.
    given: $.tags[*].name
    severity: error
    then:
      function: pattern
      functionOptions:
        match: '^[A-Z][a-zA-Z]*$'

  wufoo-format-path-param:
    description: Every path MUST end in a {format} extension parameter.
    given: $.paths
    severity: warn
    then:
      function: pattern
      functionOptions:
        match: '\.\{format\}$'
        field: '@key'

  wufoo-basic-auth-only:
    description: Security scheme MUST be HTTP Basic Auth.
    given: $.components.securitySchemes.*
    severity: error
    then:
      - field: type
        function: enumeration
        functionOptions:
          values: [http]
      - field: scheme
        function: enumeration
        functionOptions:
          values: [basic]

  wufoo-response-envelope:
    description: GET list responses SHOULD wrap collections in a top-level envelope (Forms/Entries/Reports/etc).
    given: $.paths.*.get.responses.200.content.application/json.schema
    severity: info
    then:
      function: truthy