Skip to content

Commit 2468c67

Browse files
committed
add ClientMeta definition
A `oneOf` for a `client_meta` property is defined multiple times with the same values. Move the definition into `schemas` and share it.
1 parent 887d806 commit 2468c67

1 file changed

Lines changed: 14 additions & 15 deletions

File tree

openapi/openapi.yaml

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -652,12 +652,8 @@ paths:
652652
comment. You cannot reply to other replies (a comment that
653653
has a parent_id).
654654
client_meta:
655+
$ref: "#/components/schemas/ClientMeta"
655656
description: The position where to place the comment.
656-
oneOf:
657-
- $ref: "#/components/schemas/Vector"
658-
- $ref: "#/components/schemas/FrameOffset"
659-
- $ref: "#/components/schemas/Region"
660-
- $ref: "#/components/schemas/FrameOffsetRegion"
661657
required:
662658
- message
663659
responses:
@@ -6409,16 +6405,8 @@ components:
64096405
type: string
64106406
description: Unique identifier for comment.
64116407
client_meta:
6412-
description: Positioning information of the comment. Includes information on the
6413-
location of the comment pin, which is either the absolute
6414-
coordinates on the canvas or a relative offset within a frame. If
6415-
the comment is a region, it will also contain the region height,
6416-
width, and position of the anchor in regards to the region.
6417-
oneOf:
6418-
- $ref: "#/components/schemas/Vector"
6419-
- $ref: "#/components/schemas/FrameOffset"
6420-
- $ref: "#/components/schemas/Region"
6421-
- $ref: "#/components/schemas/FrameOffsetRegion"
6408+
$ref: "#/components/schemas/ClientMeta"
6409+
description: The position of the comment.
64226410
file_key:
64236411
type: string
64246412
description: The file in which the comment lives
@@ -6461,6 +6449,17 @@ components:
64616449
- message
64626450
- reactions
64636451
- order_id
6452+
ClientMeta:
6453+
description: Positioning information of a comment. Includes information on the
6454+
location of the comment pin, which is either the absolute
6455+
coordinates on the canvas or a relative offset within a frame. If
6456+
the comment is a region, it will also contain the region height,
6457+
width, and position of the anchor in regards to the region.
6458+
oneOf:
6459+
- $ref: "#/components/schemas/Vector"
6460+
- $ref: "#/components/schemas/FrameOffset"
6461+
- $ref: "#/components/schemas/Region"
6462+
- $ref: "#/components/schemas/FrameOffsetRegion"
64646463
Reaction:
64656464
type: object
64666465
description: A reaction left by a user.

0 commit comments

Comments
 (0)