Amazon GameLift API Rules
Spectral linting rules defining API design standards and conventions for Amazon GameLift.
21 Rules
error 7
warn 11
info 3
Rule Categories
info
microcks
no
openapi
operation
query
request
response
schema
security
servers
Rules
warn
info-title-format
API title must start with "Amazon GameLift"
$.info.title
error
info-description-required
API must have a description
$.info
error
info-version-required
API must have a version
$.info
warn
openapi-version
Must use OpenAPI 3.0.x
$.openapi
error
servers-required
Servers must be defined
$
warn
servers-https
Server URLs should use HTTPS
$.servers[*].url
error
operation-summary-required
Every operation must have a summary
$.paths[*][get,post,put,patch,delete]
warn
operation-summary-company-prefix
Operation summaries must start with Amazon GameLift
$.paths[*][get,post,put,patch,delete].summary
warn
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
response-success-required
Operations must have at least one success (2xx) response
$.paths[*][get,post,put,patch,delete].responses
warn
response-description-required
Responses must have descriptions
$.paths[*][get,post,put,patch,delete].responses[*]
info
request-body-description
Request bodies should have descriptions
$.paths[*][post,put,patch].requestBody
warn
security-schemes-defined
Security schemes should be defined in components.
$.components
info
schema-properties-typed
Schema properties should have types defined
$.components.schemas[*].properties[*]
error
no-empty-descriptions
Descriptions must not be empty strings
$..description
info
microcks-operation-extension
Operations should have x-microcks-operation for mock support
$.paths[*][get,post,put,patch,delete]
warn
query-params-casing
Query parameters should be PascalCase (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
warn
schema-properties-casing
Schema properties should be PascalCase (the dominant convention in this API).
$.components.schemas[*].properties
Spectral Ruleset
# amazon-gamelift — 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)
# - query-params-casing: pascal @ 100% (n=46)
# - operationid-casing: pascal @ 100% (n=104)
# - schema-names-casing: pascal @ 100% (n=474)
# - schema-properties-casing: pascal @ 99% (n=837)
# - security: global (root) — NOT emitting operation-security-required
# - merge: kept 18 existing, added 4 measured, upgraded 0
# - added: query-params-casing, schema-names-casing, schema-properties-casing, security-schemes-defined
extends:
- spectral:oas
rules:
info-title-format:
description: API title must start with "Amazon GameLift"
severity: warn
given: $.info.title
then:
function: pattern
functionOptions:
match: ^Amazon GameLift
info-description-required:
description: API must have a description
severity: error
given: $.info
then:
field: description
function: truthy
info-version-required:
description: API must have a version
severity: error
given: $.info
then:
field: version
function: truthy
openapi-version:
description: Must use OpenAPI 3.0.x
severity: warn
given: $.openapi
then:
function: pattern
functionOptions:
match: ^3\.0\.
servers-required:
description: Servers must be defined
severity: error
given: $
then:
field: servers
function: truthy
servers-https:
description: Server URLs should use HTTPS
severity: warn
given: $.servers[*].url
then:
function: pattern
functionOptions:
match: ^https://
operation-summary-required:
description: Every operation must have a summary
severity: error
given: $.paths[*][get,post,put,patch,delete]
then:
field: summary
function: truthy
operation-summary-company-prefix:
description: Operation summaries must start with Amazon GameLift
severity: warn
given: $.paths[*][get,post,put,patch,delete].summary
then:
function: pattern
functionOptions:
match: ^Amazon GameLift
operation-description-required:
description: Every operation must have a description
severity: warn
given: $.paths[*][get,post,put,patch,delete]
then:
field: description
function: truthy
operation-id-required:
description: Every operation must have an operationId
severity: error
given: $.paths[*][get,post,put,patch,delete]
then:
field: operationId
function: truthy
operation-id-camel-case:
description: operationId must use camelCase
severity: warn
given: $.paths[*][get,post,put,patch,delete].operationId
then:
function: pattern
functionOptions:
match: ^[a-z][a-zA-Z0-9]+$
response-success-required:
description: Operations must have at least one success (2xx) response
severity: error
given: $.paths[*][get,post,put,patch,delete].responses
then:
function: schema
functionOptions:
schema:
type: object
anyOf:
- required:
- '200'
- required:
- '201'
- required:
- '204'
response-description-required:
description: Responses must have descriptions
severity: warn
given: $.paths[*][get,post,put,patch,delete].responses[*]
then:
field: description
function: truthy
request-body-description:
description: Request bodies should have descriptions
severity: info
given: $.paths[*][post,put,patch].requestBody
then:
field: description
function: truthy
security-schemes-defined:
description: Security schemes should be defined in components.
severity: warn
given: $.components
then:
field: securitySchemes
function: truthy
schema-properties-typed:
description: Schema properties should have types defined
severity: info
given: $.components.schemas[*].properties[*]
then:
field: type
function: truthy
no-empty-descriptions:
description: Descriptions must not be empty strings
severity: error
given: $..description
then:
function: pattern
functionOptions:
match: .+
microcks-operation-extension:
description: Operations should have x-microcks-operation for mock support
severity: info
given: $.paths[*][get,post,put,patch,delete]
then:
field: x-microcks-operation
function: truthy
query-params-casing:
description: Query parameters should be PascalCase (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: 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: pattern
functionOptions:
match: ^[A-Z][A-Za-z0-9]*$
schema-properties-casing:
description: Schema properties should be PascalCase (the dominant convention in this API).
severity: warn
given: $.components.schemas[*].properties
then:
field: '@key'
function: pattern
functionOptions:
match: ^[A-Z][A-Za-z0-9]*$