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 have the situation where we have a REST API where an enum should be rendered as a String type (in swagger.json). So we don't expose the actual enum BUT want to simply reference to that enum in the javadoc of the string field, to not having to manually write down its values in the docs. We thought a simple:
publicclassMyModel {
/** * The following {@link acme.SomeClass.MyInnerEnum} values are allowed. */publicStringmyEnumValue;
}
would do the trick. But it doesn't 😢.
Only if we explicitly put @JsonSeeAlso(acme.SomeClass.MyInnerEnum) to the field it seems to work. Could enunciate be smart about it and automatically add it to the list for doc generation :)?
The text was updated successfully, but these errors were encountered:
It's probably technically possible, but I'm not sure it's a good idea because it would require Enunciate (which already scans all classes on the classpath and all sources on the sourcepath) to also scan all javadocs on all sources on the sourcepath.
I'll leave this open for others to comment or to provide alternative solutions, but I'm not currently inclined to add that overhead.
We have the situation where we have a REST API where an enum should be rendered as a String type (in swagger.json). So we don't expose the actual enum BUT want to simply reference to that enum in the javadoc of the string field, to not having to manually write down its values in the docs. We thought a simple:
would do the trick. But it doesn't 😢.
Only if we explicitly put
@JsonSeeAlso(acme.SomeClass.MyInnerEnum)
to the field it seems to work. Could enunciate be smart about it and automatically add it to the list for doc generation :)?The text was updated successfully, but these errors were encountered: