spectral-rules-table

Spectral Lint Rules Table

This document provides a comprehensive overview of all Spectral lint rules configured for the Seismic API specifications.

Rule Categories

1. OpenAPI Version Rules

Rule NameDescriptionSeverityCategory
openapi-version-3_0_x-onlyOnly OpenAPI version 3.0.x is allowederrorVersion Control

2. Naming Convention Rules

Rule NameDescriptionSeverityCategory
path-parameter-name-camel-casePath parameters must follow camelCaseerrorNaming
header-parameters-valid-caseHeader parameters must be kebab-case or PascalCaseerrorNaming
properties-must-avoid-snake-caseAvoid snake_case in propertieserrorNaming
quary-parameter-name-camel-caseQuery parameters must follow camelCase with dotted notation allowederrorNaming
paths-camelCase-caseAll paths must follow camelCaseerrorNaming
path-query-parameters-camelCase-alphanumericPath and query parameters must follow camelCaseerrorNaming
properties-camelCase-alphanumericAll schema properties must follow camelCaseerrorNaming

3. Parameter and Schema Rules

Rule NameDescriptionSeverityCategory
Array-parameter-must-define-items-schemaAll array parameters must define the items schemaerrorSchema
oas3-parameter-descriptionParameters must have descriptionstrueSchema
require-example-for-required-parametersAll required parameters must provide an example valueerrorExamples
properties-must-include-descriptionProperties must have "description"errorDocumentation
parameters-must-have-detailed-descriptionParameters must have detailed description (2+ words)errorDocumentation
optional-parameters-must-have-default-valueOptional parameters must have a default valueerrorSchema

4. Operation Rules

Rule NameDescriptionSeverityCategory
operation-operationIdOperation operationId requirement (disabled)falseOperations
operation-operationId-errorOperation must have "operationId"errorOperations
operations-must-include-descriptionOperations must have "description"errorDocumentation
operations-must-include-summaryOperations must have "summary"errorDocumentation
operation-must-have-valid-summaryOperation summary must be 2-15 wordserrorDocumentation
operation-must-have-valid-descriptionOperation description must have at least 20 wordserrorDocumentation
summary-and-description-should-not-be-sameSummary and description must not be identicalerrorDocumentation
operation-tags-requiredEach operation must include at least one tagerrorOperations
deprecated-operations-must-have-seismic-eol-dateDeprecated operations must include 'x-seismic-eol-date'errorLifecycle

5. Seismic Extension Rules

Rule NameDescriptionSeverityCategory
operation-x-seismic-eol-date-formatx-seismic-eol-date must use MM/dd/yyyy formaterrorExtensions
operation-x-seismic-rate-limit-allowed-valuesx-seismic-rate-limit must be 1, 1.5, 2, 2.5, or 3errorExtensions
operation-x-seismic-release-allowed-valuesx-seismic-release must be GA or EAerrorExtensions
operation-must-have-x-seismic-scopesOperation must have "x-seismic-scopes" definederrorExtensions
operation-x-seismic-scopes-scope-starts-with-seismicx-seismic-scopes must start with "seismic"errorExtensions

6. Request/Response Rules

Rule NameDescriptionSeverityCategory
request-GET-no-bodyGET requests must not accept body parameterserrorHTTP Methods
no-array-top-level-responsesAPI responses must not be top-level arrayserrorResponses
request-body-must-have-detailed-descriptionRequest body must have 2+ word descriptionerrorDocumentation
example-in-req-payloadRequest body schemas must include exampleserrorExamples
example-in-each-responseSuccess responses (2xx) must include exampleserrorExamples

7. Security and Data Rules

Rule NameDescriptionSeverityCategory
no-tenant-id-path-query-parameterstenantId must not be in path/query parameterserrorSecurity
parameter-must-not-contain-tenantIdtenantId must not be in propertieserrorSecurity

8. Path and Version Rules

Rule NameDescriptionSeverityCategory
path-must-include-versionPath must include version (e.g., /v1/)errorVersioning

9. Validation and Quality Rules

Rule NameDescriptionSeverityCategory
parameters-must-not-be-unusedParameters must not be unused in patherrorQuality

Rule Summary by Category

CategoryTotal RulesError LevelWarning Level
Version Control110
Naming770
Schema330
Operations760
Documentation660
Extensions550
HTTP Methods110
Responses110
Examples330
Security220
Versioning110
Quality110
TOTAL38370

Custom Functions Used

Function NamePurpose
wordsLengthCheckValidates word count in descriptions and summaries
summaryNotIdenticalToDescriptionEnsures summary and description are different
noUnusedParametersValidates that all parameters are used in paths

File Overrides

The following files have specific rule overrides (rules disabled for legacy compatibility):

  • Integration.yaml
  • Livedoc Express.yaml
  • Scim.yaml
  • Link Delivery.yaml
  • Approval Workflow.yaml
  • LiveDoc.yaml
  • Workspace.yaml
  • LiveForm.yaml
  • Search.yaml
  • Intelligence.yaml
  • Custom Schema.yaml
  • Custom Properties.yaml
  • Digital Sales Room.yaml
  • Document Generator.yaml
  • Document Generator Express.yaml
  • Planner.yaml
  • Programs.yaml
  • Guided Assembly.yaml
  • Documentation Tests.yaml
  • Email.yaml
  • Engagement Permission.yaml
  • Lessons.yaml
  • Content Manager.yaml
  • Webhooks v2.yaml
  • Channel.yaml
  • Variable.yaml
  • Activity Logging.yaml
  • Content Augmentation.yaml
  • Custom Content.yml
  • Engagement.yaml
  • Meeting.yaml
  • Presentation Builder.yaml

Notes

  • Most rules are set to error severity level to ensure strict compliance
  • The configuration extends spectral:oas for base OpenAPI validation
  • Custom functions are defined in the ./functions directory
  • Rule overrides are used for legacy API specifications to maintain backward compatibility