diff --git a/openapi/components/schemas/Notification.yaml b/openapi/components/schemas/Notification.yaml index 4637ed91..a07d0a59 100644 --- a/openapi/components/schemas/Notification.yaml +++ b/openapi/components/schemas/Notification.yaml @@ -6,10 +6,22 @@ properties: type: string format: date-time details: - type: string description: "**NOTICE:** This is not a JSON object when received from the REST API, but it is when received from the Websocket API. When received from the REST API, this is a json **encoded** object, meaning you have to json-de-encode to get the NotificationDetail object depending on the NotificationType." - default: "{}" - example: "OneOf: {}, NotificationDetailBoop, NotificationDetailInvite, NotificationDetailInviteResponse, NotificationDetailRequestInvite, NotificationDetailRequestInviteResponse, NotificationDetailVoteToKick" + x-if: + when: jsonschema + then: + oneOf: + - type: string + - $ref: ./NotificationDetailBoop.yaml + - $ref: ./NotificationDetailInvite.yaml + - $ref: ./NotificationDetailInviteResponse.yaml + - $ref: ./NotificationDetailRequestInvite.yaml + - $ref: ./NotificationDetailRequestInviteResponse.yaml + - $ref: ./NotificationDetailVoteToKick.yaml + else: + type: string + default: "{}" + example: "OneOf: {}, NotificationDetailBoop, NotificationDetailInvite, NotificationDetailInviteResponse, NotificationDetailRequestInvite, NotificationDetailRequestInviteResponse, NotificationDetailVoteToKick" id: type: string minLength: 1