-
Notifications
You must be signed in to change notification settings - Fork 54
Open
Description
Sorry i dont know if this is an issue or I am doing this completely wrong
I have two xsd files that i am trying to parse
The first has some complex types basic stuff, but the second one has xs:redefine to alter the complex types from the first xsd
example
base.xsd
<xs:complexType name="transaction">
<xs:sequence>
<xs:element name="id" type="xs:string" minOccurs="0"/>
<xs:element name="timestamp" type="xs:dateTime" minOccurs="0"/>
</xs:sequence>
</xs:complexType>extend.xsd
<xs:redefine schemaLocation="base.xsd">
<xs:complexType name="transaction">
<xs:complexContent>
<xs:extension base="transaction">
<xs:sequence>
<xs:element name="partial" type="xs:string" minOccurs="0" />
<xs:element name="originSrc" type="xs:string" minOccurs="0" />
<xs:element name="originalPrd" type="xs:string" minOccurs="0" />
<xs:element name="crn" type="xs:string" minOccurs="0" />
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:redefineThis is the resulting Typescript i get
interface _transaction extends BaseType {
id?: string;
timestamp?: Date;
}
export interface transaction extends _transaction { constructor: { new(): transaction }; }
export var transaction: { new(): transaction };As I said earlier this might not be an issue, but a problem with how things are done on my side. As some backstory we are upgrading the frontend on an old service that my company has to angular2. They do not want to update any of the server stuff (all the xsds) and i have to generate visualizations off this data that is returned and i do not wish to go through all the xsd files they have and manually try to get this data in.
Metadata
Metadata
Assignees
Labels
No labels