Skip to content

Soap UI import#36

Open
rohitneharabrowserstack wants to merge 2 commits into
mainfrom
soap-ui-import
Open

Soap UI import#36
rohitneharabrowserstack wants to merge 2 commits into
mainfrom
soap-ui-import

Conversation

@rohitneharabrowserstack

@rohitneharabrowserstack rohitneharabrowserstack commented Mar 29, 2026

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

Release Notes

  • New Features

    • Introduced SoapUI project importer, allowing direct import and conversion of SoapUI project files into API client collections. The importer automatically detects SoapUI projects, extracts embedded WSDL definitions, and handles the conversion seamlessly.
  • Chores

    • Updated package version to 0.2.1.

@coderabbitai

coderabbitai Bot commented Mar 29, 2026

Copy link
Copy Markdown

Walkthrough

This PR introduces SoapUI project importer support by bumping the package version from 0.2.0 to 0.2.1, adding a new soapUiImporter export to the API client module, implementing the soapUiImporter function, and extending the SOAP conversion logic to detect SoapUI project XML format and extract embedded WSDL from CDATA blocks within <con:content> elements. If no valid WSDL is found in a SoapUI project, an error is thrown with a SoapUI-specific message.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

Suggested reviewers

  • rohanmathur91
🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately reflects the main change: adding SoapUI import functionality across multiple files (new soapUiImporter, detection logic, and WSDL extraction).
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch soap-ui-import

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@pkg-pr-new

pkg-pr-new Bot commented Mar 29, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@requestly/alternative-importers@36

commit: 52abf0a

@coderabbitai coderabbitai Bot 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.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/importers/api-client/soap/soap.ts (1)

857-871: ⚠️ Potential issue | 🟠 Major

Input-size guard should run before SoapUI regex scanning/parsing.

Lines 857–861 process full source content before any size limit check. That bypasses the intended early protection path and can create avoidable memory/CPU pressure on oversized uploads.

💡 Proposed guard placement
 export const convert: ApiClientImporterMethod<ImportFile> = async (
     file: ImportFile,
 ) => {
     let fileContent = file.content;
+
+    if (!fileContent || fileContent.length > MAX_WSDL_SIZE_CHARS) {
+        throw createSoapError(
+            SoapImportErrorType.XML_PARSE_ERROR,
+            "WSDL content exceeds the maximum allowed size of 5MB."
+        );
+    }

     if (isSoapUiProject(fileContent)) {
         fileContent = extractWsdlFromSoapUiProject(fileContent);
     } else if (!isWsdl(fileContent)) {
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/importers/api-client/soap/soap.ts` around lines 857 - 871, Run the
input-size guard on the raw file content before any SoapUI regex scanning or
WSDL parsing: move or add a call that validates file.content (the original input
string) prior to invoking isSoapUiProject, extractWsdlFromSoapUiProject, or
isWsdl so oversized uploads are rejected early; if the guard fails, throw/create
the existing SOAP import error via createSoapError rather than proceeding to
preProcessWsdl.
🧹 Nitpick comments (1)
package.json (1)

3-3: Consider a feature-level version bump for the new public importer API.

Line 3 uses a patch bump, but this PR introduces a new exported capability (soapUiImporter). A minor bump would communicate the feature addition more clearly to consumers.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@package.json` at line 3, Update the package version to a minor bump to
reflect the new public importer API; change the "version" field from "0.2.1" to
"0.3.0" in package.json and ensure any related release notes / CHANGELOG entry
references the new exported capability soapUiImporter so consumers see the
feature-level change.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Outside diff comments:
In `@src/importers/api-client/soap/soap.ts`:
- Around line 857-871: Run the input-size guard on the raw file content before
any SoapUI regex scanning or WSDL parsing: move or add a call that validates
file.content (the original input string) prior to invoking isSoapUiProject,
extractWsdlFromSoapUiProject, or isWsdl so oversized uploads are rejected early;
if the guard fails, throw/create the existing SOAP import error via
createSoapError rather than proceeding to preProcessWsdl.

---

Nitpick comments:
In `@package.json`:
- Line 3: Update the package version to a minor bump to reflect the new public
importer API; change the "version" field from "0.2.1" to "0.3.0" in package.json
and ensure any related release notes / CHANGELOG entry references the new
exported capability soapUiImporter so consumers see the feature-level change.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 90b9b314-333e-4c5d-bfb1-a3dda6ca0413

📥 Commits

Reviewing files that changed from the base of the PR and between a14786c and 52abf0a.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (4)
  • package.json
  • src/importers/api-client/index.ts
  • src/importers/api-client/soap/index.ts
  • src/importers/api-client/soap/soap.ts

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.

1 participant