Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 15 additions & 3 deletions openapi/components/schemas/Notification.yaml
Original file line number Diff line number Diff line change
@@ -1,21 +1,33 @@
title: Notification
type: object
description: ""

Check warning on line 3 in openapi/components/schemas/Notification.yaml

View workflow job for this annotation

GitHub Actions / lint

vrc-description

Cannot be empty.
properties:
created_at:
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
Comment on lines +13 to +15

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ideally we would somehow have the detail be either a string or the deserialization of the concrete type be determined by the type field of the Notification?

- $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
message:
type: string
description: ""

Check warning on line 30 in openapi/components/schemas/Notification.yaml

View workflow job for this annotation

GitHub Actions / lint

vrc-description

Cannot be empty.
example: This is a generated invite to VRChat Hub
receiverUserId:
$ref: ./UserID.yaml
Expand Down
Loading