VirusTotal · API Governance Rules
VirusTotal API Rules
Spectral linting rules defining API design standards and conventions for VirusTotal.
40 Rules
error 15
warn 19
info 6
Rule Categories
vt
Rules
error
vt-info-title-required
Spec title must be present and start with "VirusTotal".
$.info.title
error
vt-info-version-required
Spec version must be declared and start with "3".
$.info.version
warn
vt-info-description-required
Spec description must be present and non-trivial.
$.info.description
warn
vt-info-contact-required
Spec must declare a contact (VirusTotal / GTI).
$.info.contact
warn
vt-info-license-required
Spec must declare a license (VirusTotal Terms of Service).
$.info.license
error
vt-openapi-version
Spec must be OpenAPI 3.x.
$.openapi
error
vt-servers-required
At least one server URL must be defined.
$.servers
error
vt-servers-https
Server URL must use HTTPS.
$.servers[*].url
warn
vt-servers-api-v3-host
Server URL should point at api/v3 on virustotal.com or gtidocs subdomain.
$.servers[*].url
warn
vt-paths-snake-case
Path segments use snake_case (VirusTotal convention) — letters, digits, underscores, hyphens, and {param} placeholders only.
$.paths.*~
error
vt-paths-no-trailing-slash
Paths must not end with a trailing slash.
$.paths.*~
error
vt-paths-no-query-string
Path keys must not contain '?' query strings.
$.paths.*~
error
vt-operation-summary-required
Every operation must have a summary.
$.paths.*.[get,post,put,patch,delete].summary
warn
vt-operation-summary-virustotal-prefix
Operation summaries must start with "VirusTotal " (per title-case-summaries skill).
$.paths.*.[get,post,put,patch,delete].summary
warn
vt-operation-description-required
Every operation must have a description.
$.paths.*.[get,post,put,patch,delete]
error
vt-operation-operationid-required
Every operation must have an operationId.
$.paths.*.[get,post,put,patch,delete]
warn
vt-operation-operationid-camelcase
operationId should be camelCase.
$.paths.*.[get,post,put,patch,delete].operationId
error
vt-operation-tags-required
Every operation must have at least one tag.
$.paths.*.[get,post,put,patch,delete].tags
info
vt-operation-microcks-extension
Operations should declare x-microcks-operation for Microcks mocking.
$.paths.*.[get,post,put,patch,delete]
warn
vt-tags-global-defined
Spec must define a global tags array.
$.tags
info
vt-tags-virustotal-grouping
Tag names should follow the VirusTotal grouping convention: " - " (e.g. "IoC Investigation - Files", "YARA Hunting - Livehunt", "Access Control - User Management", "Threat Graphs", "Threat Landscape & Vulnerability Intelligence & Reports & Analysis").
$.tags[*].name
warn
vt-parameter-description-required
Every parameter must have a description.
$.paths.*.[get,post,put,patch,delete].parameters[*]
warn
vt-parameter-snake-case
Parameter names should be snake_case (VirusTotal convention).
$.paths.*.[get,post,put,patch,delete].parameters[*].name
error
vt-parameter-no-apikey-as-query
API key must be sent via the x-apikey header, not as a query parameter.
$.paths.*.[get,post,put,patch,delete].parameters[?(@.in=='query')].name
info
vt-parameter-pagination-cursor
List endpoints prefer cursor-based pagination via 'limit' + 'cursor'.
$.paths.*.get.parameters[?(@.name=='page' || @.name=='offset')]
warn
vt-requestbody-json-content
Request bodies must offer application/json.
$.paths.*.[post,put,patch].requestBody.content
error
vt-response-success-required
Every operation must declare at least one 2xx response.
$.paths.*.[get,post,put,patch,delete].responses
warn
vt-response-401-defined
Operations should document the 401 response (missing/invalid API key).
$.paths.*.[get,post,put,patch,delete].responses
warn
vt-response-429-defined
Operations should document the 429 response (rate limit / quota exceeded).
$.paths.*.[get,post,put,patch,delete].responses
warn
vt-response-json-content
2xx responses must be served as application/json.
$.paths.*.[get,post,put,patch,delete].responses[?(@property.match(/^2\d\d$/))].content
warn
vt-schema-property-snake-case
Schema property names should be snake_case (VirusTotal convention).
$.components.schemas.*.properties.*~
info
vt-schema-object-shape
VirusTotal objects follow a JSON:API-ish shape: { id, type, attributes, relationships }. Any schema whose name ends with "Object" should declare those four properties.
$.components.schemas[?(@property.match(/Object$/))]
info
vt-schema-data-envelope
A DataEnvelope schema should be present to model the {"data": ...} response wrapper.
$.components.schemas
info
vt-schema-error-envelope
An ErrorResponse schema should be present to model {"error": {code, message}}.
$.components.schemas
error
vt-security-global-defined
Spec must declare a global security requirement.
$.security
error
vt-security-scheme-vtapikey
The VTApiKey security scheme (apiKey in header named x-apikey) must be defined.
$.components.securitySchemes.VTApiKey
error
vt-get-no-requestbody
GET operations must not declare a requestBody.
$.paths.*.get.requestBody
warn
vt-delete-no-requestbody
DELETE operations should not declare a requestBody.
$.paths.*.delete.requestBody
warn
vt-no-empty-description
Descriptions must not be empty strings.
$..description
warn
vt-deprecation-documented
Deprecated operations should explain the deprecation in the description.
$.paths.*[?(@.deprecated==true)]