Skip to content

Commit 420f95c

Browse files
feat(api): api update
1 parent 7520d53 commit 420f95c

File tree

12 files changed

+2136
-127
lines changed

12 files changed

+2136
-127
lines changed

.stats.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
configured_endpoints: 16
2-
openapi_spec_hash: 7c835c55ec387350b647a302c48edb9d
2+
openapi_spec_hash: 8827ead72aa0c635ccafac5e008fe247
33
config_hash: 0383360784fc87d799bad2be203142b5

openlayer-java-core/src/main/kotlin/com/openlayer/api/models/commits/testresults/TestResultListParams.kt

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ private constructor(
2929

3030
fun projectVersionId(): String = projectVersionId
3131

32-
/** Include archived goals. */
32+
/** Filter for archived tests. */
3333
fun includeArchived(): Optional<Boolean> = Optional.ofNullable(includeArchived)
3434

3535
/** The page to return in a paginated query. */
@@ -97,7 +97,7 @@ private constructor(
9797
this.projectVersionId = projectVersionId
9898
}
9999

100-
/** Include archived goals. */
100+
/** Filter for archived tests. */
101101
fun includeArchived(includeArchived: Boolean?) = apply {
102102
this.includeArchived = includeArchived
103103
}

openlayer-java-core/src/main/kotlin/com/openlayer/api/models/commits/testresults/TestResultListResponse.kt

+524-20
Large diffs are not rendered by default.

openlayer-java-core/src/main/kotlin/com/openlayer/api/models/inferencepipelines/testresults/TestResultListResponse.kt

+524-20
Large diffs are not rendered by default.

openlayer-java-core/src/main/kotlin/com/openlayer/api/models/projects/tests/TestCreateParams.kt

+526-30
Large diffs are not rendered by default.

openlayer-java-core/src/main/kotlin/com/openlayer/api/models/projects/tests/TestCreateResponse.kt

+516-20
Large diffs are not rendered by default.

openlayer-java-core/src/test/kotlin/com/openlayer/api/models/commits/testresults/TestResultListResponseTest.kt

+10-6
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,9 @@ internal class TestResultListResponseTest {
4242
.name("No duplicate rows")
4343
.number(1L)
4444
.originProjectVersionId("3fa85f64-5717-4562-b3fc-2c963f66afa6")
45-
.subtype("duplicateRowCount")
45+
.subtype(
46+
TestResultListResponse.Item.Goal.Subtype.DUPLICATE_ROW_COUNT
47+
)
4648
.suggested(false)
4749
.addThreshold(
4850
TestResultListResponse.Item.Goal.Threshold.builder()
@@ -67,7 +69,7 @@ internal class TestResultListResponseTest {
6769
.value(0.0)
6870
.build()
6971
)
70-
.type("integrity")
72+
.type(TestResultListResponse.Item.Goal.Type.INTEGRITY)
7173
.archived(false)
7274
.delayWindow(0.0)
7375
.evaluationWindow(3600.0)
@@ -111,7 +113,7 @@ internal class TestResultListResponseTest {
111113
.name("No duplicate rows")
112114
.number(1L)
113115
.originProjectVersionId("3fa85f64-5717-4562-b3fc-2c963f66afa6")
114-
.subtype("duplicateRowCount")
116+
.subtype(TestResultListResponse.Item.Goal.Subtype.DUPLICATE_ROW_COUNT)
115117
.suggested(false)
116118
.addThreshold(
117119
TestResultListResponse.Item.Goal.Threshold.builder()
@@ -135,7 +137,7 @@ internal class TestResultListResponseTest {
135137
.value(0.0)
136138
.build()
137139
)
138-
.type("integrity")
140+
.type(TestResultListResponse.Item.Goal.Type.INTEGRITY)
139141
.archived(false)
140142
.delayWindow(0.0)
141143
.evaluationWindow(3600.0)
@@ -183,7 +185,9 @@ internal class TestResultListResponseTest {
183185
.name("No duplicate rows")
184186
.number(1L)
185187
.originProjectVersionId("3fa85f64-5717-4562-b3fc-2c963f66afa6")
186-
.subtype("duplicateRowCount")
188+
.subtype(
189+
TestResultListResponse.Item.Goal.Subtype.DUPLICATE_ROW_COUNT
190+
)
187191
.suggested(false)
188192
.addThreshold(
189193
TestResultListResponse.Item.Goal.Threshold.builder()
@@ -208,7 +212,7 @@ internal class TestResultListResponseTest {
208212
.value(0.0)
209213
.build()
210214
)
211-
.type("integrity")
215+
.type(TestResultListResponse.Item.Goal.Type.INTEGRITY)
212216
.archived(false)
213217
.delayWindow(0.0)
214218
.evaluationWindow(3600.0)

openlayer-java-core/src/test/kotlin/com/openlayer/api/models/inferencepipelines/testresults/TestResultListResponseTest.kt

+10-6
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,9 @@ internal class TestResultListResponseTest {
4242
.name("No duplicate rows")
4343
.number(1L)
4444
.originProjectVersionId("3fa85f64-5717-4562-b3fc-2c963f66afa6")
45-
.subtype("duplicateRowCount")
45+
.subtype(
46+
TestResultListResponse.Item.Goal.Subtype.DUPLICATE_ROW_COUNT
47+
)
4648
.suggested(false)
4749
.addThreshold(
4850
TestResultListResponse.Item.Goal.Threshold.builder()
@@ -67,7 +69,7 @@ internal class TestResultListResponseTest {
6769
.value(0.0)
6870
.build()
6971
)
70-
.type("integrity")
72+
.type(TestResultListResponse.Item.Goal.Type.INTEGRITY)
7173
.archived(false)
7274
.delayWindow(0.0)
7375
.evaluationWindow(3600.0)
@@ -111,7 +113,7 @@ internal class TestResultListResponseTest {
111113
.name("No duplicate rows")
112114
.number(1L)
113115
.originProjectVersionId("3fa85f64-5717-4562-b3fc-2c963f66afa6")
114-
.subtype("duplicateRowCount")
116+
.subtype(TestResultListResponse.Item.Goal.Subtype.DUPLICATE_ROW_COUNT)
115117
.suggested(false)
116118
.addThreshold(
117119
TestResultListResponse.Item.Goal.Threshold.builder()
@@ -135,7 +137,7 @@ internal class TestResultListResponseTest {
135137
.value(0.0)
136138
.build()
137139
)
138-
.type("integrity")
140+
.type(TestResultListResponse.Item.Goal.Type.INTEGRITY)
139141
.archived(false)
140142
.delayWindow(0.0)
141143
.evaluationWindow(3600.0)
@@ -183,7 +185,9 @@ internal class TestResultListResponseTest {
183185
.name("No duplicate rows")
184186
.number(1L)
185187
.originProjectVersionId("3fa85f64-5717-4562-b3fc-2c963f66afa6")
186-
.subtype("duplicateRowCount")
188+
.subtype(
189+
TestResultListResponse.Item.Goal.Subtype.DUPLICATE_ROW_COUNT
190+
)
187191
.suggested(false)
188192
.addThreshold(
189193
TestResultListResponse.Item.Goal.Threshold.builder()
@@ -208,7 +212,7 @@ internal class TestResultListResponseTest {
208212
.value(0.0)
209213
.build()
210214
)
211-
.type("integrity")
215+
.type(TestResultListResponse.Item.Goal.Type.INTEGRITY)
212216
.archived(false)
213217
.delayWindow(0.0)
214218
.evaluationWindow(3600.0)

openlayer-java-core/src/test/kotlin/com/openlayer/api/models/projects/tests/TestCreateParamsTest.kt

+12-12
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ internal class TestCreateParamsTest {
2323
.name("No duplicate rows")
2424
.number(1L)
2525
.originProjectVersionId("3fa85f64-5717-4562-b3fc-2c963f66afa6")
26-
.subtype("duplicateRowCount")
26+
.subtype(TestCreateParams.Subtype.DUPLICATE_ROW_COUNT)
2727
.suggested(false)
2828
.addThreshold(
2929
TestCreateParams.Threshold.builder()
@@ -40,7 +40,7 @@ internal class TestCreateParamsTest {
4040
.value(0.0)
4141
.build()
4242
)
43-
.type("integrity")
43+
.type(TestCreateParams.Type.INTEGRITY)
4444
.archived(false)
4545
.delayWindow(0.0)
4646
.evaluationWindow(3600.0)
@@ -67,10 +67,10 @@ internal class TestCreateParamsTest {
6767
.name("No duplicate rows")
6868
.number(1L)
6969
.originProjectVersionId("3fa85f64-5717-4562-b3fc-2c963f66afa6")
70-
.subtype("duplicateRowCount")
70+
.subtype(TestCreateParams.Subtype.DUPLICATE_ROW_COUNT)
7171
.suggested(false)
7272
.addThreshold(TestCreateParams.Threshold.builder().build())
73-
.type("integrity")
73+
.type(TestCreateParams.Type.INTEGRITY)
7474
.build()
7575

7676
assertThat(params._pathParam(0)).isEqualTo("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
@@ -93,7 +93,7 @@ internal class TestCreateParamsTest {
9393
.name("No duplicate rows")
9494
.number(1L)
9595
.originProjectVersionId("3fa85f64-5717-4562-b3fc-2c963f66afa6")
96-
.subtype("duplicateRowCount")
96+
.subtype(TestCreateParams.Subtype.DUPLICATE_ROW_COUNT)
9797
.suggested(false)
9898
.addThreshold(
9999
TestCreateParams.Threshold.builder()
@@ -110,7 +110,7 @@ internal class TestCreateParamsTest {
110110
.value(0.0)
111111
.build()
112112
)
113-
.type("integrity")
113+
.type(TestCreateParams.Type.INTEGRITY)
114114
.archived(false)
115115
.delayWindow(0.0)
116116
.evaluationWindow(3600.0)
@@ -134,7 +134,7 @@ internal class TestCreateParamsTest {
134134
assertThat(body.name()).isEqualTo("No duplicate rows")
135135
assertThat(body.number()).isEqualTo(1L)
136136
assertThat(body.originProjectVersionId()).contains("3fa85f64-5717-4562-b3fc-2c963f66afa6")
137-
assertThat(body.subtype()).isEqualTo("duplicateRowCount")
137+
assertThat(body.subtype()).isEqualTo(TestCreateParams.Subtype.DUPLICATE_ROW_COUNT)
138138
assertThat(body.suggested()).isEqualTo(false)
139139
assertThat(body.thresholds())
140140
.containsExactly(
@@ -152,7 +152,7 @@ internal class TestCreateParamsTest {
152152
.value(0.0)
153153
.build()
154154
)
155-
assertThat(body.type()).isEqualTo("integrity")
155+
assertThat(body.type()).isEqualTo(TestCreateParams.Type.INTEGRITY)
156156
assertThat(body.archived()).contains(false)
157157
assertThat(body.delayWindow()).contains(0.0)
158158
assertThat(body.evaluationWindow()).contains(3600.0)
@@ -178,10 +178,10 @@ internal class TestCreateParamsTest {
178178
.name("No duplicate rows")
179179
.number(1L)
180180
.originProjectVersionId("3fa85f64-5717-4562-b3fc-2c963f66afa6")
181-
.subtype("duplicateRowCount")
181+
.subtype(TestCreateParams.Subtype.DUPLICATE_ROW_COUNT)
182182
.suggested(false)
183183
.addThreshold(TestCreateParams.Threshold.builder().build())
184-
.type("integrity")
184+
.type(TestCreateParams.Type.INTEGRITY)
185185
.build()
186186

187187
val body = params._body()
@@ -197,9 +197,9 @@ internal class TestCreateParamsTest {
197197
assertThat(body.name()).isEqualTo("No duplicate rows")
198198
assertThat(body.number()).isEqualTo(1L)
199199
assertThat(body.originProjectVersionId()).contains("3fa85f64-5717-4562-b3fc-2c963f66afa6")
200-
assertThat(body.subtype()).isEqualTo("duplicateRowCount")
200+
assertThat(body.subtype()).isEqualTo(TestCreateParams.Subtype.DUPLICATE_ROW_COUNT)
201201
assertThat(body.suggested()).isEqualTo(false)
202202
assertThat(body.thresholds()).containsExactly(TestCreateParams.Threshold.builder().build())
203-
assertThat(body.type()).isEqualTo("integrity")
203+
assertThat(body.type()).isEqualTo(TestCreateParams.Type.INTEGRITY)
204204
}
205205
}

openlayer-java-core/src/test/kotlin/com/openlayer/api/models/projects/tests/TestCreateResponseTest.kt

+7-6
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ internal class TestCreateResponseTest {
2525
.name("No duplicate rows")
2626
.number(1L)
2727
.originProjectVersionId("3fa85f64-5717-4562-b3fc-2c963f66afa6")
28-
.subtype("duplicateRowCount")
28+
.subtype(TestCreateResponse.Subtype.DUPLICATE_ROW_COUNT)
2929
.suggested(false)
3030
.addThreshold(
3131
TestCreateResponse.Threshold.builder()
@@ -42,7 +42,7 @@ internal class TestCreateResponseTest {
4242
.value(0.0)
4343
.build()
4444
)
45-
.type("integrity")
45+
.type(TestCreateResponse.Type.INTEGRITY)
4646
.archived(false)
4747
.delayWindow(0.0)
4848
.evaluationWindow(3600.0)
@@ -68,7 +68,8 @@ internal class TestCreateResponseTest {
6868
assertThat(testCreateResponse.number()).isEqualTo(1L)
6969
assertThat(testCreateResponse.originProjectVersionId())
7070
.contains("3fa85f64-5717-4562-b3fc-2c963f66afa6")
71-
assertThat(testCreateResponse.subtype()).isEqualTo("duplicateRowCount")
71+
assertThat(testCreateResponse.subtype())
72+
.isEqualTo(TestCreateResponse.Subtype.DUPLICATE_ROW_COUNT)
7273
assertThat(testCreateResponse.suggested()).isEqualTo(false)
7374
assertThat(testCreateResponse.thresholds())
7475
.containsExactly(
@@ -86,7 +87,7 @@ internal class TestCreateResponseTest {
8687
.value(0.0)
8788
.build()
8889
)
89-
assertThat(testCreateResponse.type()).isEqualTo("integrity")
90+
assertThat(testCreateResponse.type()).isEqualTo(TestCreateResponse.Type.INTEGRITY)
9091
assertThat(testCreateResponse.archived()).contains(false)
9192
assertThat(testCreateResponse.delayWindow()).contains(0.0)
9293
assertThat(testCreateResponse.evaluationWindow()).contains(3600.0)
@@ -112,7 +113,7 @@ internal class TestCreateResponseTest {
112113
.name("No duplicate rows")
113114
.number(1L)
114115
.originProjectVersionId("3fa85f64-5717-4562-b3fc-2c963f66afa6")
115-
.subtype("duplicateRowCount")
116+
.subtype(TestCreateResponse.Subtype.DUPLICATE_ROW_COUNT)
116117
.suggested(false)
117118
.addThreshold(
118119
TestCreateResponse.Threshold.builder()
@@ -129,7 +130,7 @@ internal class TestCreateResponseTest {
129130
.value(0.0)
130131
.build()
131132
)
132-
.type("integrity")
133+
.type(TestCreateResponse.Type.INTEGRITY)
133134
.archived(false)
134135
.delayWindow(0.0)
135136
.evaluationWindow(3600.0)

openlayer-java-core/src/test/kotlin/com/openlayer/api/services/async/projects/TestServiceAsyncTest.kt

+2-2
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ internal class TestServiceAsyncTest {
3838
.name("No duplicate rows")
3939
.number(1L)
4040
.originProjectVersionId("3fa85f64-5717-4562-b3fc-2c963f66afa6")
41-
.subtype("duplicateRowCount")
41+
.subtype(TestCreateParams.Subtype.DUPLICATE_ROW_COUNT)
4242
.suggested(false)
4343
.addThreshold(
4444
TestCreateParams.Threshold.builder()
@@ -55,7 +55,7 @@ internal class TestServiceAsyncTest {
5555
.value(0.0)
5656
.build()
5757
)
58-
.type("integrity")
58+
.type(TestCreateParams.Type.INTEGRITY)
5959
.archived(false)
6060
.delayWindow(0.0)
6161
.evaluationWindow(3600.0)

openlayer-java-core/src/test/kotlin/com/openlayer/api/services/blocking/projects/TestServiceTest.kt

+2-2
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ internal class TestServiceTest {
3838
.name("No duplicate rows")
3939
.number(1L)
4040
.originProjectVersionId("3fa85f64-5717-4562-b3fc-2c963f66afa6")
41-
.subtype("duplicateRowCount")
41+
.subtype(TestCreateParams.Subtype.DUPLICATE_ROW_COUNT)
4242
.suggested(false)
4343
.addThreshold(
4444
TestCreateParams.Threshold.builder()
@@ -55,7 +55,7 @@ internal class TestServiceTest {
5555
.value(0.0)
5656
.build()
5757
)
58-
.type("integrity")
58+
.type(TestCreateParams.Type.INTEGRITY)
5959
.archived(false)
6060
.delayWindow(0.0)
6161
.evaluationWindow(3600.0)

0 commit comments

Comments
 (0)