glideapps / glideapps/quicktype
CustomAttributeProducer and custom rendering doesnt work
- Dominant language
- TypeScript
- Stars
- 13.9k
- Forks
- 1.2k
- Avg merge
- 8h 53m
- Merged PRs (30d)
- 369
Description
I used https://github.com/quicktype/quicktype-custom-csharp-example to create a custom rendered for java with @deprecated tag but the custom attribute producer for some reason is messed up. it looks like the union type or intersection is some how getting messed up.
the code for it is here
https://github.com/addynaik/quicktype-custom-java-example
based on https://github.com/addynaik/quicktype-custom-java-example/blob/master/input.schema what we should get is deprecated tag for email and phone number but for some reason it also gets added to externalId.
```
// Player.java
package io.quicktype;
import java.util.*;
import com.fasterxml.jackson.annotation.*;
public class Player {
private String externalID;
private Participant participant;
private Long userID;
@Deprecated
@JsonProperty("externalId")
public String getExternalID() { return externalID; }
@Deprecated
@JsonProperty("externalId")
public void setExternalID(String value) { this.externalID = value; }
@JsonProperty("participant")
public Participant getParticipant() { return participant; }
@JsonProperty("participant")
public void setParticipant(Participant value) { this.participant = value; }
@JsonProperty("userId")
public Long getUserID() { return userID; }
@JsonProperty("userId")
public void setUserID(Long value) { this.userID = value; }
}
// Participant.java
package io.quicktype;
import java.util.*;
import com.fasterxml.jackson.annotation.*;
public class Participant {
private String emailAddress;
private String phoneNumber;
@Deprecated
@JsonProperty("emailAddress")
public String getEmailAddress() { return emailAddress; }
@Deprecated
@JsonProperty("emailAddress")
public void setEmailAddress(String value) { this.emailAddress = value; }
@Deprecated
@JsonProperty("phoneNumber")
public String getPhoneNumber() { return phoneNumber; }
@Deprecated
@JsonProperty("phoneNumber")
public void setPhoneNumber(String value) { this.phoneNumber = value; }
}
```
Contributor guide
Assessment
This issue has not been assessed yet.