Tuya · API Governance Rules
Tuya API Rules
Spectral linting rules defining API design standards and conventions for Tuya.
12 Rules
error 4
warn 7
Rule Categories
tuya
Rules
error
tuya-versioned-paths
All API paths must begin with a version segment like /v1.0/
$.paths[*]~
warn
tuya-snake-case-parameters
Parameter names must use snake_case
$.paths[*][*].parameters[*].name
error
tuya-operation-id-required
All operations must have an operationId
$.paths[*][get,post,put,patch,delete]
warn
tuya-operation-id-camel-case
Operation IDs must use camelCase
$.paths[*][get,post,put,patch,delete].operationId
error
tuya-operation-summary-required
All operations must have a summary
$.paths[*][get,post,put,patch,delete]
warn
tuya-summary-title-case
Operation summaries must use Title Case
$.paths[*][get,post,put,patch,delete].summary
hint
tuya-response-success-field
All 200 responses should include a success field in their schema
$.paths[*][*].responses.200.content.application/json.schema.properties
warn
tuya-operation-description-required
All operations must have a description
$.paths[*][get,post,put,patch,delete]
warn
tuya-operation-tags-required
All operations must have at least one tag
$.paths[*][get,post,put,patch,delete]
warn
tuya-security-scheme-apikey
API must define a tuyaApiKey or equivalent apiKey security scheme
$.components.securitySchemes
error
tuya-servers-defined
At least one server must be defined
$
warn
tuya-tags-title-case
All tags in info must use Title Case
$.tags[*].name