Soap UI import#36
Conversation
WalkthroughThis PR introduces SoapUI project importer support by bumping the package version from Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
commit: |
There was a problem hiding this comment.
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 | 🟠 MajorInput-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
⛔ Files ignored due to path filters (1)
package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (4)
package.jsonsrc/importers/api-client/index.tssrc/importers/api-client/soap/index.tssrc/importers/api-client/soap/soap.ts
Summary by CodeRabbit
Release Notes
New Features
Chores