Stripe · API Governance Rules
Stripe API Rules
Spectral linting rules defining API design standards and conventions for Stripe.
12 Rules
error 4
warn 5
Rule Categories
stripe
Rules
error
stripe-versioned-paths
All Stripe API paths must start with /v1/
$.paths[*]~
warn
stripe-operation-id-camel-case
Stripe operationIds use PascalCase (e.g., GetCharge, CreatePaymentIntent)
$.paths[*][get,post,put,patch,delete].operationId
error
stripe-operation-id-required
All Stripe operations must have an operationId
$.paths[*][get,post,put,patch,delete]
warn
stripe-tags-required
All Stripe operations must have at least one tag
$.paths[*][get,post,put,patch,delete]
error
stripe-auth-defined
Stripe API must define security schemes (basicAuth or bearerAuth)
$.components.securitySchemes
warn
stripe-response-200-defined
All Stripe operations must define a 200 response
$.paths[*][get,post,put,patch,delete].responses
hint
stripe-error-response-defined
Stripe operations should define error responses
$.paths[*][get,post,put,patch,delete].responses
warn
stripe-no-trailing-slash
Stripe paths must not have trailing slashes
$.paths[*]~
hint
stripe-expand-param-style
Expand parameters in Stripe must use deepObject style
$.paths[*][get,post,put,patch,delete].parameters[?(@.name=='expand')]
hint
stripe-content-type-json
Stripe POST/PUT/PATCH operations that have request bodies should support application/x-www-form-urlencoded or application/json
$.paths[*][post,put,patch].requestBody.content
warn
stripe-info-contact
Stripe OpenAPI specs must include contact info
$.info
error
stripe-servers-defined
Stripe API must define servers
$