# authorship: generated by API Evangelist tooling. Stamped 2026-08-18
# on the file's own generator header (roadmap#64). An unmarked file is
# NOT assumed to be ours -- absence of evidence was never stamped.
x-method: generated
# roku — Spectral ruleset (strengthened)
# Plain Spectral. Existing hand-authored rules preserved; measured rules added
# from this provider's own OpenAPI conventions by strengthen_ruleset.py,
# then self-validated against the spec.
#
# Provenance:
# - servers-https-only: 67% of servers already https (warn)
# - path-params-casing: snake @ 92% (n=129)
# - query-params-casing: snake @ 98% (n=122)
# - schema-names-casing: pascal @ 98% (n=60)
# - schema-properties-casing: snake @ 82% (n=316)
# - security: global (root) — NOT emitting operation-security-required
# - error-schema-defined: HTTPValidationError
# - pagination params observed: ['limit', 'page']
# - merge: kept 27 existing, added 5 measured, upgraded 0
# - added: query-params-casing, schema-names-casing, schema-properties-casing, error-schema-defined, no-empty-descriptions
extends:
- spectral:oas
rules:
roku-info-title-prefix:
description: API title should begin with "Roku".
message: Title '{{value}}' should begin with 'Roku'.
severity: warn
given: $.info.title
then:
function: pattern
functionOptions:
match: ^Roku
roku-info-description-required:
description: API info.description is required and should be at least 80 characters.
message: info.description must be present and substantive (>= 80 chars).
severity: error
given: $.info
then:
- field: description
function: truthy
- field: description
function: length
functionOptions:
min: 80
roku-info-version-required:
description: API info.version is required.
severity: error
given: $.info
then:
field: version
function: truthy
roku-info-contact-required:
description: info.contact should be defined with a name or url.
severity: warn
given: $.info
then:
field: contact
function: truthy
roku-openapi-version:
description: Use OpenAPI 3.0.3 or 3.1.x.
message: openapi version should be 3.0.x or 3.1.x.
severity: warn
given: $.openapi
then:
function: pattern
functionOptions:
match: ^3\.[01]\.
roku-servers-defined:
description: At least one server must be defined.
severity: error
given: $
then:
field: servers
function: truthy
roku-servers-https-preferred:
description: Production servers should use https. ECP local-network endpoints are an explicit exception
(port 8060 plain HTTP).
severity: info
given: $.servers[*].url
then:
function: pattern
functionOptions:
match: ^(https://|http://\{rokuDeviceIp\}:8060)
roku-path-no-trailing-slash:
description: Paths should not end with a trailing slash.
severity: warn
given: $.paths
then:
function: pattern
field: '@key'
functionOptions:
notMatch: .+/$
roku-path-no-query-string:
description: Paths must not contain query strings.
severity: error
given: $.paths
then:
function: pattern
field: '@key'
functionOptions:
notMatch: \?
roku-path-allowed-casing:
description: Path segments should be kebab-case or snake_case (no PascalCase or spaces).
severity: warn
given: $.paths
then:
function: pattern
field: '@key'
functionOptions:
match: ^(/(([a-z0-9][a-z0-9_-]*)|\{[a-zA-Z_][a-zA-Z0-9_]*\}))*/?$
roku-operation-operationid-required:
description: Every operation must have an operationId.
severity: error
given: $.paths.*[get,post,put,patch,delete,head,options]
then:
field: operationId
function: truthy
roku-operation-summary-required:
description: Every operation must have a summary.
severity: error
given: $.paths.*[get,post,put,patch,delete,head,options]
then:
field: summary
function: truthy
roku-operation-summary-prefix:
description: Operation summaries should begin with "Roku ".
severity: warn
given: $.paths.*[get,post,put,patch,delete,head,options].summary
then:
function: pattern
functionOptions:
match: '^Roku '
roku-operation-description-required:
description: Every operation should have a description.
severity: warn
given: $.paths.*[get,post,put,patch,delete,head,options]
then:
field: description
function: truthy
roku-operation-tags-required:
description: Every operation must have at least one tag.
severity: warn
given: $.paths.*[get,post,put,patch,delete,head,options]
then:
field: tags
function: truthy
roku-operation-microcks-extension:
description: Operations should declare an x-microcks-operation extension for mock dispatch.
severity: info
given: $.paths.*[get,post,put,patch,delete,head,options]
then:
field: x-microcks-operation
function: truthy
roku-tags-defined:
description: A global tags array should be defined at the document root.
severity: warn
given: $
then:
field: tags
function: truthy
roku-tag-description:
description: Each tag should have a description.
severity: info
given: $.tags[*]
then:
field: description
function: truthy
roku-parameter-description:
description: Each parameter must have a description.
severity: warn
given: $..parameters[?(@.in)]
then:
field: description
function: truthy
roku-parameter-schema:
description: Each parameter must declare a schema with a type.
severity: error
given: $..parameters[?(@.in)]
then:
field: schema
function: truthy
roku-requestbody-json:
description: Request bodies should support application/json.
severity: warn
given: $..requestBody.content
then:
field: application/json
function: truthy
roku-response-success-required:
description: Every operation must declare a 2xx success response.
severity: error
given: $.paths.*[get,post,put,patch,delete,head,options].responses
then:
function: pattern
field: '@key'
functionOptions:
match: ^(2[0-9][0-9]|default)$
roku-response-description:
description: Every response must have a description.
severity: warn
given: $..responses.*
then:
field: description
function: truthy
roku-schema-type-required:
description: Top-level component schemas should declare a type.
severity: warn
given: $.components.schemas.*
then:
field: type
function: truthy
roku-schema-source-extension:
description: Schemas extracted from documentation, SDK, or samples should declare x-schema-source
for traceability.
severity: info
given: $.components.schemas.*
then:
field: x-schema-source
function: truthy
roku-security-schemes-described:
description: Security schemes should declare a description.
severity: info
given: $.components.securitySchemes.*
then:
field: description
function: truthy
roku-info-x-source-url:
description: Specs generated from documentation should declare x-source-url for traceability.
severity: info
given: $.info
then:
field: x-source-url
function: truthy
query-params-casing:
description: Query parameters should be snake_case (the dominant convention in this API).
severity: warn
given: $.paths[*][get,post,put,patch,delete].parameters[?(@.in=='query')]
then:
field: name
function: casing
functionOptions:
type: snake
schema-names-casing:
description: Component schema names should be PascalCase (the dominant convention in this API).
severity: warn
given: $.components.schemas
then:
field: '@key'
function: pattern
functionOptions:
match: ^[A-Z][A-Za-z0-9]*$
schema-properties-casing:
description: Schema properties should be snake_case (the dominant convention in this API).
severity: info
given: $.components.schemas[*].properties
then:
field: '@key'
function: casing
functionOptions:
type: snake
error-schema-defined:
description: A shared error schema (HTTPValidationError) should be defined for error payloads.
severity: warn
given: $.components.schemas
then:
field: HTTPValidationError
function: truthy
no-empty-descriptions:
description: Descriptions must not be empty strings.
severity: warn
given: $..description
then:
function: truthy
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we
store it to create your key and to recognise you if you sign in with another
provider. By signing up you are subscribing to the APIs.io and API Evangelist
newsletters — you can unsubscribe from any issue. See our
Privacy Policy and Terms.