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

Adding attributes parsing #1251

Merged
merged 1 commit into from
Aug 21, 2024

Conversation

simakvladimir
Copy link
Contributor

Hi!

Problem

There is typescript generator based on node-soap. Out of the box it parses wsdl using node-soap wsdl class.

For example for such wsdl:

<s:element name="SpellError">
  <s:complexType>
    <s:sequence>
      <s:element minOccurs="1" maxOccurs="1" name="word" type="s:string"/>
      <s:element minOccurs="1" maxOccurs="1" name="text" type="s:string"/>
     </s:sequence>
     <s:attribute name="text" type="s:string" use="required"/>
     <s:attribute name="pos" type="s:int" use="required"/>
  </s:complexType>
</s:element>

generator creates such code where it ignores attributes :

interface SpellError {
  word?: string;
  text?: string; 
}

Generator ignores attributes because for parsing wsdl it uses WSDL class from node-soap which don't parse attributes.

More about problem here and here

Solution

This PR resuscitates old PR - #1013 - in which the problem has already been solved.

@w666 w666 self-requested a review August 21, 2024 07:32
@w666
Copy link
Collaborator

w666 commented Aug 21, 2024

Looks good to me, thanks for the test.

@w666
Copy link
Collaborator

w666 commented Aug 21, 2024

@simakvladimir do you want to keep your business email address in the commit message? GitHub wants to add it when I merge it.

@simakvladimir
Copy link
Contributor Author

@simakvladimir do you want to keep your business email address in the commit message? GitHub wants to add it when I merge it.

yes, no problem

@w666 w666 merged commit 3f9f805 into vpulim:master Aug 21, 2024
1 check passed
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