Skip to content

Commit 16ffcda

Browse files
committed
chore: clean up structure for activeSegmentPart
1 parent a5f6e13 commit 16ffcda

File tree

13 files changed

+91
-79
lines changed

13 files changed

+91
-79
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
$ref: '../partBase/partBase-example.yaml'
2+
timing:
3+
expectedDurationMs: 15000
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
$defs:
2+
# TODO: Move this into the parts folder
3+
currentSegmentPart:
4+
title: CurrentSegmentPart
5+
type: object
6+
allOf:
7+
- $ref: '../partBase/partBase.yaml#/$defs/partBase'
8+
- type: object
9+
title: CurrentSegmentPart
10+
properties:
11+
timing:
12+
$ref: '../../timing/currentSegmentPartTiming/currentSegmentPartTiming.yaml#/$defs/currentSegmentPartTiming'
13+
additionalProperties: false
14+
required: [id, name, timing]
15+
additionalProperties: false
16+
examples:
17+
- $ref: './currentSegmentPart-example.yaml'
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
id: 'H5CBGYjThrMSmaYvRaa5FVKJIzk_'
2+
name: 'Intro'
3+
autoNext: false
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
$defs:
2+
partBase:
3+
type: object
4+
title: PartBase
5+
properties:
6+
id:
7+
description: Unique id of the part
8+
type: string
9+
name:
10+
description: User-presentable name of the part
11+
type: string
12+
autoNext:
13+
description: If this part will progress to the next automatically
14+
type: boolean
15+
default: false
16+
required: [id, name, segmentId, pieces]
17+
additionalProperties: false
18+
examples:
19+
- $ref: './partBase-example.yaml'

packages/live-status-gateway-api/api/refactor/components/part/partStatus/partStatus-example.yaml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
1-
id: 'H5CBGYjThrMSmaYvRaa5FVKJIzk_'
2-
name: 'Intro'
1+
$ref: '../partBase/partBase-example.yaml'
32
segmentId: 'n1mOVd5_K5tt4sfk6HYfTuwumGQ_'
4-
autoNext: false
53
pieces:
64
- $ref: '../../piece/pieceStatus/pieceStatus.yaml#/$defs/pieceStatus/examples/0'
75
publicData:

packages/live-status-gateway-api/api/refactor/components/part/partStatus/partStatus.yaml

Lines changed: 16 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,21 @@ $defs:
22
partStatus:
33
type: object
44
title: PartStatus
5-
properties:
6-
id:
7-
description: Unique id of the part
8-
type: string
9-
name:
10-
description: User name of the part
11-
type: string
12-
segmentId:
13-
description: Unique id of the segment this part belongs to
14-
type: string
15-
autoNext:
16-
description: If this part will progress to the next automatically
17-
type: boolean
18-
default: false
19-
pieces:
20-
description: All pieces in this part
21-
type: array
22-
items:
23-
$ref: '../../piece/pieceStatus/pieceStatus.yaml#/$defs/pieceStatus'
24-
publicData:
25-
description: Optional arbitrary data
26-
required: [id, name, segmentId, pieces]
5+
allOf:
6+
- $ref: '../partBase/partBase.yaml#/$defs/partBase'
7+
- type: object
8+
title: PartStatus
9+
properties:
10+
segmentId:
11+
description: Unique id of the segment this part belongs to
12+
type: string
13+
pieces:
14+
description: All pieces in this part
15+
type: array
16+
items:
17+
$ref: '../../piece/pieceStatus/pieceStatus.yaml#/$defs/pieceStatus'
18+
publicData:
19+
description: Optional arbitrary data
20+
required: [id, name, segmentId, pieces]
2721
examples:
2822
- $ref: './partStatus-example.yaml'

packages/live-status-gateway-api/api/refactor/components/playlist/activePlaylist.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# TODO: don't forget this
12
title: Active Playlist
23
description: Active Playlist schema for websocket subscriptions
34
$defs:

packages/live-status-gateway-api/api/refactor/components/segment/segment.yaml

Lines changed: 1 addition & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,4 @@
11
$defs:
2-
# TODO: Move this into the parts folder
3-
currentSegmentPart:
4-
title: CurrentSegmentPart
5-
type: object
6-
properties:
7-
id:
8-
description: Unique id of the part
9-
type: string
10-
name:
11-
description: User-presentable name of the part
12-
type: string
13-
autoNext:
14-
description: If this part will progress to the next automatically
15-
type: boolean
16-
default: false
17-
timing:
18-
$ref: '../timing/currentSegmentPartTiming.yaml#/$defs/currentSegmentPartTiming'
19-
required: [id, name, timing]
20-
examples:
21-
- id: 'H5CBGYjThrMSmaYvRaa5FVKJIzk_'
22-
name: 'Intro'
23-
timing:
24-
expectedDurationMs: 15000
25-
additionalProperties: false
26-
272
# TODO: move this into it's own folder
283
currentSegment:
294
title: CurrentSegment
@@ -37,7 +12,7 @@ $defs:
3712
parts:
3813
type: array
3914
items:
40-
$ref: '#/$defs/currentSegmentPart'
15+
$ref: '../part/currentSegmentPart/currentSegmentPart.yaml#/$defs/currentSegmentPart'
4116
required: [id, timing, parts]
4217
additionalProperties: false
4318

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1+
$ref: '../currentSegmentPartTiming/currentSegmentPartTiming-example.yaml'
12
startTime: 1600000060000
2-
expectedDurationMs: 15000
33
projectedEndTime: 1600000075000

packages/live-status-gateway-api/api/refactor/components/timing/currentPartTiming/currentPartTiming.yaml

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,18 @@ $defs:
33
type: object
44
title: CurrentPartTiming
55
description: Timing information about the current part
6-
properties:
7-
startTime:
8-
description: Unix timestamp of when the part started (milliseconds)
9-
type: number
10-
expectedDurationMs:
11-
description: Expected duration of the part (milliseconds)
12-
type: number
13-
projectedEndTime:
14-
description: Unix timestamp of when the part is projected to end (milliseconds). A sum of `startTime` and `expectedDurationMs`.
15-
type: number
6+
allOf:
7+
- $ref: '../currentSegmentPartTiming/currentSegmentPartTiming.yaml#/$defs/currentSegmentPartTiming'
8+
- type: object
9+
title: CurrentPartTiming
10+
description: Timing information about the current part
11+
properties:
12+
startTime:
13+
description: Unix timestamp of when the part started (milliseconds)
14+
type: number
15+
projectedEndTime:
16+
description: Unix timestamp of when the part is projected to end (milliseconds). A sum of `startTime` and `expectedDurationMs`.
17+
type: number
1618
required: [startTime, expectedDurationMs, projectedEndTime]
1719
examples:
1820
- $ref: './currentPartTiming-example.yaml'

0 commit comments

Comments
 (0)