extends: spectral:oas rules: uniblock-operation-ids-required: description: All operations must have an operationId message: Operation must have an operationId severity: error given: $.paths[*][get,post,put,patch,delete,options,head] then: field: operationId function: truthy uniblock-operation-summary-title-case: description: Operation summaries must use Title Case message: Summary "{{value}}" must use Title Case severity: warn given: $.paths[*][get,post,put,patch,delete].summary then: function: pattern functionOptions: match: '^[A-Z][a-zA-Z0-9]*([ ][a-zA-Z0-9]+)*$' uniblock-tags-required: description: Operations must have at least one tag message: Operation must include at least one tag severity: warn given: $.paths[*][get,post,put,patch,delete] then: field: tags function: truthy uniblock-chain-param-described: description: Chain parameters must have a description message: Chain parameter must include a description explaining supported networks severity: warn given: $.components.parameters[?(@.name == "chain" || @.name == "chainId")] then: field: description function: truthy uniblock-api-key-security: description: API must define API key security scheme message: Uniblock APIs use API key authentication in the x-api-key header severity: error given: $.components.securitySchemes then: function: truthy uniblock-responses-include-error: description: Operations should document 401 unauthorized response message: Operation should document 401 Unauthorized for API key validation errors severity: warn given: $.paths[*][get,post].responses then: field: '401' function: truthy uniblock-servers-required: description: API must define at least one server message: API must include a servers array with at least one entry severity: error given: $ then: field: servers function: truthy uniblock-blockchain-address-format: description: Parameters accepting blockchain addresses should note expected format message: Blockchain address parameter should document address format in description severity: info given: $.paths[*][*].parameters[?(@.name == "address" || @.name == "contractAddress")] then: field: description function: truthy