-
Notifications
You must be signed in to change notification settings - Fork 48
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
Support minOccurs=0 #8
Comments
Unfortunately I don't believe this is something exposed by the soap library. If it were it could be added, otherwise this lib would need a complete rewrite with a custom XSD parser. |
I see that now :( As is, the wsdl-to-ts cannot really be used with TS's strict nullable setting, as all elements become required. |
(Thanks for the quick response, BTW! Great project.) |
Yes, the way to handle the situation currently is to either generate the types once and then do manual corrections or, it pains me to say, have objects containing properties whose interface ISomeInterface {
description: string; // : string | null - in reality supports xsi:nil="true"
name: string;
restricted: boolean; // ?: boolean - in reality minOccurs="0"
}
const o: ISomeInterface = {
description: null as any,
name: "example",
restricted: undefined as any,
}; |
Should be optional or undefined if minOccurs=0
The text was updated successfully, but these errors were encountered: