Skip to content

[Application QuickStart] [Backend] Adding support for opening Swagger (REST) and Nitro (GraphQL) endpoints for DAB directly in VS Code#21495

Merged
manujoseph85 merged 9 commits into
mainfrom
dev/majoseph/dab-swagger-nitro
Mar 7, 2026
Merged

[Application QuickStart] [Backend] Adding support for opening Swagger (REST) and Nitro (GraphQL) endpoints for DAB directly in VS Code#21495
manujoseph85 merged 9 commits into
mainfrom
dev/majoseph/dab-swagger-nitro

Conversation

@manujoseph85
Copy link
Copy Markdown
Contributor

@manujoseph85 manujoseph85 commented Mar 6, 2026

Description

This pull request adds new functionality to the Schema Designer deployment completion screen, allowing users to open API endpoints (such as Swagger and Nitro) directly in VS Code's built-in browser.

API and context changes:

  • Introduced a new notification (dab/openUrl) and associated parameters for opening URLs in the webview/browser.
  • Added openUrl callback to the Dab context and provider, making it available to UI components.
image

Code Changes Checklist

  • New or updated unit tests added
  • All existing tests pass (npm run test)
  • Code follows contributing guidelines
  • Telemetry/logging updated if relevant
  • No regressions or UX breakage

Reviewers: Please read our reviewer guidelines

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds the ability for the Schema Designer DAB deployment completion screen to open REST/GraphQL-related endpoints (Swagger + Nitro) directly in VS Code’s built-in browser via a new webview→extension notification.

Changes:

  • Introduces a new DAB notification (dab/openUrl) and exposes an openUrl callback through the DAB React context.
  • Adds “View Swagger” / “Open Nitro” actions to the DAB deployment completion UI to launch endpoints in the built-in browser.
  • Adds localization strings for the new UI labels.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
localization/xliff/vscode-mssql.xlf Adds new trans-units for “Open Nitro” and “View Swagger”.
extensions/mssql/src/sharedInterfaces/dab.ts Defines OpenUrlNotification + params for webview→extension URL opening.
extensions/mssql/src/schemaDesigner/schemaDesignerWebviewController.ts Handles dab/openUrl by invoking simpleBrowser.show.
extensions/mssql/src/reactviews/pages/SchemaDesigner/dab/deployment/dabDeploymentComplete.tsx Adds new endpoint actions (open URL + copy) for REST/GraphQL endpoints.
extensions/mssql/src/reactviews/pages/SchemaDesigner/dab/dabContext.tsx Exposes openUrl() in DAB context via RPC notification.
extensions/mssql/src/reactviews/common/locConstants.ts Adds localized constants for “View Swagger” / “Open Nitro”.
extensions/mssql/l10n/bundle.l10n.json Adds l10n entries for the new strings.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Comment thread localization/xliff/vscode-mssql.xlf
Comment thread localization/xliff/vscode-mssql.xlf
Comment thread extensions/mssql/src/schemaDesigner/schemaDesignerWebviewController.ts Outdated
Comment thread extensions/mssql/src/schemaDesigner/schemaDesignerWebviewController.ts Outdated
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 6, 2026

PR Changes

Category Target Branch PR Branch Difference
vscode-mssql VSIX 6402 KB 6402 KB ⚪ 0 KB ( 0% )
sql-database-projects VSIX 7060 KB 7060 KB ⚪ 0 KB ( 0% )
data-workspace VSIX 535 KB 535 KB ⚪ 0 KB ( 0% )

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Mar 6, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 72.53%. Comparing base (06b993b) to head (6b54e62).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main   #21495   +/-   ##
=======================================
  Coverage   72.53%   72.53%           
=======================================
  Files         330      330           
  Lines       98173    98201   +28     
  Branches     5430     5435    +5     
=======================================
+ Hits        71206    71234   +28     
  Misses      26967    26967           
Files with missing lines Coverage Δ
extensions/mssql/src/constants/locConstants.ts 75.88% <100.00%> (+0.02%) ⬆️
...nsions/mssql/src/reactviews/common/locConstants.ts 25.20% <100.00%> (+0.05%) ⬆️
.../schemaDesigner/schemaDesignerWebviewController.ts 85.40% <100.00%> (+0.29%) ⬆️
extensions/mssql/src/sharedInterfaces/dab.ts 97.62% <100.00%> (+0.03%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copilot AI review requested due to automatic review settings March 6, 2026 20:16
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Comment thread extensions/mssql/src/schemaDesigner/schemaDesignerWebviewController.ts Outdated
Copilot AI review requested due to automatic review settings March 6, 2026 22:13
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Comment thread extensions/mssql/test/unit/schemaDesignerWebviewController.test.ts
@caohai
Copy link
Copy Markdown
Member

caohai commented Mar 7, 2026

image Do we want to align these 3 buttons?

@manujoseph85 manujoseph85 merged commit c0854a3 into main Mar 7, 2026
7 checks passed
@manujoseph85 manujoseph85 deleted the dev/majoseph/dab-swagger-nitro branch March 7, 2026 00:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature Request]: Add option to open REST/GraphQL endpoints in VS Code Simple browser

4 participants