extends: - spectral:oas - spectral:asyncapi functions: - consistent-response-body - error-response - onlyOneServerVersion - operation-id - operation-security - pagination-parameters - pagination-response - param-names - param-names-unique - param-order - path-param-names - path-param-schema - property-default-not-allowed - readonly-in-response-schema - schema-type-and-format aliases: JWT: description: '' targets: - formats: - oas3 given: - $.components.securitySchemes[?(@ && @.type=="oauth2")] - $.components.securitySchemes[?(@ && (@.bearerFormat=="jwt" || @.bearerFormat=="JWT"))] - formats: - oas2 given: - $.components.securitySchemes[?(@ && @.type=="oauth2")] - $.components.securitySchemes[?(@ && (@.bearerFormat=="jwt" || @.bearerFormat=="JWT"))] ArrayProperties: description: '' targets: - formats: - oas2 given: - $..[?(@ && @.type=="array")] - formats: - oas3.0 given: - $..[?(@ && @.type=="array")] - formats: - oas3.1 given: - $..[?(@ && @.type=="array")] - $..[?(@ && @.type && @.type.constructor.name === "Array" && @.type.includes("array"))] IntegerProperties: description: '' targets: - formats: - oas2 given: - $..[?(@ && @.type=="integer")] - formats: - oas3.0 given: - $..[?(@ && @.type=="integer")] - formats: - oas3.1 given: - $..[?(@ && @.type=="integer")] - $..[?(@ && @.type && @.type.constructor.name === "Array" && @.type.includes("integer"))] StringProperties: description: '' targets: - formats: - oas2 given: - $..[?(@ && @.type=="string")] - formats: - oas3.0 given: - $..[?(@ && @.type=="string")] - formats: - oas3.1 given: - $..[?(@ && @.type=="string")] - $..[?(@ && @.type && @.type.constructor.name === "Array" && @.type.includes("string"))] functionsDir: functions rules: # Info object should contain contact object info-contact: error # Each value of an enum must be unique duplicated-entry-in-enum: error # OpenAPI servers must be present and non-empty array oas3-api-servers: error # OpenAPI object info description must be present and non-empty string info-description: error # This rule protects against an edge case, for anyone bringing in description # documents from third parties and using the parsed content rendered in HTML/JS. # If one of those third parties does something shady like injecting eval() # JavaScript statements, it could lead to an XSS attack. no-eval-in-markdown: error # This rule protects against a potential hack, for anyone bringing in description # documents from third parties and then generating HTML documentation. # If one of those third parties does something shady like injecting