Skip to content

feat: update swagger_publish_portal_product tool to get the live and preview urls for page or product (SWG-20373)#525

Open
VarshaNagtilak1 wants to merge 13 commits into
mainfrom
feature/SWG-20373-update-publishPortalProduct-tool
Open

feat: update swagger_publish_portal_product tool to get the live and preview urls for page or product (SWG-20373)#525
VarshaNagtilak1 wants to merge 13 commits into
mainfrom
feature/SWG-20373-update-publishPortalProduct-tool

Conversation

@VarshaNagtilak1

Copy link
Copy Markdown

Goal

Ticket: SWG-20373
Fix swagger_publish_portal_product so the tool itself returns the live or preview page URL. This removes the need for the agent skill or LLM to construct URLs, which was causing incorrect links.

Design

Generate the publish URL inside the MCP tool using the actual product, portal, section, and optional [tableOfContentsId] data returned from the API. Keep URL logic in the tool response so the agent can display the exact link directly without inference.

Changeset

Updated swagger_publish_portal_product to accept [tableOfContentsId], resolve the matching TOC item when provided, and return the computed live or preview page URL in the tool response. Also narrowed the returned metadata to only the fields needed for the publish result.

Testing

The unit tests for [publishPortalProduct] were updated to cover:

live publish with [tableOfContentsId]
preview publish without [tableOfContentsId]
custom domain URL generation

@VarshaNagtilak1 VarshaNagtilak1 force-pushed the feature/SWG-20373-update-publishPortalProduct-tool branch from da4e90a to b1dc734 Compare June 16, 2026 13:38
@github-actions

github-actions Bot commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

🎯 Coverage Target Met!

📈 Coverage Metrics

Metric Coverage Target Status
Lines 93.1% 75%
Functions 91.0% 75%
Branches 90.9% 80%
Statements 93.1% 75%

📊 Test Statistics

  • Total Lines: 29,673 / 31,858
  • Total Functions: 628 / 690
  • Total Branches: 1829 / 2011
  • Total Statements: 29673 / 31858

🔍 Files Needing Coverage

File Coverage
docs/scripts/publish-portal-content.ts 0.0%
docs/scripts/validate-manifests.ts 0.0%
src/qmetry/client/testsuite.ts 10.3%
src/qmetry/client/issues.ts 20.1%
src/swagger/config-utils.ts 44.4%

📝 Report generated on Node.js v24.16.0 • View workflow • Coverage by Vitest + v8

@VarshaNagtilak1 VarshaNagtilak1 marked this pull request as ready for review June 17, 2026 07:02

@lukasikp lukasikp left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

good work. I just have a few minor suggestions for simplifying the descriptions.

Comment thread docs/products/SmartBear MCP Server/swagger-portal-integration.md Outdated
Comment thread docs/products/SmartBear MCP Server/swagger-portal-integration.md Outdated
Comment thread src/swagger/client/tools.ts Outdated
Comment thread CHANGELOG.md Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants