Airwallex · API Governance Rules

Airwallex API Rules

Spectral linting rules defining API design standards and conventions for Airwallex.

29 Rules error 11 warn 14 info 4
View Rules File View on GitHub

Rule Categories

airwallex

Rules

error
airwallex-payment-intent-required-fields
Payment intent must include id, amount, currency, and status.
$.components.schemas.PaymentIntent.required
error
airwallex-transfer-required-fields
Transfer object must include id, source_amount, source_currency, and status.
$.components.schemas.Transfer.required
error
airwallex-operation-summary-exists
Every API operation must have a non-empty summary.
$.paths[*][get,post,put,patch,delete]
warn
airwallex-operation-summary-title-case
Operation summaries must be in Title Case.
$.paths[*][get,post,put,patch,delete].summary
warn
airwallex-operation-description-exists
Every API operation should have a description.
$.paths[*][get,post,put,patch,delete]
error
airwallex-operation-tags-exist
Every operation must be tagged for grouping and documentation.
$.paths[*][get,post,put,patch,delete]
error
airwallex-operation-id-exists
Every operation must have a unique operationId.
$.paths[*][get,post,put,patch,delete]
warn
airwallex-operation-id-camel-case
operationId must be in camelCase format.
$.paths[*][get,post,put,patch,delete].operationId
error
airwallex-response-200-exists
Every GET operation must define a 200 success response.
$.paths[*].get
warn
airwallex-response-400-documented
Operations accepting request bodies should document 400 errors.
$.paths[*][post,put]
warn
airwallex-currency-iso4217-format
Currency fields must be ISO 4217 three-letter uppercase codes.
$.components.schemas[*].properties[*currency*]
warn
airwallex-amount-type-number
Amount fields must be typed as number.
$.components.schemas[*].properties[*amount*]
warn
airwallex-status-enum-defined
Status fields must use an enum of allowed values.
$.components.schemas[*].properties.status
warn
airwallex-schema-description-exists
All schema components must include a description.
$.components.schemas[*]
info
airwallex-property-description-exists
All schema properties should include descriptions.
$.components.schemas[*].properties[*]
warn
airwallex-datetime-format
Timestamp fields must use date-time format.
$.components.schemas[*].properties[*_at]
info
airwallex-microcks-operation-extension
All operations should include x-microcks-operation for mock support.
$.paths[*][get,post,put,patch,delete]
error
airwallex-security-defined
API must define security schemes for authentication.
$
warn
airwallex-bearer-auth-scheme
Airwallex APIs must use Bearer token authentication.
$.components.securitySchemes[*]
warn
airwallex-path-lowercase
API paths must be lowercase and use hyphens for word separation.
$.paths[*]~
warn
airwallex-no-trailing-slash
API paths must not end with a trailing slash.
$.paths[*]~
error
airwallex-info-title-exists
API info block must include a title.
$.info
error
airwallex-info-version-exists
API info block must include a version.
$.info
warn
airwallex-info-description-exists
API info block should include a description.
$.info
info
airwallex-contact-info-exists
API info should include contact information.
$.info
error
airwallex-servers-defined
API must define at least one server URL.
$
error
airwallex-server-https
All server URLs must use HTTPS.
$.servers[*].url
info
airwallex-pagination-limit-param
List endpoints should support a limit query parameter.
$.paths[*].get.parameters[*][?(@.in == 'query' && @.name == 'limit')]
warn
airwallex-request-body-content-type
Request bodies must specify application/json content type.
$.paths[*][post,put,patch].requestBody.content