Background
All 14 *UpdatePayload schemas in asyncapi-trading-v2.yaml use allOf to compose BaseUpdateEnvelope with their respective *UpdateBody schemas. Both subschemas independently set additionalProperties: false:
BaseUpdateEnvelope only allows type and timestamp
- Each
*UpdateBody only allows channel and data
Because both subschemas restrict additional properties independently, no object can satisfy both constraints simultaneously. The intended payload shape { type, timestamp, channel, data } will be rejected by strict validators.
This affects all 14 payload schemas, including (but not limited to):
MarketSpotTradeBustUpdatePayload
WalletSpotTradeBustUpdatePayload
MarketsSummaryUpdatePayload
MarketSummaryUpdatePayload
PositionUpdatePayload
OrderChangeUpdatePayload
MarketPerpExecutionUpdatePayload
MarketDepthUpdatePayload
MarketSpotExecutionUpdatePayload
WalletPerpExecutionUpdatePayload
WalletSpotExecutionUpdatePayload
AccountBalanceUpdatePayload
PricesUpdatePayload
PriceUpdatePayload
Proposed Fix
Either:
- Consolidate each payload into a single explicit object schema with all four properties (
type, timestamp, channel, data) and a single additionalProperties: false, or
- Remove
additionalProperties: false from BaseUpdateEnvelope and all *UpdateBody subschemas, and enforce it only on the final *UpdatePayload schemas.
References
/cc @arturbeg
Background
All 14
*UpdatePayloadschemas inasyncapi-trading-v2.yamluseallOfto composeBaseUpdateEnvelopewith their respective*UpdateBodyschemas. Both subschemas independently setadditionalProperties: false:BaseUpdateEnvelopeonly allowstypeandtimestamp*UpdateBodyonly allowschannelanddataBecause both subschemas restrict additional properties independently, no object can satisfy both constraints simultaneously. The intended payload shape
{ type, timestamp, channel, data }will be rejected by strict validators.This affects all 14 payload schemas, including (but not limited to):
MarketSpotTradeBustUpdatePayloadWalletSpotTradeBustUpdatePayloadMarketsSummaryUpdatePayloadMarketSummaryUpdatePayloadPositionUpdatePayloadOrderChangeUpdatePayloadMarketPerpExecutionUpdatePayloadMarketDepthUpdatePayloadMarketSpotExecutionUpdatePayloadWalletPerpExecutionUpdatePayloadWalletSpotExecutionUpdatePayloadAccountBalanceUpdatePayloadPricesUpdatePayloadPriceUpdatePayloadProposed Fix
Either:
type,timestamp,channel,data) and a singleadditionalProperties: false, oradditionalProperties: falsefromBaseUpdateEnvelopeand all*UpdateBodysubschemas, and enforce it only on the final*UpdatePayloadschemas.References
/cc @arturbeg