Skip to content

fix: resolve allOf + additionalProperties: false conflict across all 14 payload schemas in asyncapi-trading-v2.yaml #29

@coderabbitai

Description

@coderabbitai

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:

  1. Consolidate each payload into a single explicit object schema with all four properties (type, timestamp, channel, data) and a single additionalProperties: false, or
  2. Remove additionalProperties: false from BaseUpdateEnvelope and all *UpdateBody subschemas, and enforce it only on the final *UpdatePayload schemas.

References

/cc @arturbeg

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions