Closed thomaspeugeot closed 3 months ago
Analysis:
those 24 instances of complex type with the same name exist in the xsd. There are parsed without error and therefore are generated.
If one want to factor them, on can do that AFTER the parsing but BEFORE the generation.
Tentative solution:
before stack.Stage.StageBranchSchema(&models.SchemaSingloton)
<xsd:complexType>
<xsd:choice maxOccurs="1" minOccurs="0">
<xsd:element name="ALTERNATIVE-ID" type="REQIF:ALTERNATIVE-ID" />
</xsd:choice>
</xsd:complexType>
<xsd:element maxOccurs="1" minOccurs="0" name="ALTERNATIVE-ID">
in the xsd,
there are 24
Problème, this generates as many instances of ALTERNATIVE ID.
For instance
This defines a boolean complex type attributes of type boolean
it haves a an "ALTERNATIVE-ID" with an anonymous complex_type with a "choice" of
in fact, the whole element definition
is repeated in the xsd.
in the generated models.go,
Therefore, once one generate the anonymous complex type, one should check wether it already exists with this definition && its name