Upvest · API Governance Rules
Upvest API Rules
Spectral linting rules defining API design standards and conventions for Upvest.
39 Rules
error 17
warn 19
info 3
Rule Categories
delete
get
info
no
openapi
operation
pagination
parameter
paths
post
request
response
schema
security
servers
tags
Rules
warn
info-title-format
API title must start with "Upvest"
$.info.title
error
info-description-required
API must have a description with at least 50 characters
$.info
error
info-version-required
API must define a version
$.info
warn
info-contact-required
API info should include contact information
$.info
error
openapi-version-3
All specs must use OpenAPI 3.x
$
error
servers-defined
API must define at least one server
$
error
servers-https-only
All server URLs must use HTTPS
$.servers[*].url
warn
servers-description-required
Each server must have a description
$.servers[*]
warn
paths-kebab-case
Path segments must use snake_case or kebab-case (Upvest uses snake_case)
$.paths
error
paths-no-trailing-slash
Paths must not end with a trailing slash
$.paths
error
operation-summary-required
Every operation must have a summary
$.paths[*][get,post,put,patch,delete]
warn
operation-summary-upvest-prefix
Operation summaries must start with "Upvest"
$.paths[*][get,post,put,patch,delete].summary
error
operation-description-required
Every operation must have a description
$.paths[*][get,post,put,patch,delete]
error
operation-id-required
Every operation must have an operationId
$.paths[*][get,post,put,patch,delete]
warn
operation-id-camel-case
operationId must use camelCase
$.paths[*][get,post,put,patch,delete].operationId
error
operation-tags-required
Every operation must have at least one tag
$.paths[*][get,post,put,patch,delete]
warn
tags-defined-globally
Tags used in operations should be defined at the global level
$.tags
warn
tags-description-required
Global tags must have descriptions
$.tags[*]
error
parameter-description-required
All parameters must have descriptions
$.paths[*][*].parameters[*]
error
parameter-schema-required
All parameters must have a schema
$.paths[*][*].parameters[*]
warn
parameter-snake-case
Parameter names should use snake_case
$.paths[*][*].parameters[*].name
warn
request-body-description
Request bodies should have descriptions
$.paths[*][post,put,patch].requestBody
warn
request-body-json-content
POST/PUT/PATCH request bodies should support application/json
$.paths[*][post,put,patch].requestBody.content
error
response-success-required
Every operation must have at least one success response (2xx)
$.paths[*][get,post,put,patch,delete].responses
warn
response-401-required
Operations using auth should define a 401 response
$.paths[*][get,post,put,patch,delete].responses
error
response-description-required
All responses must have a description
$.paths[*][*].responses[*]
warn
schema-properties-snake-case
Schema property names should use snake_case
$.components.schemas[*].properties
warn
schema-description-required
Top-level schemas should have a description
$.components.schemas[*]
warn
schema-type-defined
Schemas should define a type
$.components.schemas[*]
info
schema-id-uuid-format
Schema id properties should use uuid format
$.components.schemas[*].properties.id
error
security-schemes-defined
API must define security schemes
$.components.securitySchemes
warn
security-global-defined
Global security must be defined
$
warn
security-oauth2-scopes-described
OAuth2 scopes must have descriptions
$.components.securitySchemes[*].flows[*].scopes
error
get-no-request-body
GET operations must not have a request body
$.paths[*].get
warn
delete-no-request-body
DELETE operations should not have a request body
$.paths[*].delete
warn
post-should-have-request-body
POST operations creating resources should have a request body
$.paths[*].post
info
operation-examples-encouraged
Operations should have examples for better developer experience
$.paths[*][get,post,put,patch,delete].responses[*].content[*]
error
no-empty-descriptions
Descriptions must not be empty strings
$..description
info
pagination-offset-limit
Paginated operations should use offset/limit parameter names
$.paths[*].get.parameters[*].name