René's URL Explorer Experiment


Title: improvement(api): declare OAuth scopes in OpenAPI, JSON 404s for unknown API paths, and root MCP resource metadata by waleedlatif1 · Pull Request #9026 · simstudioai/sim · GitHub

Open Graph Title: improvement(api): declare OAuth scopes in OpenAPI, JSON 404s for unknown API paths, and root MCP resource metadata by waleedlatif1 · Pull Request #9026 · simstudioai/sim

X Title: improvement(api): declare OAuth scopes in OpenAPI, JSON 404s for unknown API paths, and root MCP resource metadata by waleedlatif1 · Pull Request #9026 · simstudioai/sim

Description: Summary OpenAPI oauthBearer is now a standard oauth2 authorization-code scheme (authorize/token/refresh URLs, api:read / api:write / offline_access scopes) instead of http bearer with scopes only in prose Every generated operation's security names its least-privilege scope (oauthBearer: ["api:read"]), derived from the application operation's oauthScope — the same single source as x-oauth-scope Generator validation keys on scheme type oauth2 (not the oauthBearer name) and fails if an operation's scope isn't declared by the scheme's flow Docs code samples render an oauth2 scheme as Authorization: Bearer; the playground keeps its manual token field Dedicated MCP host serves its RFC 9728 metadata at the root /.well-known/oauth-protected-resource too — the fallback MCP clients try after the path-inserted URL (MCP authorization spec, Protected Resource Metadata Discovery). resource stays the MCP URL; the app host still has no root document New app/api/[[...segments]] returns a JSON 404 for unknown /api/* paths instead of the HTML not-found page, mirroring the existing /api/v2 fallback Compatibility Wire behavior is unchanged: OAuth tokens still go in Authorization: Bearer, x-oauth-scope and the document-level security are kept, the anonymous alternative on workflow execute is kept The declared OAuth flow matches what the authorization server issues today: authorization code + PKCE S256, unbound tokens (no resource), which is what /api/v2 accepts Docs: the API playground is disabled, so the oauth2 type adds no Authorize UI; code samples still lead with the API key Unknown /api/* paths stay 404, now as JSON; every existing route, the /api/v2 and /api/auth catch-alls, and next.config /api header rules are unaffected (Next only routes here when nothing more specific matches) Root metadata exists only on the dedicated MCP host, where that path was a 404; its resource is the MCP URL, same document as the path-inserted one Type of Change Improvement Testing scripts/openapi tests (generator + documents), host-routing.test.ts; confirmed the per-operation scope assertion fails with the derivation removed, and generation fails with a scope dropped from the scheme generate:openapi --check, check:api-validation:strict, check-api-contract-routes, docs tsc, lint Extended test-mcp-host-e2e.ts (CI cli group): no root metadata on the app host, JSON 404 for unknown /api GET/POST. The MCP-host metadata mapping is covered by host-routing.test.ts, not E2E: that group runs next dev, where proxy rewrites on the dedicated host 404 for every rewritten path (the existing /mcp → /api/mcp included; reproduced locally). Production serves the existing path-inserted URL through the same rewrite target check-openapi-specs, generate:cli-api --check (CLI client unchanged), check-unused-exports Full type-check, check:audits, and test suites left to CI Checklist Code follows project style guidelines Self-reviewed my changes Tests added/updated and passing (new tests pass the test-audit authoring gate) No new warnings introduced I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

Open Graph Description: Summary OpenAPI oauthBearer is now a standard oauth2 authorization-code scheme (authorize/token/refresh URLs, api:read / api:write / offline_access scopes) instead of http bearer with scopes only ...

X Description: Summary OpenAPI oauthBearer is now a standard oauth2 authorization-code scheme (authorize/token/refresh URLs, api:read / api:write / offline_access scopes) instead of http bearer with scopes only ...

Opengraph URL: https://github.com/simstudioai/sim/pull/9026

X: @github

direct link

Domain: github.com

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf
route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:90add173-4a91-967b-716c-7309487d797c
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idE782:C876F:AB9F4D:ECE4DA:6AFB522C
html-safe-nonce61db9fee9aa543b6face11352574f1dda13d99a4a2a81ef3378a1ed3752d8f02
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFNzgyOkM4NzZGOkFCOUY0RDpFQ0U0REE6NkFGQjUyMkMiLCJ2aXNpdG9yX2lkIjoiMzM5Mzg2MjkzODM4ODAyNTkwMCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmacd7e03cff488e7c1fcd08000b65289b04a1e209903a4228b9daa3f06a112da722
hovercard-subject-tagpull_request:4860830313
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/simstudioai/sim/pull/9026/files
twitter:imagehttps://avatars.githubusercontent.com/u/40672544?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/40672544?s=400&v=4
og:image:altSummary OpenAPI oauthBearer is now a standard oauth2 authorization-code scheme (authorize/token/refresh URLs, api:read / api:write / offline_access scopes) instead of http bearer with scopes only ...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None7122bb414b542dba14d71a3f0b9f6fd2abce715b9f5912d082800563e6c806d1
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/simstudioai/sim git https://github.com/simstudioai/sim.git
octolytics-dimension-user_id199344406
octolytics-dimension-user_loginsimstudioai
octolytics-dimension-repository_id912559512
octolytics-dimension-repository_nwosimstudioai/sim
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id912559512
octolytics-dimension-repository_network_root_nwosimstudioai/sim
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releasecbf66c024bb6d10e6955baa7413c54cf13a201bb
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/simstudioai/sim/pull/9026/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fsimstudioai%2Fsim%2Fpull%2F9026%2Ffiles
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fsimstudioai%2Fsim%2Fpull%2F9026%2Ffiles
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=simstudioai%2Fsim
Reloadhttps://github.com/simstudioai/sim/pull/9026/files
Reloadhttps://github.com/simstudioai/sim/pull/9026/files
Reloadhttps://github.com/simstudioai/sim/pull/9026/files
simstudioaihttps://github.com/simstudioai
simhttps://github.com/simstudioai/sim
Codehttps://github.com/simstudioai/sim
Issues129 (129)https://github.com/simstudioai/sim/issues
Pull requests197 (197)https://github.com/simstudioai/sim/pulls
Actionshttps://github.com/simstudioai/sim/actions
Projectshttps://github.com/simstudioai/sim/projects
Security and qualityhttps://github.com/simstudioai/sim/security
Insightshttps://github.com/simstudioai/sim/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Fsimstudioai%2Fsim%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fsimstudioai%2Fsim%2Fissues%2Fnew%2Fchoose
waleedlatif1https://github.com/waleedlatif1
staginghttps://github.com/simstudioai/sim/tree/staging
improvement/agent-readinesshttps://github.com/simstudioai/sim/tree/improvement/agent-readiness
Conversation 5 https://github.com/simstudioai/sim/pull/9026
Commits 2 https://github.com/simstudioai/sim/pull/9026/commits
Checks 52 https://github.com/simstudioai/sim/pull/9026/checks
Files changed https://github.com/simstudioai/sim/pull/9026/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/9026/files
improvement(api): declare OAuth scopes in OpenAPI, JSON 404s for unknown API paths, and root MCP resource metadata https://github.com/simstudioai/sim/pull/9026/files#top
Show all changes 2 commits https://github.com/simstudioai/sim/pull/9026/files
178e15c improvement(api): declare OAuth scopes in OpenAPI, JSON 404s for unkn… waleedlatif1 Oct 14, 2026 https://github.com/simstudioai/sim/pull/9026/commits/178e15c82e77bd30e5adef58d47817cf028eb46e
deeddaa fix(api): shrink the unused-exports baseline and keep rewrite checks … waleedlatif1 Oct 14, 2026 https://github.com/simstudioai/sim/pull/9026/commits/deeddaaa089d3c7d1c2b7225c6d1bfec34d6c30b
Clear filters https://github.com/simstudioai/sim/pull/9026/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/9026/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/9026/files
openapi.ts https://github.com/simstudioai/sim/pull/9026/files#diff-f7ae89a3add14f583235dc9fe28c209faf31f347d2ef35e1f0f971f83f2b0d52
openapi-v2-billing.json https://github.com/simstudioai/sim/pull/9026/files#diff-d1a7579e3381b5f6f39f2f304f56201fbf944a23caa31b5ecc165988a85a6eb4
openapi-v2-files-audit.json https://github.com/simstudioai/sim/pull/9026/files#diff-c6918d7f933ec43ee8b8a4983d19f272b35962e2510bad721fc05d6d82b41b8d
openapi-v2-knowledge.json https://github.com/simstudioai/sim/pull/9026/files#diff-c15da3de30ec533f5aedd9a2862e8afdb8e2a58490fe681b97959638218bf99e
openapi-v2-logs.json https://github.com/simstudioai/sim/pull/9026/files#diff-303943bbe4957dfce964c583968a279a8fddba1850a9ada9273d00b5498f8a75
openapi-v2-resources.json https://github.com/simstudioai/sim/pull/9026/files#diff-17e168777a3b67e689dd8b24e28aaa217cb884843dccad31b1dbf22d5307e17f
openapi-v2-tables.json https://github.com/simstudioai/sim/pull/9026/files#diff-ce7e6e983230c870183cf99d3e224cd90a9b070ad038113d581d755a0386043b
openapi-v2-workflows.json https://github.com/simstudioai/sim/pull/9026/files#diff-811f737e7f97ec52156a37e71892822626b5b4de295efebd20992198d162149b
route.ts https://github.com/simstudioai/sim/pull/9026/files#diff-2a52b3e12bd70e8ed2f16949fdaf10e8e8e611c74c0fc388babd9743f37f2bd3
shared.ts https://github.com/simstudioai/sim/pull/9026/files#diff-de04a2f2a3526e0173b51672e735d59e9172fb12b2ac2cee63190fb5dfc777b1
host-routing.test.ts https://github.com/simstudioai/sim/pull/9026/files#diff-f3668567388d56e13001a0c91b2f4b170038be36e0034d909b024b37a4ae65b3
host-routing.ts https://github.com/simstudioai/sim/pull/9026/files#diff-35be44f94c0b23dd213026a713f801099fc3396d15edff98dac5459b208fdcb8
types.ts https://github.com/simstudioai/sim/pull/9026/files#diff-b0edc47b709ccb8b2fee0444c6a4aa0d6de6105095d5363131a9c8662159a6a3
test-mcp-host-e2e.ts https://github.com/simstudioai/sim/pull/9026/files#diff-bfb538d30a15c60f254192807531ad284fee25c87758fe48f641435ac933e7a8
check-api-validation-contracts.ts https://github.com/simstudioai/sim/pull/9026/files#diff-48ae6a4d0c1f820d5b644522d25742bb29af758bc8350f1a3cf3f8afa0bd00b0
check-unused-exports.baseline.json https://github.com/simstudioai/sim/pull/9026/files#diff-4b59a8526a4f226dffb0fbf6b8ec25d3082ab45da697f584eaaca4bd483c928f
documents.test.ts https://github.com/simstudioai/sim/pull/9026/files#diff-79a10b34882c29316689cc8c7536c57aa8b5b45a9279002293499be099f23bfc
generator.test.ts https://github.com/simstudioai/sim/pull/9026/files#diff-fd10e1dc96de98645f35307f3fb23503c2ec9fb871886b82c8841339555b675c
generator.ts https://github.com/simstudioai/sim/pull/9026/files#diff-54399bf7cef4a8f08f448d4b4470aa195e0e908fe797b8353bcb7a449d1fb8a1
apps/docs/lib/openapi.tshttps://github.com/simstudioai/sim/pull/9026/files#diff-f7ae89a3add14f583235dc9fe28c209faf31f347d2ef35e1f0f971f83f2b0d52
View file https://github.com/simstudioai/sim/blob/deeddaaa089d3c7d1c2b7225c6d1bfec34d6c30b/apps/docs/lib/openapi.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/9026/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/9026/files#diff-f7ae89a3add14f583235dc9fe28c209faf31f347d2ef35e1f0f971f83f2b0d52
https://github.com/simstudioai/sim/pull/9026/files#diff-f7ae89a3add14f583235dc9fe28c209faf31f347d2ef35e1f0f971f83f2b0d52
apps/docs/openapi-v2-billing.jsonhttps://github.com/simstudioai/sim/pull/9026/files#diff-d1a7579e3381b5f6f39f2f304f56201fbf944a23caa31b5ecc165988a85a6eb4
View file https://github.com/simstudioai/sim/blob/deeddaaa089d3c7d1c2b7225c6d1bfec34d6c30b/apps/docs/openapi-v2-billing.json
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/9026/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/9026/files#diff-d1a7579e3381b5f6f39f2f304f56201fbf944a23caa31b5ecc165988a85a6eb4
https://github.com/simstudioai/sim/pull/9026/files#diff-d1a7579e3381b5f6f39f2f304f56201fbf944a23caa31b5ecc165988a85a6eb4
https://github.com/simstudioai/sim/pull/9026/files#diff-d1a7579e3381b5f6f39f2f304f56201fbf944a23caa31b5ecc165988a85a6eb4
https://github.com/simstudioai/sim/pull/9026/files#diff-d1a7579e3381b5f6f39f2f304f56201fbf944a23caa31b5ecc165988a85a6eb4
https://github.com/simstudioai/sim/pull/9026/files#diff-d1a7579e3381b5f6f39f2f304f56201fbf944a23caa31b5ecc165988a85a6eb4
https://github.com/simstudioai/sim/pull/9026/files#diff-d1a7579e3381b5f6f39f2f304f56201fbf944a23caa31b5ecc165988a85a6eb4
Please reload this pagehttps://github.com/simstudioai/sim/pull/9026/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/9026/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.