Amazon HealthOmics API Rules
Spectral linting rules defining API design standards and conventions for Amazon HealthOmics.
16 Rules
error 3
warn 8
info 5
Rule Categories
error
healthomics
no
operationid
path
query
schema
servers
Rules
error
healthomics-operation-summary
All operations must have a summary
$.paths.*[get,post,put,patch,delete]
error
healthomics-operation-id
All operations must have an operationId
$.paths.*[get,post,put,patch,delete]
warn
healthomics-operation-tags
All operations should have tags
$.paths.*[get,post,put,patch,delete]
warn
healthomics-response-200
All operations should have a 200 response
$.paths.*[get,post,put,patch,delete].responses
info
healthomics-schema-description
Schema components should have descriptions
$.components.schemas.*
info
healthomics-workflow-operations
Workflow operations should follow consistent naming
$.paths.*[get,post,put,patch,delete]
info
healthomics-store-naming
Store operations should reference appropriate schemas
$.paths.*[get,post,put,patch,delete][?(@property == 'operationId' && @.match('Store'))]
error
healthomics-security
HealthOmics must document security requirements
$.components.securitySchemes
warn
servers-https-only
Server URLs must use HTTPS.
$.servers[*].url
info
path-params-casing
Path parameters should be camelCase (the dominant convention in this API).
$.paths[*].parameters[?(@.in=='path')].name
warn
query-params-casing
Query parameters should be camelCase (the dominant convention in this API).
$.paths[*][get,post,put,patch,delete].parameters[?(@.in=='query')]
warn
operationid-casing
Operation IDs should be PascalCase (the dominant convention in this API).
$.paths[*][get,post,put,patch,delete].operationId
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 camelCase (the dominant convention in this API).
$.components.schemas[*].properties
warn
error-schema-defined
A shared error schema (ReadSetBatchErrorList) should be defined for error payloads.
$.components.schemas
warn
no-empty-descriptions
Descriptions must not be empty strings.
$..description
Spectral Ruleset
# amazon-healthomics — 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: 50% of servers already https (warn)
# - path-params-casing: camel @ 56% (n=68)
# - query-params-casing: camel @ 76% (n=55)
# - operationid-casing: pascal @ 100% (n=72)
# - schema-names-casing: pascal @ 100% (n=459)
# - schema-properties-casing: camel @ 53% (n=703)
# - security: global (root) — NOT emitting operation-security-required
# - error-schema-defined: ReadSetBatchErrorList
# - pagination params observed: ['maxResults', 'nextToken']
# - merge: kept 8 existing, added 8 measured, upgraded 0
# - added: servers-https-only, path-params-casing, query-params-casing, operationid-casing, schema-names-casing, schema-properties-casing, error-schema-defined, no-empty-descriptions
extends:
- spectral:oas
rules:
healthomics-operation-summary:
description: All operations must have a summary
severity: error
given: $.paths.*[get,post,put,patch,delete]
then:
field: summary
function: truthy
healthomics-operation-id:
description: All operations must have an operationId
severity: error
given: $.paths.*[get,post,put,patch,delete]
then:
field: operationId
function: truthy
healthomics-operation-tags:
description: All operations should have tags
severity: warn
given: $.paths.*[get,post,put,patch,delete]
then:
field: tags
function: truthy
healthomics-response-200:
description: All operations should have a 200 response
severity: warn
given: $.paths.*[get,post,put,patch,delete].responses
then:
field: '200'
function: truthy
healthomics-schema-description:
description: Schema components should have descriptions
severity: info
given: $.components.schemas.*
then:
field: description
function: truthy
healthomics-workflow-operations:
description: Workflow operations should follow consistent naming
severity: info
given: $.paths.*[get,post,put,patch,delete]
then:
field: operationId
function: truthy
healthomics-store-naming:
description: Store operations should reference appropriate schemas
severity: info
given: $.paths.*[get,post,put,patch,delete][?(@property == 'operationId' && @.match('Store'))]
then:
function: truthy
healthomics-security:
description: HealthOmics must document security requirements
severity: error
given: $.components.securitySchemes
then:
function: truthy
servers-https-only:
description: Server URLs must use HTTPS.
severity: warn
given: $.servers[*].url
then:
function: pattern
functionOptions:
match: ^https://
path-params-casing:
description: Path parameters should be camelCase (the dominant convention in this API).
severity: info
given: $.paths[*].parameters[?(@.in=='path')].name
then:
function: casing
functionOptions:
type: camel
query-params-casing:
description: Query parameters should be camelCase (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: camel
operationid-casing:
description: Operation IDs should be PascalCase (the dominant convention in this API).
severity: warn
given: $.paths[*][get,post,put,patch,delete].operationId
then:
function: casing
functionOptions:
type: pascal
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: casing
functionOptions:
type: pascal
schema-properties-casing:
description: Schema properties should be camelCase (the dominant convention in this API).
severity: info
given: $.components.schemas[*].properties
then:
field: '@key'
function: casing
functionOptions:
type: camel
error-schema-defined:
description: A shared error schema (ReadSetBatchErrorList) should be defined for error payloads.
severity: warn
given: $.components.schemas
then:
field: ReadSetBatchErrorList
function: truthy
no-empty-descriptions:
description: Descriptions must not be empty strings.
severity: warn
given: $..description
then:
function: truthy