Skip to content

Commit 33631bd

Browse files
committed
Adding realtime entry point for java
1 parent 018732b commit 33631bd

File tree

2 files changed

+38
-0
lines changed

2 files changed

+38
-0
lines changed

.typespec/realtime/java_client.tsp

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import "@typespec/http";
2+
import "@typespec/openapi3";
3+
import "@typespec/openapi";
4+
5+
import "./main.tsp";
6+
7+
/** The OpenAI REST API. Please see https://platform.openai.com/docs/api-reference for more details. */
8+
@service({
9+
title: "OpenAI API",
10+
termsOfService: "https://openai.com/policies/terms-of-use",
11+
contact: {
12+
name: "OpenAI Support",
13+
url: "https://help.openai.com",
14+
},
15+
license: {
16+
name: "MIT",
17+
url: "https://github.com/openai/openai-openapi/blob/master/LICENSE",
18+
},
19+
})
20+
@server("https://api.openai.com/v1", "OpenAI Endpoint")
21+
@useAuth(BearerAuth)
22+
namespace OpenAI;

.typespec/realtime/tspconfig.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# https://typespec.io/docs/handbook/configuration/configuration/
2+
# adding entry point exclusive to realtime
3+
options:
4+
"@azure-tools/typespec-java":
5+
emitter-output-dir: "{project-root}/../TempTypeSpecFiles/java/unbranded"
6+
package-dir: "azure-ai-openai-realtime"
7+
namespace: "com.azure.ai.openai.realtime"
8+
# partial-update: true
9+
enable-sync-stack: true
10+
generate-tests: false
11+
generate-samples: false
12+
custom-types-subpackage: "implementation.models"
13+
# custom-types: "FunctionCallPreset,FileListResponse,OpenAIPageableListOfBatch"
14+
# customization-class: customization/src/main/java/OpenAICustomizations.java
15+
flavor: azure
16+
# tsp compile .typespec/realtime/client_java.tsp --emit "@azure-tools/typespec-java"

0 commit comments

Comments
 (0)