Email Verifier API · API Governance Rules

Email Verifier API API Rules

Spectral linting rules defining API design standards and conventions for Email Verifier API.

9 Rules error 6 warn 3
View Rules File View on GitHub

Rule Categories

email

Rules

error
email-verifier-api-info-contact
Info object must declare a contact for support.
$.info
warn
email-verifier-api-info-license
Info object must declare a license.
$.info
error
email-verifier-api-server-https
All declared servers must use HTTPS.
$.servers[*].url
warn
email-verifier-api-operation-summary-title-case
Operation summary should use Title Case.
$.paths[*][get,post,put,patch,delete].summary
error
email-verifier-api-operation-tagged
Every operation must be tagged.
$.paths[*][get,post,put,patch,delete]
error
email-verifier-api-operation-id
Every operation must have an operationId.
$.paths[*][get,post,put,patch,delete]
error
email-verifier-api-security-defined
Security must be declared at the document level.
$
error
email-verifier-api-api-key-auth
API key must be passed as a query parameter named apiKey.
$.components.securitySchemes[*]
warn
email-verifier-api-credit-fields
VerificationResult schema must expose remaining credit balance and execution time.
$.components.schemas.VerificationResult.properties

Spectral Ruleset

Raw ↑
extends:
  - spectral:oas
rules:
  email-verifier-api-info-contact:
    description: Info object must declare a contact for support.
    given: $.info
    severity: error
    then:
      field: contact
      function: truthy
  email-verifier-api-info-license:
    description: Info object must declare a license.
    given: $.info
    severity: warn
    then:
      field: license
      function: truthy
  email-verifier-api-server-https:
    description: All declared servers must use HTTPS.
    given: $.servers[*].url
    severity: error
    then:
      function: pattern
      functionOptions:
        match: ^https://
  email-verifier-api-operation-summary-title-case:
    description: Operation summary should use Title Case.
    given: $.paths[*][get,post,put,patch,delete].summary
    severity: warn
    then:
      function: pattern
      functionOptions:
        match: '^([A-Z][A-Za-z0-9]*)( [A-Z0-9][A-Za-z0-9()/-]*)*$'
  email-verifier-api-operation-tagged:
    description: Every operation must be tagged.
    given: $.paths[*][get,post,put,patch,delete]
    severity: error
    then:
      field: tags
      function: truthy
  email-verifier-api-operation-id:
    description: Every operation must have an operationId.
    given: $.paths[*][get,post,put,patch,delete]
    severity: error
    then:
      field: operationId
      function: truthy
  email-verifier-api-security-defined:
    description: Security must be declared at the document level.
    given: $
    severity: error
    then:
      field: security
      function: truthy
  email-verifier-api-api-key-auth:
    description: API key must be passed as a query parameter named apiKey.
    given: $.components.securitySchemes[*]
    severity: error
    then:
      function: schema
      functionOptions:
        schema:
          type: object
          properties:
            type: { const: apiKey }
            in: { const: query }
            name: { const: apiKey }
          required: [type, in, name]
  email-verifier-api-credit-fields:
    description: VerificationResult schema must expose remaining credit balance and execution time.
    given: $.components.schemas.VerificationResult.properties
    severity: warn
    then:
      function: schema
      functionOptions:
        schema:
          type: object
          required: [remaining, execution]