-
Notifications
You must be signed in to change notification settings - Fork 237
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
JAXBElement<T> should be converted in type T #175
Comments
@sanja224 I think it would be good if typescript-generator could handle |
Yes, I just need the T type unwraped in all cases. I have many examples. Here's one: These are the properties in the java class @XmlElement(name = "ExternalReference")
protected String externalReference;
@XmlElementRef(name = "UserInformation", type = JAXBElement.class, required = false)
protected JAXBElement<UserType> userInformation;
@XmlElementRef(name = "Source", type = JAXBElement.class, required = false)
protected JAXBElement<EndPointType> source;
@XmlElementRef(name = "AdditionalContextInfo", type = JAXBElement.class, required = false)
protected JAXBElement<AdditionalContextType> additionalContextInfo; This is the output: externalReference: String,
userInformation: any,
source: any,
additionalContextInfo: any This is how the output should look like: externalReference: String,
userInformation: UserType,
source: EndPointType,
additionalContextInfo: AdditionalContextType EDIT: code format |
I committed support for interface ClassWithJAXBElements {
ExternalReference: string;
UserInformation: UserType;
Source: EndPointType;
AdditionalContextInfo: AdditionalContextType;
} Could you please check it if it does what's expected? |
Yes, it works great. |
Example:
If I have property of type JAXBElement I want that to be converted in 'Context' type instead of 'any' in typescript.
jsonLibrary is already set to jaxb. Maybe I could write something in customTypeMappings but I don't know what.
The text was updated successfully, but these errors were encountered: