Skip to content

Commit dc34fc0

Browse files
committed
ref: move /v1 prefix
1 parent f92a3c6 commit dc34fc0

File tree

4 files changed

+50
-12
lines changed

4 files changed

+50
-12
lines changed

docs/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,4 @@ provider "openai" {
2424
### Optional
2525

2626
- `api_key` (String, Sensitive) API key for the OpenAI API.
27-
- `base_url` (String) Base URL for the OpenAI API. Defaults to `https://api.openai.com/v1`.
27+
- `base_url` (String) Base URL for the OpenAI API. Defaults to `https://api.openai.com`.

internal/apiclient/api.yaml

Lines changed: 27 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ openapi: "3.1.0"
22
info:
33
title: OpenAI API
44
servers:
5-
- url: https://api.openai.com/v1
5+
- url: https://api.openai.com
66
paths:
7-
/organizations:
7+
/v1/organizations:
88
get:
99
operationId: getOrganizations
1010
responses:
@@ -20,7 +20,7 @@ paths:
2020
$ref: "#/components/schemas/Organization"
2121
401:
2222
$ref: "#/components/responses/Unauthorized"
23-
/organizations/{organizationId}:
23+
/v1/organizations/{organizationId}:
2424
get:
2525
operationId: getOrganization
2626
parameters:
@@ -37,7 +37,7 @@ paths:
3737
$ref: "#/components/schemas/Organization"
3838
401:
3939
$ref: "#/components/responses/Unauthorized"
40-
/organizations/{organizationId}/users:
40+
/v1/organizations/{organizationId}/users:
4141
get:
4242
operationId: getOrganizationUsers
4343
parameters:
@@ -183,7 +183,29 @@ components:
183183
$ref: "#/components/schemas/User"
184184
Project:
185185
type: object
186-
properties: {} # TODO
186+
required:
187+
- created
188+
- id
189+
- is_initial
190+
- object
191+
- organization_id
192+
- title
193+
properties:
194+
created:
195+
type: number
196+
geography: {}
197+
id:
198+
type: string
199+
is_initial:
200+
type: boolean
201+
object:
202+
type: string
203+
enum:
204+
- project
205+
organization_id:
206+
type: string
207+
title:
208+
type: string
187209
User:
188210
type: object
189211
required:

internal/apiclient/apiclient.gen.go

Lines changed: 20 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

internal/provider/provider.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ func (p *OpenAIProvider) Schema(ctx context.Context, req provider.SchemaRequest,
4141
resp.Schema = schema.Schema{
4242
Attributes: map[string]schema.Attribute{
4343
"base_url": schema.StringAttribute{
44-
MarkdownDescription: "Base URL for the OpenAI API. Defaults to `https://api.openai.com/v1`.",
44+
MarkdownDescription: "Base URL for the OpenAI API. Defaults to `https://api.openai.com`.",
4545
Optional: true,
4646
},
4747
"api_key": schema.StringAttribute{
@@ -66,7 +66,7 @@ func (p *OpenAIProvider) Configure(ctx context.Context, req provider.ConfigureRe
6666
if !data.BaseUrl.IsNull() {
6767
baseUrl = data.BaseUrl.ValueString()
6868
} else {
69-
baseUrl = "https://api.openai.com/v1"
69+
baseUrl = "https://api.openai.com"
7070
}
7171

7272
var apiKey string

0 commit comments

Comments
 (0)