TensorFlow · API Governance Rules
TensorFlow API Rules
Spectral linting rules defining API design standards and conventions for TensorFlow.
13 Rules
error 5
warn 7
Rule Categories
tensorflow
Rules
warn
tensorflow-operation-id-kebab-case
Operation IDs should use camelCase following TensorFlow Serving conventions
$.paths[*][get,post,put,patch,delete].operationId
false
tensorflow-model-name-in-path
Model endpoints must include model_name path parameter
$.paths['/v1/models/{model_name}*']
error
tensorflow-path-versioned
All TensorFlow Serving API paths must be versioned with /v1/
$.paths[*]~
error
tensorflow-inference-methods
Inference endpoints (classify, regress, predict) must use POST
$.paths[*classify,*regress,*predict]
error
tensorflow-status-get-method
Model status and metadata endpoints must use GET
$.paths['/v1/models/{model_name}','/v1/models/{model_name}/metadata']
error
tensorflow-response-200-defined
All operations must define a 200 success response
$.paths[*][get,post,put,patch,delete].responses
warn
tensorflow-error-response-defined
Operations should define error responses
$.paths[*][get,post,put,patch,delete].responses
error
tensorflow-request-body-inference
Inference operations must define a request body
$.paths[*classify,*regress,*predict].post
warn
tensorflow-json-content-type
TensorFlow Serving uses JSON for all request/response bodies
$.paths[*][post].requestBody.content
warn
tensorflow-tags-defined
All operations should be tagged
$.paths[*][get,post,put,patch,delete]
warn
tensorflow-summary-title-case
All operation summaries should use Title Case
$.paths[*][get,post,put,patch,delete].summary
warn
tensorflow-description-present
All operations should have a description
$.paths[*][get,post,put,patch,delete]
warn
tensorflow-schema-descriptions
Schema components should have descriptions
$.components.schemas[*]