asyncapi: '2.6.0' info: title: A sample Spec file version: '69.420' servers: test-server: url: localhost protocol: ws channels: oneapi: servers: - test-server publish: operationId: SampleRequest message: $ref: '#/components/messages/SampleRequest' components: messages: SampleRequest: payload: $ref: '#/components/schemas/SampleRequestPayload' schemas: RequestBase: type: object additionalProperties: false properties: id: type: string description: "correlation id to match request and response" kind: type: string const: request required: - id - kind GetUser: description: TODO discriminant: balls oneOf: - $ref: '#/components/schemas/RequestBase' - type: object additionalProperties: false properties: event: type: string const: deezNuts data: title: GetUserData type: object properties: userId: type: string required: - userId required: - data - event DeleteUser: description: TODO allOf: - $ref: '#/components/schemas/RequestBase' - type: object properties: child: type: array prefixItems: - type: object - type: string event: type: string const: someRandomVALUE data: title: DeleteUserData type: object properties: userId: type: string userName: type: string required: - userId - userName required: - data - event SampleRequestPayload: description: "SampleRequestPayload" discriminator: event oneOf: - $ref: '#/components/schemas/GetUser' - $ref: '#/components/schemas/DeleteUser'