Terapi · API Governance Rules
Terapi API Rules
Spectral linting rules defining API design standards and conventions for Terapi.
20 Rules
error 8
warn 12
Rule Categories
terapi
Rules
error
terapi-security-apikey
Terapi API must use API key (secret key) authentication
$
warn
terapi-path-resource-style
Terapi API paths use noun-based resource names
$.paths[*]~
warn
terapi-path-no-trailing-slash
Paths must not have trailing slashes
$.paths[*]~
warn
terapi-list-get-method
List operations should use GET method
$.paths[*][get].operationId
warn
terapi-create-post-method
Create operations should use POST
$.paths[*][post].operationId
error
terapi-delete-method
Delete operations must use DELETE
$.paths[*][delete].operationId
error
terapi-get-200-response
GET operations must return 200
$.paths[*][get].responses
warn
terapi-delete-204-response
DELETE operations should return 204
$.paths[*][delete].responses
error
terapi-401-response
All authenticated operations must define 401
$.paths[*][get,post,put,patch,delete].responses
warn
terapi-404-for-resource
Resource operations with ID parameters should define 404
$.paths[*~'/{[^}]+}'][get,delete].responses
warn
terapi-provider-config-key-required
Operations using provider_config_key should mark it required
$.paths[*][*].parameters[?(@.name == 'provider_config_key')]
error
terapi-connection-id-required
Path parameter connection_id must be required
$.paths[*][*].parameters[?(@.name == 'connection_id' && @.in == 'path')]
error
terapi-operation-id
All operations must have an operationId
$.paths[*][get,post,put,patch,delete]
error
terapi-operation-summary
All operations must have a summary
$.paths[*][get,post,put,patch,delete]
warn
terapi-summary-title-case
Summaries must use Title Case
$.paths[*][get,post,put,patch,delete].summary
warn
terapi-operation-description
Operations should have descriptions
$.paths[*][get,post,put,patch,delete]
error
terapi-tags
Operations must have tags
$.paths[*][get,post,put,patch,delete]
warn
terapi-schema-descriptions
Schema components should have descriptions
$.components.schemas[*]
warn
terapi-connection-id-string
Connection IDs should always be string type
$.components.schemas[*].properties.id
warn
terapi-input-object
Action trigger input should be an object
$.components.schemas.TriggerActionRequest.properties.input