Skip to content

Commit

Permalink
autogenerated code (#802)
Browse files Browse the repository at this point in the history
  • Loading branch information
BorisTkachenko authored Dec 3, 2024
1 parent 2b59659 commit 1430133
Show file tree
Hide file tree
Showing 37 changed files with 668 additions and 45 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -173,16 +173,14 @@ private Stream<Arguments> useInvalidWorkspace__thenReturnForbiddenResponse() {
return Stream.of(
arguments(""),
arguments(UNAUTHORISED_WORKSPACE_NAME),
arguments(DEFAULT_WORKSPACE_NAME)
);
arguments(DEFAULT_WORKSPACE_NAME));
}

private void checkProjectAccess(String apiKey,
String workspaceName,
int expectedStatus) {
String workspaceName,
int expectedStatus) {
var request = AuthDetailsHolder.builder().build();


try (var actualResponse = client.target(URL_TEMPLATE.formatted(baseURI))
.request()
.accept(MediaType.APPLICATION_JSON_TYPE)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import jakarta.ws.rs.InternalServerErrorException;
import jakarta.ws.rs.client.Client;
import jakarta.ws.rs.core.HttpHeaders;
import jakarta.ws.rs.core.Response;
import org.apache.commons.lang3.RandomStringUtils;
import org.apache.hc.core5.http.HttpStatus;
import org.junit.jupiter.api.AfterAll;
Expand Down
51 changes: 41 additions & 10 deletions apps/opik-documentation/documentation/rest_api/opik.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ servers:
tags:
- name: System usage
description: System usage related resource
- name: Check
description: Access check resources
- name: Datasets
description: Dataset resources
- name: Experiments
Expand Down Expand Up @@ -108,6 +110,33 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/TraceCountResponse'
/v1/private/auth:
post:
tags:
- Check
summary: Check user access to workspace
description: Check user access to workspace
operationId: checkAccess
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AuthDetailsHolder'
responses:
"204":
description: No Content
"401":
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorMessage'
"403":
description: Access forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorMessage'
/v1/private/datasets:
get:
tags:
Expand Down Expand Up @@ -1932,6 +1961,18 @@ components:
trace_count:
type: integer
format: int32
ErrorMessage:
type: object
properties:
code:
type: integer
format: int32
message:
type: string
details:
type: string
AuthDetailsHolder:
type: object
Dataset:
required:
- name
Expand Down Expand Up @@ -2578,16 +2619,6 @@ components:
type: array
items:
$ref: '#/components/schemas/Column_Public'
ErrorMessage:
type: object
properties:
code:
type: integer
format: int32
message:
type: string
details:
type: string
ChunkedOutputJsonNode:
type: object
properties:
Expand Down
51 changes: 41 additions & 10 deletions sdks/code_generation/fern/openapi/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ servers:
tags:
- name: System usage
description: System usage related resource
- name: Check
description: Access check resources
- name: Datasets
description: Dataset resources
- name: Experiments
Expand Down Expand Up @@ -108,6 +110,33 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/TraceCountResponse'
/v1/private/auth:
post:
tags:
- Check
summary: Check user access to workspace
description: Check user access to workspace
operationId: checkAccess
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AuthDetailsHolder'
responses:
"204":
description: No Content
"401":
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorMessage'
"403":
description: Access forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorMessage'
/v1/private/datasets:
get:
tags:
Expand Down Expand Up @@ -1932,6 +1961,18 @@ components:
trace_count:
type: integer
format: int32
ErrorMessage:
type: object
properties:
code:
type: integer
format: int32
message:
type: string
details:
type: string
AuthDetailsHolder:
type: object
Dataset:
required:
- name
Expand Down Expand Up @@ -2578,16 +2619,6 @@ components:
type: array
items:
$ref: '#/components/schemas/Column_Public'
ErrorMessage:
type: object
properties:
code:
type: integer
format: int32
message:
type: string
details:
type: string
ChunkedOutputJsonNode:
type: object
properties:
Expand Down
8 changes: 8 additions & 0 deletions sdks/python/src/opik/rest_api/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# This file was auto-generated by Fern from our API Definition.

from .types import (
AuthDetailsHolder,
AvgValueStatPublic,
BatchDelete,
BiInformation,
Expand Down Expand Up @@ -128,11 +129,14 @@
from .errors import (
BadRequestError,
ConflictError,
ForbiddenError,
NotFoundError,
NotImplementedError,
UnauthorizedError,
UnprocessableEntityError,
)
from . import (
check,
datasets,
experiments,
feedback_definitions,
Expand All @@ -157,6 +161,7 @@

__all__ = [
"AsyncOpikApi",
"AuthDetailsHolder",
"AvgValueStatPublic",
"BadRequestError",
"BatchDelete",
Expand Down Expand Up @@ -232,6 +237,7 @@
"Feedback_Numerical",
"FindFeedbackDefinitionsRequestType",
"FindFeedbackScoreNames1RequestType",
"ForbiddenError",
"GetSpanStatsRequestType",
"GetSpansByProjectRequestType",
"JsonNode",
Expand Down Expand Up @@ -291,8 +297,10 @@
"TracePagePublic",
"TracePublic",
"TraceWrite",
"UnauthorizedError",
"UnprocessableEntityError",
"WorkspaceTraceCount",
"check",
"datasets",
"experiments",
"feedback_definitions",
Expand Down
2 changes: 2 additions & 0 deletions sdks/python/src/opik/rest_api/check/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# This file was auto-generated by Fern from our API Definition.

Loading

0 comments on commit 1430133

Please sign in to comment.