Skip to content

Commit f780183

Browse files
feat(api): OpenAPI spec update via Stainless API (#13)
1 parent 2925a10 commit f780183

File tree

14 files changed

+44
-39
lines changed

14 files changed

+44
-39
lines changed

.github/workflows/ci.yml

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ on:
66
pull_request:
77
branches:
88
- main
9+
- next
910

1011
jobs:
1112
lint:

README.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ It is generated with [Stainless](https://www.stainlessapi.com/).
1414

1515
## Documentation
1616

17-
The REST API documentation can be found [on openlayer.com](https://openlayer.com/docs/api-reference/rest/overview).
17+
The REST API documentation can be found on [openlayer.com](https://openlayer.com/docs/api-reference/rest/overview).
1818

1919
---
2020

@@ -250,3 +250,7 @@ This package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) con
250250
We take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience.
251251

252252
We are keen for your feedback; please open an [issue](https://www.github.com/openlayer-ai/openlayer-java/issues) with questions, bugs, or suggestions.
253+
254+
## Requirements
255+
256+
This library requires Java 8 or later.

openlayer-java-core/src/main/kotlin/com/openlayer/api/models/InferencePipelineDataStreamParams.kt

+4-4
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ constructor(
7676
/** Configuration for the data stream. Depends on your **Openlayer project task type**. */
7777
@JsonProperty("config") fun config(): Config? = config
7878

79-
/** A list of entries that represent rows of a csv file */
79+
/** A list of inference data points with inputs and outputs */
8080
@JsonProperty("rows") fun rows(): List<Row>? = rows
8181

8282
@JsonAnyGetter
@@ -135,7 +135,7 @@ constructor(
135135
*/
136136
@JsonProperty("config") fun config(config: Config) = apply { this.config = config }
137137

138-
/** A list of entries that represent rows of a csv file */
138+
/** A list of inference data points with inputs and outputs */
139139
@JsonProperty("rows") fun rows(rows: List<Row>) = apply { this.rows = rows }
140140

141141
fun additionalProperties(additionalProperties: Map<String, JsonValue>) = apply {
@@ -248,13 +248,13 @@ constructor(
248248
this.config = Config.ofTextClassificationData(textClassificationData)
249249
}
250250

251-
/** A list of entries that represent rows of a csv file */
251+
/** A list of inference data points with inputs and outputs */
252252
fun rows(rows: List<Row>) = apply {
253253
this.rows.clear()
254254
this.rows.addAll(rows)
255255
}
256256

257-
/** A list of entries that represent rows of a csv file */
257+
/** A list of inference data points with inputs and outputs */
258258
fun addRow(row: Row) = apply { this.rows.add(row) }
259259

260260
fun additionalQueryParams(additionalQueryParams: Map<String, List<String>>) = apply {

openlayer-java-core/src/main/kotlin/com/openlayer/api/services/async/inferencePipelines/DataServiceAsync.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import java.util.concurrent.CompletableFuture
1111

1212
interface DataServiceAsync {
1313

14-
/** Stream production data to an inference pipeline. */
14+
/** Create an inference data point in an inference pipeline. */
1515
@JvmOverloads
1616
fun stream(
1717
params: InferencePipelineDataStreamParams,

openlayer-java-core/src/main/kotlin/com/openlayer/api/services/async/inferencePipelines/DataServiceAsyncImpl.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ constructor(
2727
jsonHandler<InferencePipelineDataStreamResponse>(clientOptions.jsonMapper)
2828
.withErrorHandler(errorHandler)
2929

30-
/** Stream production data to an inference pipeline. */
30+
/** Create an inference data point in an inference pipeline. */
3131
override fun stream(
3232
params: InferencePipelineDataStreamParams,
3333
requestOptions: RequestOptions

openlayer-java-core/src/main/kotlin/com/openlayer/api/services/blocking/inferencePipelines/DataService.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import com.openlayer.api.models.InferencePipelineDataStreamResponse
1010

1111
interface DataService {
1212

13-
/** Stream production data to an inference pipeline. */
13+
/** Create an inference data point in an inference pipeline. */
1414
@JvmOverloads
1515
fun stream(
1616
params: InferencePipelineDataStreamParams,

openlayer-java-core/src/main/kotlin/com/openlayer/api/services/blocking/inferencePipelines/DataServiceImpl.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ constructor(
2626
jsonHandler<InferencePipelineDataStreamResponse>(clientOptions.jsonMapper)
2727
.withErrorHandler(errorHandler)
2828

29-
/** Stream production data to an inference pipeline. */
29+
/** Create an inference data point in an inference pipeline. */
3030
override fun stream(
3131
params: InferencePipelineDataStreamParams,
3232
requestOptions: RequestOptions

openlayer-java-core/src/test/kotlin/com/openlayer/api/models/ProjectCommitListResponseTest.kt

+2-2
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class ProjectCommitListResponseTest {
3838
.dateCreated(OffsetDateTime.parse("2024-03-22T11:31:01.185Z"))
3939
.gitCommitRef("main")
4040
.gitCommitSha(123L)
41-
.gitCommitUrl("string")
41+
.gitCommitUrl("gitCommitUrl")
4242
.build()
4343
)
4444
.dateArchived(OffsetDateTime.parse("2024-03-22T11:31:01.185Z"))
@@ -94,7 +94,7 @@ class ProjectCommitListResponseTest {
9494
.dateCreated(OffsetDateTime.parse("2024-03-22T11:31:01.185Z"))
9595
.gitCommitRef("main")
9696
.gitCommitSha(123L)
97-
.gitCommitUrl("string")
97+
.gitCommitUrl("gitCommitUrl")
9898
.build()
9999
)
100100
.dateArchived(OffsetDateTime.parse("2024-03-22T11:31:01.185Z"))

openlayer-java-core/src/test/kotlin/com/openlayer/api/models/ProjectCreateResponseTest.kt

+10-10
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,13 @@ class ProjectCreateResponseTest {
4040
.dateUpdated(OffsetDateTime.parse("2019-12-27T18:11:19.117Z"))
4141
.gitAccountId("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
4242
.gitId(123L)
43-
.name("string")
43+
.name("name")
4444
.private_(true)
4545
.projectId("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
46-
.slug("string")
47-
.url("string")
48-
.branch("string")
49-
.rootDir("string")
46+
.slug("slug")
47+
.url("url")
48+
.branch("branch")
49+
.rootDir("rootDir")
5050
.build()
5151
)
5252
.build()
@@ -86,13 +86,13 @@ class ProjectCreateResponseTest {
8686
.dateUpdated(OffsetDateTime.parse("2019-12-27T18:11:19.117Z"))
8787
.gitAccountId("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
8888
.gitId(123L)
89-
.name("string")
89+
.name("name")
9090
.private_(true)
9191
.projectId("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
92-
.slug("string")
93-
.url("string")
94-
.branch("string")
95-
.rootDir("string")
92+
.slug("slug")
93+
.url("url")
94+
.branch("branch")
95+
.rootDir("rootDir")
9696
.build()
9797
)
9898
}

openlayer-java-core/src/test/kotlin/com/openlayer/api/models/ProjectInferencePipelineListParamsTest.kt

+3-3
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class ProjectInferencePipelineListParamsTest {
1212
fun createProjectInferencePipelineListParams() {
1313
ProjectInferencePipelineListParams.builder()
1414
.projectId("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
15-
.name("string")
15+
.name("name")
1616
.page(123L)
1717
.perPage(100L)
1818
.build()
@@ -23,12 +23,12 @@ class ProjectInferencePipelineListParamsTest {
2323
val params =
2424
ProjectInferencePipelineListParams.builder()
2525
.projectId("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
26-
.name("string")
26+
.name("name")
2727
.page(123L)
2828
.perPage(100L)
2929
.build()
3030
val expected = mutableMapOf<String, List<String>>()
31-
expected.put("name", listOf("string"))
31+
expected.put("name", listOf("name"))
3232
expected.put("page", listOf("123"))
3333
expected.put("perPage", listOf("100"))
3434
assertThat(params.getQueryParams()).isEqualTo(expected)

openlayer-java-core/src/test/kotlin/com/openlayer/api/models/ProjectListParamsTest.kt

+3-3
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ class ProjectListParamsTest {
1111
@Test
1212
fun createProjectListParams() {
1313
ProjectListParams.builder()
14-
.name("string")
14+
.name("name")
1515
.page(123L)
1616
.perPage(100L)
1717
.taskType(ProjectListParams.TaskType.LLM_BASE)
@@ -22,13 +22,13 @@ class ProjectListParamsTest {
2222
fun getQueryParams() {
2323
val params =
2424
ProjectListParams.builder()
25-
.name("string")
25+
.name("name")
2626
.page(123L)
2727
.perPage(100L)
2828
.taskType(ProjectListParams.TaskType.LLM_BASE)
2929
.build()
3030
val expected = mutableMapOf<String, List<String>>()
31-
expected.put("name", listOf("string"))
31+
expected.put("name", listOf("name"))
3232
expected.put("page", listOf("123"))
3333
expected.put("perPage", listOf("100"))
3434
expected.put("taskType", listOf(ProjectListParams.TaskType.LLM_BASE.toString()))

openlayer-java-core/src/test/kotlin/com/openlayer/api/models/ProjectListResponseTest.kt

+10-10
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,13 @@ class ProjectListResponseTest {
5252
.dateUpdated(OffsetDateTime.parse("2019-12-27T18:11:19.117Z"))
5353
.gitAccountId("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
5454
.gitId(123L)
55-
.name("string")
55+
.name("name")
5656
.private_(true)
5757
.projectId("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
58-
.slug("string")
59-
.url("string")
60-
.branch("string")
61-
.rootDir("string")
58+
.slug("slug")
59+
.url("url")
60+
.branch("branch")
61+
.rootDir("rootDir")
6262
.build()
6363
)
6464
.build()
@@ -107,13 +107,13 @@ class ProjectListResponseTest {
107107
.dateUpdated(OffsetDateTime.parse("2019-12-27T18:11:19.117Z"))
108108
.gitAccountId("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
109109
.gitId(123L)
110-
.name("string")
110+
.name("name")
111111
.private_(true)
112112
.projectId("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
113-
.slug("string")
114-
.url("string")
115-
.branch("string")
116-
.rootDir("string")
113+
.slug("slug")
114+
.url("url")
115+
.branch("branch")
116+
.rootDir("rootDir")
117117
.build()
118118
)
119119
.build()

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ class ProjectServiceTest {
4242
val projectListResponse =
4343
projectService.list(
4444
ProjectListParams.builder()
45-
.name("string")
45+
.name("name")
4646
.page(123L)
4747
.perPage(100L)
4848
.taskType(ProjectListParams.TaskType.LLM_BASE)

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ class InferencePipelineServiceTest {
4343
inferencePipelineService.list(
4444
ProjectInferencePipelineListParams.builder()
4545
.projectId("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
46-
.name("string")
46+
.name("name")
4747
.page(123L)
4848
.perPage(100L)
4949
.build()

0 commit comments

Comments
 (0)