-
Notifications
You must be signed in to change notification settings - Fork 82
Open
Description
The generated types don't include null when the wsdl element attribute nillable=true is set.
i.e.
my_generated_field string|null,
When the wsdl is parsed, nillable field settings can likely be inspected, to set null primitive types.
I may try and change the library to allow for literals which include the type and null (i.e. string|null) in the below code somewhere
function parseWsdl....
if (outputMessage.element) {
const typeName = outputMessage.element.$type ?? outputMessage.element.$name;
const type = parsedWsdl.findDefinition(typeName);
outputDefinition = type ?? parseDefinition(
parsedWsdl,
mergedOptions,
typeName,
outputMessage.parts,
[typeName],
visitedDefinitions
);
// Check for nillable attribute
**if (outputMessage.element.$nillable === "true") {
//change the type definition from string to string|null**
Does this sound reasonable?
Metadata
Metadata
Assignees
Labels
No labels