# Smithy IDL Spectral-Style Ruleset # Note: Smithy uses its own validation model (validators and linters) built into the Smithy CLI. # These rules document Smithy's own quality conventions for API models. extends: spectral:oas rules: smithy-operation-ids: description: All operations must have an operationId when represented as OpenAPI severity: error given: "$.paths[*][*]" then: field: operationId function: truthy smithy-operation-tags: description: All operations must have at least one tag severity: warn given: "$.paths[*][*]" then: field: tags function: truthy smithy-summary-title-case: description: Operation summaries must use Title Case severity: warn given: "$.paths[*][*].summary" then: function: pattern functionOptions: match: "^[A-Z][a-zA-Z0-9 ]*$" smithy-no-trailing-slashes: description: API paths must not have trailing slashes severity: warn given: "$.paths" then: function: pattern functionOptions: notMatch: "/$" smithy-versioned-paths: description: Smithy API paths should include version prefix for HTTP bindings severity: info given: "$.paths" then: function: pattern functionOptions: match: "^/v[0-9]"