-
-
Notifications
You must be signed in to change notification settings - Fork 59
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
Element is generated as List, while it is 0:1 #871
Comments
Mypy doesn't allow an override field to change from a single value to a list like this
To compensate xsdata, finds these cases and converts the parent class to a list, the culprit for the change in <xsd:element name="HeadwayJourneyGroup" abstract="false" substitutionGroup="JourneyFrequencyGroup">
<xsd:annotation>
<xsd:documentation>A group of VEHICLE JOURNEYs following the same JOURNEY PATTERN and having the same headway interval between a specified start and end time (for example, ‘every 10 minutes’). This is especially useful for presenting passenger information.</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:complexContent>
<xsd:restriction base="HeadwayJourneyGroup_VersionStructure">
<xsd:sequence>
<xsd:sequence>
<xsd:group ref="EntityInVersionGroup" minOccurs="0"/>
</xsd:sequence>
<xsd:sequence>
<xsd:group ref="DataManagedObjectGroup"/>
</xsd:sequence>
<xsd:sequence>
<xsd:group ref="GroupOfEntitiesGroup"/> <!-- this has a description element -->
</xsd:sequence>
<xsd:group ref="JourneyFrequencyGroupGroup"/>
<xsd:group ref="HeadwayJourneyGroupGroup"/><!-- this has a description element -->
</xsd:sequence>
<xsd:attribute name="id" type="HeadwayJourneyGroupIdType"/>
</xsd:restriction>
</xsd:complexContent>
</xsd:complexType> Here is the hack in the code At the time I couldn't think of a better alternative, I am open to suggestions. Note to Self: Add a warning there because you need to know all xsdata's hacks to debug this one. |
A new warning was added, if anyone comes up with an idea to address things properly please open a new issue |
Within the NeTEx schema the element TransportAdministrativeZone inherits a Description element. This Description element is rendered as List[MultilingualString]. It is unclear to me why this element is not just a single element.
NeTEx-CEN/NeTEx#562
The text was updated successfully, but these errors were encountered: