Skip to content

Commit 659b5fd

Browse files
committed
Format Smithy files and generate smithy-build.json
1 parent c84cc76 commit 659b5fd

File tree

3 files changed

+25
-3
lines changed

3 files changed

+25
-3
lines changed

app/src/main/smithy/sonos.smithy

+3
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ operation Seek {
4242
@required
4343
@httpLabel
4444
groupId: GroupId
45+
4546
@required
4647
positionMillis: Milliseconds
4748
}
@@ -77,6 +78,7 @@ operation GetGroups {
7778
@httpLabel
7879
householdId: HouseholdId
7980
}
81+
8082
output := {
8183
@required
8284
groups: Groups
@@ -90,6 +92,7 @@ list Groups {
9092
structure Group {
9193
@required
9294
id: GroupId
95+
9396
@required
9497
name: String
9598
}

app/src/main/smithy/spotify.smithy

+13-3
Original file line numberDiff line numberDiff line change
@@ -51,17 +51,17 @@ list Devices {
5151

5252
structure Device {
5353
id: DeviceId
54+
5455
@required
5556
name: String
57+
5658
@jsonName("is_restricted")
5759
@required
5860
isRestricted: Boolean
5961
}
6062

6163
@http(method: "POST", uri: "/v1/me/player/next")
62-
operation NextTrack {
63-
64-
}
64+
operation NextTrack {}
6565

6666
@http(method: "PUT", uri: "/v1/me/player/seek")
6767
@idempotent
@@ -80,6 +80,7 @@ operation RemoveTrack {
8080
@httpLabel
8181
@required
8282
playlistId: String
83+
8384
@required
8485
tracks: Tracks
8586
}
@@ -102,6 +103,7 @@ operation GetAudioAnalysis {
102103
@required
103104
trackId: String
104105
}
106+
105107
output := {
106108
@required
107109
sections: Sections
@@ -123,10 +125,13 @@ structure Section {
123125
operation GetPlayer {
124126
output := {
125127
context: PlayerContext
128+
126129
item: PlayerItem
130+
127131
@required
128132
@jsonName("progress_ms")
129133
progressMillis: Integer
134+
130135
@required
131136
device: Device
132137
}
@@ -143,6 +148,7 @@ union PlayerContext {
143148
structure PlaylistContext {
144149
@required
145150
href: String
151+
146152
@required
147153
uri: String
148154
}
@@ -165,11 +171,14 @@ union PlayerItem {
165171
structure TrackItem {
166172
@required
167173
uri: String
174+
168175
@required
169176
@jsonName("duration_ms")
170177
durationMs: Integer
178+
171179
@required
172180
name: String
181+
173182
@required
174183
artists: Artists
175184
}
@@ -189,6 +198,7 @@ operation AddItemsToPlaylist {
189198
@httpLabel
190199
@required
191200
playlistId: String
201+
192202
@required
193203
@httpPayload
194204
uris: Uris

smithy-build.json

+9
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,13 @@
11
{
2+
"version": "1.0",
3+
"sources": ["app/src/main/smithy"],
4+
"maven": {
5+
"dependencies": [
6+
"com.disneystreaming.alloy:alloy-core:0.3.13",
7+
"com.disneystreaming.smithy4s:smithy4s-protocol:0.18.31"
8+
],
9+
"repositories": []
10+
},
211
"imports": ["./src/main/smithy"],
312
"mavenDependencies": ["com.disneystreaming.alloy:alloy-core:latest.release"]
413
}

0 commit comments

Comments
 (0)