Allianz Trade · API Governance Rules

Allianz Trade API Rules

Spectral linting rules defining API design standards and conventions for Allianz Trade.

22 Rules error 5 warn 14 info 3
View Rules File View on GitHub

Rule Categories

allianz

Rules

warn
allianz-trade-operation-summary-prefix
All operation summaries must start with "Allianz Trade"
$.paths[*][*].summary
error
allianz-trade-operation-tags
All operations must have at least one tag
$.paths[*][*]
error
allianz-trade-operation-id
All operations must have an operationId
$.paths[*][*]
warn
allianz-trade-operation-description
All operations must have a description
$.paths[*][*]
warn
allianz-trade-pagination-page-size
List operations must support pageSize query parameter
$.paths[*].get
warn
allianz-trade-pagination-page
List operations must support page query parameter
$.paths[*].get
warn
allianz-trade-pagination-total-required
List operations must support totalRequired query parameter
$.paths[*].get
warn
allianz-trade-async-202
Write operations (POST/PATCH/DELETE) must return 202 for async processing
$.paths[*][post,patch,delete]
warn
allianz-trade-async-job-response
202 responses must reference JobResponse schema
$.paths[*][post,patch,delete].responses.202.content.application/json.schema.$ref
error
allianz-trade-error-response-401
All operations must document 401 Unauthorized response
$.paths[*][*].responses
warn
allianz-trade-error-schema-code
ErrorResponse must have a code property
$.components.schemas.ErrorResponse.properties
warn
allianz-trade-error-schema-message
ErrorResponse must have a message property
$.components.schemas.ErrorResponse.properties
error
allianz-trade-oauth2-security
API must use OAuth2 security scheme
$.components.securitySchemes
error
allianz-trade-oauth2-client-credentials
OAuth2 must use client credentials flow
$.components.securitySchemes.OAuth2.flows
warn
allianz-trade-schema-title
All schemas must have a title
$.components.schemas[*]
warn
allianz-trade-schema-description
All schemas must have a description
$.components.schemas[*]
warn
allianz-trade-property-description
All schema properties must have a description
$.components.schemas[*].properties[*]
info
allianz-trade-property-example
Schema properties should have examples
$.components.schemas[*].properties[*]
info
allianz-trade-microcks-operation
All operations should have x-microcks-operation extension
$.paths[*][*]
info
allianz-trade-id-pattern
Identifier fields should follow Allianz Trade ID pattern (PREFIX-NNNNNN)
$.components.schemas[*].properties[?(@property.endsWith('Id'))].example
warn
allianz-trade-currency-iso
Currency properties must use ISO 4217 format
$.components.schemas[*].properties.currency.description
warn
allianz-trade-date-format
Date properties must specify date format
$.components.schemas[*].properties[?(@property.endsWith('Date') || @property.endsWith('date'))].format