Skip to content

Improve WSDL import [INS-4291]#8314

Merged
yaoweiprc merged 3 commits into
developfrom
feat/flatten-wsdl-when-importing
Apr 17, 2025
Merged

Improve WSDL import [INS-4291]#8314
yaoweiprc merged 3 commits into
developfrom
feat/flatten-wsdl-when-importing

Conversation

@yaoweiprc

@yaoweiprc yaoweiprc commented Jan 23, 2025

Copy link
Copy Markdown
Contributor

When importing WSDL files, the file may depend on other XSD files. We haven't parsed referenced XSD files before.
Now we pass the file path of the WSDL to apiconnect-wsdl to let it parse all referenced xsd files.

Also, there are restrictions that prevent it from generating a full sample request. It's hard-coded in apiconnect-wsdl, so we use patch-package to patch the files in apiconnect-wsdl to remove the restrictions
https://www.npmjs.com/package/patch-package

Finally, I added the logic to show the detailed error message within the importer as our customer requested.

@yaoweiprc
yaoweiprc marked this pull request as draft January 23, 2025 05:29
@yaoweiprc yaoweiprc changed the title Flatten WSDL file when importing Flatten WSDL file when importing [INS-4291] Jan 23, 2025
@yaoweiprc
yaoweiprc force-pushed the feat/flatten-wsdl-when-importing branch from 9d27bf6 to e5d5426 Compare February 6, 2025 02:09
@yaoweiprc
yaoweiprc force-pushed the feat/flatten-wsdl-when-importing branch 5 times, most recently from a0ad1f1 to 170502a Compare March 4, 2025 09:58
@yaoweiprc
yaoweiprc force-pushed the feat/flatten-wsdl-when-importing branch 3 times, most recently from e1891fb to c2d4964 Compare March 27, 2025 10:15
@yaoweiprc
yaoweiprc marked this pull request as ready for review March 27, 2025 10:48
@yaoweiprc yaoweiprc changed the title Flatten WSDL file when importing [INS-4291] Improve WSDL import [INS-4291] Mar 27, 2025
@yaoweiprc
yaoweiprc requested a review from a team March 27, 2025 10:54
@yaoweiprc
yaoweiprc force-pushed the feat/flatten-wsdl-when-importing branch 2 times, most recently from 28e1b0a to d922d1b Compare April 16, 2025 03:51
Comment thread packages/insomnia/src/utils/importers/entities.ts Outdated
@CurryYangxx

Copy link
Copy Markdown
Member

I'd suggest adding a readme file in patches dir to explain the background and how to use it.

…hich reference other xsd files.

Patch the npm package apiconnect-wsdl to remove the limits for generating SOAP request samples.
@yaoweiprc
yaoweiprc force-pushed the feat/flatten-wsdl-when-importing branch from d922d1b to b6bac47 Compare April 17, 2025 07:57
@yaoweiprc
yaoweiprc merged commit 7ef0daf into develop Apr 17, 2025
@yaoweiprc
yaoweiprc deleted the feat/flatten-wsdl-when-importing branch April 17, 2025 08:17
cwangsmv pushed a commit that referenced this pull request Apr 21, 2025
Improve WSDL import
* Use the feature of apiconnect-wsdl library to import the wsdl files which reference other xsd files.
Patch the npm package apiconnect-wsdl to remove the limits for generating SOAP request samples.

* show detailed error for each convertor when importing, remove unused generic type

* fix review issues
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