Allianz Trade · API Governance Rules
Allianz Trade API Rules
Spectral linting rules defining API design standards and conventions for Allianz Trade.
31 Rules
error 6
warn 21
info 4
Rule Categories
allianz
error
no
operationid
path
query
schema
servers
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
error
servers-https-only
Server URLs must use HTTPS.
$.servers[*].url
warn
servers-expected-domain
Server URLs should be on the allianz-trade.com 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 camelCase (the dominant convention in this API).
$.paths[*][get,post,put,patch,delete].parameters[?(@.in=='query')]
warn
operationid-casing
Operation IDs should be camelCase (the dominant convention in this API).
$.paths[*][get,post,put,patch,delete].operationId
warn
schema-names-casing
Component schema names should be PascalCase (the dominant convention in this API).
$.components.schemas
info
schema-properties-casing
Schema properties should be camelCase (the dominant convention in this API).
$.components.schemas[*].properties
warn
error-schema-defined
A shared error schema (ErrorResponse) should be defined for error payloads.
$.components.schemas
warn
no-empty-descriptions
Descriptions must not be empty strings.
$..description