Skip to content

Commit cddc990

Browse files
feat(api): expose test retrieval endpoint
1 parent d6c9d2b commit cddc990

File tree

2 files changed

+34
-1
lines changed

2 files changed

+34
-1
lines changed

.stats.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
configured_endpoints: 17
2-
openapi_spec_hash: 17fb5502c19253c7c89785273e89b023
2+
openapi_spec_hash: 8827ead72aa0c635ccafac5e008fe247
33
config_hash: 087e6b8013c398a6d24031d24594fdec

projecttest.go

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -358,13 +358,15 @@ func (r ProjectTestNewResponseType) IsKnown() bool {
358358
}
359359

360360
type ProjectTestListResponse struct {
361+
Meta ProjectTestListResponse_Meta `json:"_meta,required"`
361362
Items []ProjectTestListResponseItem `json:"items,required"`
362363
JSON projectTestListResponseJSON `json:"-"`
363364
}
364365

365366
// projectTestListResponseJSON contains the JSON metadata for the struct
366367
// [ProjectTestListResponse]
367368
type projectTestListResponseJSON struct {
369+
Meta apijson.Field
368370
Items apijson.Field
369371
raw string
370372
ExtraFields map[string]apijson.Field
@@ -378,6 +380,37 @@ func (r projectTestListResponseJSON) RawJSON() string {
378380
return r.raw
379381
}
380382

383+
type ProjectTestListResponse_Meta struct {
384+
// The current page.
385+
Page int64 `json:"page,required"`
386+
// The number of items per page.
387+
PerPage int64 `json:"perPage,required"`
388+
// The total number of items.
389+
TotalItems int64 `json:"totalItems,required"`
390+
// The total number of pages.
391+
TotalPages int64 `json:"totalPages,required"`
392+
JSON projectTestListResponseMetaJSON `json:"-"`
393+
}
394+
395+
// projectTestListResponseMetaJSON contains the JSON metadata for the struct
396+
// [ProjectTestListResponse_Meta]
397+
type projectTestListResponseMetaJSON struct {
398+
Page apijson.Field
399+
PerPage apijson.Field
400+
TotalItems apijson.Field
401+
TotalPages apijson.Field
402+
raw string
403+
ExtraFields map[string]apijson.Field
404+
}
405+
406+
func (r *ProjectTestListResponse_Meta) UnmarshalJSON(data []byte) (err error) {
407+
return apijson.UnmarshalRoot(data, r)
408+
}
409+
410+
func (r projectTestListResponseMetaJSON) RawJSON() string {
411+
return r.raw
412+
}
413+
381414
type ProjectTestListResponseItem struct {
382415
// The test id.
383416
ID string `json:"id,required" format:"uuid"`

0 commit comments

Comments
 (0)