Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix:ref attributes convert list #1168

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/wsdl/elements.ts
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,13 @@ export class ElementElement extends Element {
let elem: any = {};
typeStorage[typeName] = elem;

if (isMany) {
typeElement['maxOccurs'] = this.$maxOccurs
}
if (Boolean(this.$minOccurs)) {
typeElement['minOccurs'] = this.$minOccurs
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

please add a test for these changes

Copy link
Author

Choose a reason for hiding this comment

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

@jsdevel

please add a test for these changes

Are you referring to minOccurs to add the test?
Sorry, about the minOccurs, it may not be necessary, just to match the maxOccurs.
It's only the maxOccurs part I want to fix.

Copy link
Collaborator

Choose a reason for hiding this comment

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

yes. sorry for the late reply. please add a test to verify that this works as expected now and in the future.

Copy link
Contributor

Choose a reason for hiding this comment

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

@momo1006 have you solved this issue without this PR?

Copy link
Contributor

Choose a reason for hiding this comment

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

@momo1006 and @jsdevel Is this problem now resolved?

Copy link
Collaborator

Choose a reason for hiding this comment

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

@ydaniju test is required for these changes. Seems like this PR was abandoned. I will try to have a look on this, just not sure when I have time.

Feels free to help with this and provide a test, that would make it much easier for me.

Copy link
Contributor

@ydaniju ydaniju Oct 29, 2024

Choose a reason for hiding this comment

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

Thanks @w666 for the quick response. I created a test for this here https://github.com/vpulim/node-soap/pull/1260/files . I don't know how to add the test in this PR.

I will attempt a fix for the next few hours.


const description = typeElement.description(definitions, xmlns);
if (typeof description === 'string') {
elem = description;
Expand Down