Weaviate · API Governance Rules
Weaviate API Rules
Spectral linting rules defining API design standards and conventions for Weaviate.
31 Rules
error 8
warn 13
info 10
Rule Categories
error
no
operation
path
query
schema
weaviate
Rules
error
weaviate-openapi-version
Weaviate API specs must use OpenAPI 3.0.x
$
error
weaviate-info-title
API must have a title
$.info
warn
weaviate-info-description
API must have a description
$.info
error
weaviate-info-version
API must have a version
$.info
warn
weaviate-operation-summary
All operations must have a summary
$.paths[*][get,post,put,delete,patch,head,options]
info
weaviate-operation-description
All operations should have a description
$.paths[*][get,post,put,delete,patch,head,options]
error
weaviate-operation-operationid
All operations must have an operationId
$.paths[*][get,post,put,delete,patch,head,options]
warn
weaviate-operation-tags
All operations must have tags
$.paths[*][get,post,put,delete,patch,head,options]
error
weaviate-operation-responses
All operations must have responses
$.paths[*][get,post,put,delete,patch,head,options]
warn
weaviate-response-200
GET and POST operations should have a 200 response
$.paths[*][get,post]
info
weaviate-schema-properties-description
Schema properties should have descriptions
$.components.schemas[*].properties[*]
info
weaviate-path-kebab-case
Path segments should use kebab-case
$.paths
warn
weaviate-parameter-description
Parameters should have descriptions
$.paths[*][get,post,put,delete,patch].parameters[*]
error
weaviate-request-body-content
Request bodies must define content
$.paths[*][post,put,patch].requestBody
warn
weaviate-security-schemes
API must define security schemes
$.components
info
weaviate-operation-id-camel-case
OperationIds should use camelCase
$.paths[*][get,post,put,delete,patch].operationId
info
weaviate-schema-type
Schema objects should have a type defined
$.components.schemas[*]
error
weaviate-no-empty-paths
Path items must have at least one operation
$.paths[*]
info
weaviate-vector-db-tags
Vector database operations should be tagged appropriately
$.paths[*][get,post,put,delete,patch].tags[*]
info
weaviate-uuid-format
Object IDs should use UUID format
$.components.schemas[*].properties.id
info
weaviate-microcks-operation
Operations should have Microcks extensions for testing
$.paths[*][get,post,put,delete,patch]
error
weaviate-servers-defined
API must define servers
$
info
path-params-casing
Path parameters should be snake_case (the dominant convention in this API).
$.paths[*].parameters[?(@.in=='path')].name
warn
query-params-casing
Query parameters should be snake_case (the dominant convention in this API).
$.paths[*][get,post,put,patch,delete].parameters[?(@.in=='query')]
warn
schema-names-casing
Component schema names should be PascalCase (the dominant convention in this API).
$.components.schemas
info
schema-properties-casing
Schema properties should be snake_case (the dominant convention in this API).
$.components.schemas[*].properties
warn
error-schema-defined
A shared error schema (ErrorResponse) should be defined for error payloads.
$.components.schemas
warn
operation-documents-401
Operations should document a 401 response (documented on 93% of this API's operations).
$.paths[*][get,post,put,patch,delete].responses
warn
operation-documents-403
Operations should document a 403 response (documented on 92% of this API's operations).
$.paths[*][get,post,put,patch,delete].responses
warn
operation-documents-500
Operations should document a 500 response (documented on 95% of this API's operations).
$.paths[*][get,post,put,patch,delete].responses
warn
no-empty-descriptions
Descriptions must not be empty strings.
$..description