-
Notifications
You must be signed in to change notification settings - Fork 619
[Docs] Replace custom API endpoint with OpenAPI component #7829
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
c0be05d
45f1e87
2cdaf2a
a74e1a2
c1993a6
2365dd1
96efe71
5d047da
44d988c
61a12fb
ea3cb7d
d6c40f9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -24,6 +24,7 @@ | |||||||||||||
| "nextjs-toploader": "^1.6.12", | ||||||||||||||
| "node-html-markdown": "^1.3.0", | ||||||||||||||
| "node-html-parser": "^6.1.13", | ||||||||||||||
| "openapi-types": "12.1.3", | ||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Verification agent 🧩 Analysis chainConfirm If only used for typing, keep it in Run the same verification script from the playground package review or this package-local check: 🏁 Script executed: #!/bin/bash
set -euo pipefail
echo "== Usages of 'openapi-types' in portal =="
rg -n --hidden --no-ignore -g 'apps/portal/**' -e "from ['\"]openapi-types['\"]|require\(['\"]openapi-types['\"]\)" || true
echo
echo "== portal/package.json declaration =="
jq '{dependencies: .dependencies["openapi-types"], devDependencies: .devDependencies["openapi-types"]}' apps/portal/package.jsonLength of output: 650 Move
Please update • Remove from dependencies Example diff: --- apps/portal/package.json
@@ dependencies:
- "openapi-types": "12.1.3",
@@ devDependencies:
+ "openapi-types": "12.1.3",📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||
| "posthog-js": "1.256.1", | ||||||||||||||
| "prettier": "3.6.2", | ||||||||||||||
| "react": "19.1.0", | ||||||||||||||
|
|
||||||||||||||
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -13,8 +13,8 @@ export const sidebar: SideBar = { | |
| icon: <ZapIcon />, | ||
| }, | ||
| { | ||
| name: "Response Handling", | ||
| href: "/ai/chat/handling-responses", | ||
| name: "Streaming Responses", | ||
| href: "/ai/chat/streaming", | ||
| }, | ||
|
Comment on lines
+16
to
18
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Verification agent 🧩 Analysis chainRename to “Streaming Responses” looks good; verify route exists and unify API reference domain.
Script to check the page exists and to find any lingering Apply this diff to normalize the API Reference domain in this file: - href: "https://api.thirdweb-dev.com/reference#tag/ai/post/ai/chat",
+ href: "https://api.thirdweb.com/reference#tag/ai/post/ai/chat",🏁 Script executed: #!/bin/bash
set -euo pipefail
# Verify streaming page exists (any of TSX/MDX)
if test -d "apps/portal/src/app/ai/chat/streaming"; then
fd -t f . apps/portal/src/app/ai/chat/streaming
else
echo "Missing: apps/portal/src/app/ai/chat/streaming"
exit 1
fi
# Find dev-domain API references across repo
echo
echo "Occurrences of api.thirdweb-dev.com/reference:"
rg -n --hidden --no-ignore -e "api\.thirdweb-dev\.com/reference" || trueLength of output: 581 Confirm
• apps/portal/src/app/ai/sidebar.tsx (around line 21): - href: "https://api.thirdweb-dev.com/reference#tag/ai/post/ai/chat",
+ href: "https://api.thirdweb.com/reference#tag/ai/post/ai/chat",• apps/portal/src/app/ai/chat/page.mdx (around line 55): - [Full API Reference](https://api.thirdweb-dev.com/reference#tag/ai/post/ai/chat)
+ [Full API Reference](https://api.thirdweb.com/reference#tag/ai/post/ai/chat)
🤖 Prompt for AI Agents |
||
| { | ||
| name: "API Reference", | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Verification agent
🧩 Analysis chain
Pinning
openapi-typesis fine; verify if it should be a devDependency and align versions workspace-wide.If
openapi-typesis only used for TypeScript types, prefer moving it todevDependenciesto keep production/runtime deps lean. Also ensure all packages pin the same version to avoid duplication.Run this script to (a) find all imports/usages of
openapi-typesand (b) report every package.json that declares it and where (dependencies vs devDependencies):🏁 Script executed:
Length of output: 4572
Move
openapi-typesto devDependencies and align versionsAll imports of
openapi-typesin the repo are type‐only (import type { OpenAPIV3[_1] }…), so it does not need to ship at runtime. Currently it’s declared in dependencies in two spots:• apps/playground-web/package.json (v12.1.3)
• apps/portal/package.json (v12.1.3)
Please:
"openapi-types": "12.1.3"from dependencies in both package.json files"openapi-types": "12.1.3"under devDependencies in both🤖 Prompt for AI Agents