Skip to content

fix: adjustments in publish-portal-content.sh (PROVCON-4978)#404

Open
marekgorniak wants to merge 2 commits intomainfrom
fix/PROVCON-4978-Nested-pages-not-being-publishing-for-MCP-content-via-API
Open

fix: adjustments in publish-portal-content.sh (PROVCON-4978)#404
marekgorniak wants to merge 2 commits intomainfrom
fix/PROVCON-4978-Nested-pages-not-being-publishing-for-MCP-content-via-API

Conversation

@marekgorniak
Copy link
Copy Markdown

@marekgorniak marekgorniak commented Mar 30, 2026

PROVCON-4978 - Nested pages not being publishing for MCP content via API

Goal

The goal of this PR is to address following errors caused by publish-portal-content.sh script

Cannot construct instance of `com.smartbear.swaggerhub.portal.apimodel.generated.model.Source`, problem: Unexpected value ''
Bad Request: Documents can be modified only via Documents API

See PROVCON-4978

Design

Does not apply

Changeset

  • Added extra condition to check if source is not null, nor empty string in portal_product_document_markdown_patch and portal_product_toc_markdown_post
  • Added extra condition to check if document_id is not null, nor empty string in portal_product_document_markdown_patch
  • Removed type parameter from portal_product_toc_markdown_patch as it is no longer supported by Portal API

Testing

Tested by running Publish Portal Content workflow, that calls affected script under the hood:
https://github.com/SmartBear/smartbear-mcp/actions/runs/23895595549/job/69679462811

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 30, 2026

🎯 Coverage Target Met!

📈 Coverage Metrics

Metric Coverage Target Status
Lines 93.5% 80%
Functions 86.1% 80%
Branches 86.7% 80%
Statements 93.5% 80%

📊 Test Statistics

  • Total Lines: 20,646 / 22,077
  • Total Functions: 322 / 374
  • Total Branches: 948 / 1093
  • Total Statements: 20646 / 22077

🔍 Files Needing Coverage

File Coverage
src/reflect/prompt/sap-test.ts 9.5%
src/qmetry/client/testsuite.ts 10.3%
src/common/prompts.ts 16.7%
src/qmetry/client/issues.ts 20.1%
src/swagger/client/api.ts 30.0%

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

@marekgorniak marekgorniak changed the title PROVCON-4978 - removed "type" from portal_product_toc_markdown_patch fix: adjustments in publish-portal-content.sh (PROVCON-4978) Mar 30, 2026
@marekgorniak marekgorniak force-pushed the fix/PROVCON-4978-Nested-pages-not-being-publishing-for-MCP-content-via-API branch from b2a4cc6 to 5ba948c Compare April 2, 2026 06:57
@marekgorniak marekgorniak force-pushed the fix/PROVCON-4978-Nested-pages-not-being-publishing-for-MCP-content-via-API branch 2 times, most recently from 83ef7fc to 7fb27e7 Compare April 2, 2026 08:19
@marekgorniak marekgorniak marked this pull request as ready for review April 2, 2026 10:36
PROVCON-4978 - added extra "if" statement to handle missing "source" property
…nt_markdown_patch()

PROVCON-4978 - handled missing "source" property in portal_product_document_markdown_patch()
@marekgorniak marekgorniak force-pushed the fix/PROVCON-4978-Nested-pages-not-being-publishing-for-MCP-content-via-API branch from d3499f8 to 52e21f2 Compare April 8, 2026 06:29
@marekgorniak marekgorniak requested a review from rownskim April 9, 2026 06:07
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.

2 participants