Skip to content

Commit 521d93a

Browse files
committed
Fix: Omit sideload when not used
Hide the sideload when not initilized to comply with schema validation tools.
1 parent c59518a commit 521d93a

3 files changed

Lines changed: 25 additions & 25 deletions

File tree

projects/project.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -722,7 +722,7 @@ type ProjectGetResponse struct {
722722
// ProjectCategories contains the categories associated with the project.
723723
//
724724
// The key is the string representation of the project category ID.
725-
ProjectCategories map[string]ProjectCategory `json:"projectCategories"`
725+
ProjectCategories map[string]ProjectCategory `json:"projectCategories,omitempty"`
726726
} `json:"included"`
727727
}
728728

@@ -862,7 +862,7 @@ type ProjectListResponse struct {
862862
// ProjectCategories contains the categories associated with the project.
863863
//
864864
// The key is the string representation of the project category ID.
865-
ProjectCategories map[string]ProjectCategory `json:"projectCategories"`
865+
ProjectCategories map[string]ProjectCategory `json:"projectCategories,omitempty"`
866866
} `json:"included"`
867867
}
868868

projects/rates.go

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -355,8 +355,8 @@ type RateInstallationUserListResponse struct {
355355

356356
// Included contains related data.
357357
Included struct {
358-
Currencies map[string]Currency `json:"currencies"`
359-
Users map[string]twapi.Relationship `json:"users"`
358+
Currencies map[string]Currency `json:"currencies,omitempty"`
359+
Users map[string]twapi.Relationship `json:"users,omitempty"`
360360
} `json:"included"`
361361
}
362362

@@ -475,7 +475,7 @@ type RateInstallationUserGetResponse struct {
475475

476476
// Included contains related data.
477477
Included struct {
478-
Currencies map[string]Currency `json:"currencies"`
478+
Currencies map[string]Currency `json:"currencies,omitempty"`
479479
} `json:"included"`
480480
}
481481

@@ -741,7 +741,7 @@ type RateProjectGetResponse struct {
741741

742742
// Included contains related data.
743743
Included struct {
744-
Currencies map[string]Currency `json:"currencies"`
744+
Currencies map[string]Currency `json:"currencies,omitempty"`
745745
} `json:"included"`
746746
}
747747

@@ -1068,9 +1068,9 @@ type RateProjectUserListResponse struct {
10681068

10691069
// Included contains related data.
10701070
Included struct {
1071-
CostRates map[string]any `json:"costRates"`
1072-
Currencies map[string]Currency `json:"currencies"`
1073-
Users map[string]twapi.Relationship `json:"users"`
1071+
CostRates map[string]any `json:"costRates,omitempty"`
1072+
Currencies map[string]Currency `json:"currencies,omitempty"`
1073+
Users map[string]twapi.Relationship `json:"users,omitempty"`
10741074
} `json:"included"`
10751075
}
10761076

@@ -1192,7 +1192,7 @@ type RateProjectUserGetResponse struct {
11921192

11931193
// Included contains related data.
11941194
Included struct {
1195-
Currencies map[string]Currency `json:"currencies"`
1195+
Currencies map[string]Currency `json:"currencies,omitempty"`
11961196
} `json:"included"`
11971197
}
11981198

@@ -1448,8 +1448,8 @@ type RateProjectUserHistoryGetResponse struct {
14481448

14491449
// Included contains related data.
14501450
Included struct {
1451-
Currencies map[string]Currency `json:"currencies"`
1452-
Users map[string]twapi.Relationship `json:"users"`
1451+
Currencies map[string]Currency `json:"currencies,omitempty"`
1452+
Users map[string]twapi.Relationship `json:"users,omitempty"`
14531453
} `json:"included"`
14541454
}
14551455

projects/search.go

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -223,55 +223,55 @@ type SearchResponse struct {
223223
// results.
224224
//
225225
// The key is the string representation of the calendar event ID.
226-
CalendarEvents map[string]CalendarEvent `json:"calendarEvents"`
226+
CalendarEvents map[string]CalendarEvent `json:"calendarEvents,omitempty"`
227227
// Comments contains the comments associated with the search results.
228228
//
229229
// The key is the string representation of the comment ID.
230-
Comments map[string]Comment `json:"comments"`
230+
Comments map[string]Comment `json:"comments,omitempty"`
231231
// Companies contains the companies associated with the search results.
232232
//
233233
// The key is the string representation of the company ID.
234-
Companies map[string]Company `json:"companies"`
234+
Companies map[string]Company `json:"companies,omitempty"`
235235
// Links contains the links associated with the search results.
236236
//
237237
// The key is the string representation of the link ID.
238-
Links map[string]Link `json:"links"`
238+
Links map[string]Link `json:"links,omitempty"`
239239
// Messages contains the messages associated with the search results.
240240
//
241241
// The key is the string representation of the message ID.
242-
Messages map[string]Message `json:"messages"`
242+
Messages map[string]Message `json:"messages,omitempty"`
243243
// Milestones contains the milestones associated with the search results.
244244
//
245245
// The key is the string representation of the milestone ID.
246-
Milestones map[string]Milestone `json:"milestones"`
246+
Milestones map[string]Milestone `json:"milestones,omitempty"`
247247
// Notebooks contains the notebooks associated with the search results.
248248
//
249249
// The key is the string representation of the notebook ID.
250-
Notebooks map[string]Notebook `json:"notebooks"`
250+
Notebooks map[string]Notebook `json:"notebooks,omitempty"`
251251
// Projects contains the projects associated with the search results.
252252
//
253253
// The key is the string representation of the project ID.
254-
Projects map[string]Project `json:"projects"`
254+
Projects map[string]Project `json:"projects,omitempty"`
255255
// Tasklists contains the tasklists associated with the search results.
256256
//
257257
// The key is the string representation of the tasklist ID.
258-
Tasklists map[string]Tasklist `json:"tasklists"`
258+
Tasklists map[string]Tasklist `json:"tasklists,omitempty"`
259259
// Tasks contains the tasks associated with the search results.
260260
//
261261
// The key is the string representation of the task ID.
262-
Tasks map[string]Task `json:"tasks"`
262+
Tasks map[string]Task `json:"tasks,omitempty"`
263263
// Teams contains the teams associated with the search results.
264264
//
265265
// The key is the string representation of the team ID.
266-
Teams map[string]Team `json:"teams"`
266+
Teams map[string]Team `json:"teams,omitempty"`
267267
// Timelogs contains the timelogs associated with the search results.
268268
//
269269
// The key is the string representation of the timelog ID.
270-
Timelogs map[string]Timelog `json:"timelogs"`
270+
Timelogs map[string]Timelog `json:"timelogs,omitempty"`
271271
// Users contains the users associated with the search results.
272272
//
273273
// The key is the string representation of the user ID.
274-
Users map[string]User `json:"users"`
274+
Users map[string]User `json:"users,omitempty"`
275275
} `json:"included"`
276276
}
277277

0 commit comments

Comments
 (0)