RubyGems · API Governance Rules
RubyGems API Rules
Spectral linting rules defining API design standards and conventions for RubyGems.
16 Rules
error 2
warn 13
info 1
Rule Categories
error
no
path
query
rubygems
schema
servers
Rules
warn
rubygems-operation-ids-camel-case
All operationIds must use camelCase naming convention.
$.paths.*[get,post,put,patch,delete].operationId
warn
rubygems-tags-title-case
All tags must use Title Case.
$.tags[*].name
warn
rubygems-api-key-auth
Authenticated endpoints must use apiKeyAuth or basicAuth security schemes.
$.components.securitySchemes
warn
rubygems-json-responses
All GET endpoints should return application/json content type.
$.paths.*.get.responses.200.content
info
rubygems-paths-snake-case-params
Query parameter names should use snake_case per RubyGems convention.
$.paths.*[get,post,delete].parameters[?(@.in=='query')].name
error
rubygems-response-200-defined
All operations must define a 200 or 201 response.
$.paths.*[get,post,put,patch,delete].responses
warn
rubygems-401-on-protected
Protected endpoints must define a 401 response.
$.paths.*[post,delete,patch].responses
warn
rubygems-summaries-title-case
Operation summaries must use Title Case.
$.paths.*[get,post,put,patch,delete].summary
error
servers-https-only
Server URLs must use HTTPS.
$.servers[*].url
warn
servers-expected-domain
Server URLs should be on the rubygems.org domain.
$.servers[*].url
warn
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 snake_case (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 snake_case (the dominant convention in this API).
$.components.schemas[*].properties
warn
error-schema-defined
A shared error schema (Error) should be defined for error payloads.
$.components.schemas
warn
no-empty-descriptions
Descriptions must not be empty strings.
$..description