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

ComplexType with single Sequence fails to generate underlying type class #169

Open
rtek opened this issue Feb 21, 2024 · 0 comments
Open

Comments

@rtek
Copy link
Contributor

rtek commented Feb 21, 2024

This XSD generates a class that extends a type that doesnt get generated.

<xs:schema xmlns="bug" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="bug">
    <xs:element name="Bugs" type="Bugs"/>
    <xs:complexType name="Bugs">
        <xs:sequence>
            <xs:element name="Bug" type="Bug" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:complexType>
    <xs:complexType name="Bug">
        <xs:sequence>
            <xs:element name="Bug" type="xs:string" minOccurs="0"/>
        </xs:sequence>
    </xs:complexType>
</xs:schema>
/**
 * Class representing Bugs
 */
class Bugs extends BugsType //BugsType does not get created
{
}

It appears that BugsType gets flagged as skip here https://github.com/goetas-webservices/xsd2php/blob/master/src/Php/PhpConverter.php#L276

I switched the sequence to a choice as a workaround.

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

No branches or pull requests

1 participant