events-backend: update schema

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
Patrik Oldsberg
2024-05-25 15:34:54 +02:00
parent cd243f994f
commit 2e2fc18dcc
3 changed files with 9 additions and 18 deletions
@@ -73,7 +73,6 @@ export const spec = {
description: 'The topic that the event is published on',
},
payload: {
$ref: '#/components/schemas/JsonObject',
description: 'The event payload',
},
},
@@ -117,11 +116,6 @@ export const spec = {
},
required: ['error', 'request', 'response'],
},
JsonObject: {
type: 'object',
properties: {},
additionalProperties: {},
},
},
securitySchemes: {
JWT: {
@@ -269,8 +263,9 @@ export const spec = {
},
},
},
'201': {
description: 'Block poll response, new events are available',
'202': {
description:
'No new events are available. Response will block until the client should try again.',
},
default: {
$ref: '#/components/responses/ErrorResponse',
@@ -39,7 +39,6 @@ components:
type: string
description: The topic that the event is published on
payload:
$ref: '#/components/schemas/JsonObject'
description: The event payload
Error:
@@ -76,12 +75,6 @@ components:
- error
- request
- response
JsonObject:
type: object
properties: {}
# Free form object.
additionalProperties: {}
securitySchemes:
JWT:
type: http
@@ -178,8 +171,8 @@ paths:
$ref: '#/components/schemas/Event'
required:
- results
'201':
description: Block poll response, new events are available
'202':
description: No new events are available. Response will block until the client should try again.
default:
$ref: '#/components/responses/ErrorResponse'
security:
@@ -23,5 +23,8 @@ export interface Event {
* The topic that the event is published on
*/
topic: string;
payload: { [key: string]: any };
/**
* The event payload
*/
payload: any | null;
}