Skip to content

Commit

Permalink
/api/v0 rather than /api/openapi
Browse files Browse the repository at this point in the history
  • Loading branch information
tonyxiao committed Nov 3, 2023
1 parent 43d3aac commit 4bfb422
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion apps/web/lib-server/appRouter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export const appRouter = trpc.mergeRouters(flatRouter, customRouter)
export const openApiDocument = generateOpenApiDocument(appRouter, {
title: 'Venice OpenAPI',
version: '0.0.0',
baseUrl: getServerUrl(null) + '/api/openapi',
baseUrl: getServerUrl(null) + '/api/v0',
})

export type AppRouter = typeof appRouter
2 changes: 1 addition & 1 deletion apps/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"build": "run-s build:*",
"build:migration": "if [ \"$VERCEL_ENV\" = production ] || [ \"$VERCEL_GIT_COMMIT_REF\" = staging ]; then pnpm --dir ../../ migration up; else echo 'Skip non prod/staging migration'; fi",
"build:next": "next build",
"codegen:sdk": "openapi-typescript http://localhost:3000/api/openapi --output ./sdk/venice.gen.ts",
"codegen:sdk": "openapi-typescript http://localhost:3000/api/v0 --output ./sdk/venice.gen.ts",
"codegen:supabase": "supabase gen types typescript --linked --schema public > ./supabase/supabase.gen.ts",
"dev": "next dev -p 4000",
"start": "next start"
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion packages/connect/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@usevenice/connect",
"version": "0.0.5",
"version": "0.0.6",
"sideEffects": false,
"main": "./dist/index.js",
"module": "./dist/index.mjs",
Expand Down
2 changes: 1 addition & 1 deletion packages/connect/src/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export function makeVeniceClient({
accessToken,
...config
}: VeniceClientConfig) {
const apiBase = new URL('/api/openapi/', config.apiHost).toString()
const apiBase = new URL('/api/v0/', config.apiHost).toString()
const headers = {
'Content-Type': 'application/json',
...(apiKey ? {'x-apikey': apiKey} : {}),
Expand Down

0 comments on commit 4bfb422

Please sign in to comment.