You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We sometimes use custom value types to enforce type safety in our model, and register converters to unwrap these values into strings. Is there any way we can have the doclet recognize these type replacements when generating the swagger documentation?
Specifically, I have something like:
public class Model {
public TechId id;
}
@XmlJavaTypeAdapter(TechId.XmlConverter.class)
public class TechId {
private final UUID uuid;
public TechId(String s) {
uuid = UUID.fromString(s);
}
@Override
public String toString() {
uuid.toString();
}
public static class XmlConverter extends XmlAdapter<String, TechId> {
@Override
public TechId unmarshal(String v) throws Exception {
return new TechId(v);
}
@Override
public String marshal(TechId v) throws Exception {
return v.toString();
}
}
}
and was hoping for the doclet to recognize the type replacement, but it didn't, i.e. the type of Model.id is not string, but TechId with a property uuid.
The text was updated successfully, but these errors were encountered:
We sometimes use custom value types to enforce type safety in our model, and register converters to unwrap these values into strings. Is there any way we can have the doclet recognize these type replacements when generating the swagger documentation?
Specifically, I have something like:
and was hoping for the doclet to recognize the type replacement, but it didn't, i.e. the type of
Model.id
is notstring
, butTechId
with a propertyuuid
.The text was updated successfully, but these errors were encountered: