Starwood Hotels and Resorts · API Governance Rules
Starwood Hotels and Resorts API Rules
Spectral linting rules defining API design standards and conventions for Starwood Hotels and Resorts.
13 Rules
error 4
warn 9
Rule Categories
starwood
Rules
error
starwood-info-contact-required
All Starwood APIs must include contact information
$.info
warn
starwood-operation-tags-required
All operations must have at least one tag for categorization
$.paths[*][get,post,put,patch,delete]
error
starwood-operation-summary-required
All operations must have a summary
$.paths[*][get,post,put,patch,delete]
warn
starwood-operation-summary-title-case
Operation summaries must use Title Case
$.paths[*][get,post,put,patch,delete].summary
warn
starwood-operation-id-kebab-case
Operation IDs must use camelCase
$.paths[*][get,post,put,patch,delete].operationId
warn
starwood-path-kebab-case
API paths must use kebab-case for path segments
$.paths
warn
starwood-dates-use-format
Date and date-time fields must declare the appropriate format
$.components.schemas[*].properties[*date*,*Date*]
error
starwood-hotel-search-country-required
Hotel search must always include country parameter validation
$.paths['/v1/hotels/search'].get.parameters[?(@.name=='country')]
error
starwood-response-200-schema
Successful GET responses must define a response schema
$.paths[*].get.responses['200'].content['application/json']
warn
starwood-response-error-defined
All operations must define at least one error response
$.paths[*][get,post,put,patch,delete].responses
warn
starwood-components-schemas-description
All schema components must include a description
$.components.schemas[*]
warn
starwood-parameter-description
All parameters must have a description
$.paths[*][get,post,put,patch,delete].parameters[*]
warn
starwood-security-schemes-defined
APIs must have security schemes defined
$.components