Question

I am trying to put annotations from JSONDoc on multidimensional objects but with no success.

Example:

@ApiObjectField(description = "Multidimensional array with flags")
private boolean[][] flags;

The following exception is raised:

GRAVE: Servlet.service() for servlet [appservlet] in context with path [/database] threw exception [Request processing failed; nested exception is org.reflections.ReflectionsException: could not get type for name [Z] with root cause org. reflections.ReflectionsException: could not get type for name [Z
at org.reflections.ReflectionUtils.forName(ReflectionUtils.java:378)
at org.jsondoc.core.util.JSONDocUtils.getObjectNameFromAnnotatedClass(JSONDocUtils.java:125)
at org.jsondoc.core.pojo.ApiObjectFieldDoc.getFieldObject(ApiObjectFieldDoc.java:70)
...

Someone knows how to resolve this or know another library to generate JSON documentation that can achieve this?

Thanks.

Was it helpful?

Solution

The right way to do this is using a class to enclose the multidimensional objects, like List<List<Boolean>>.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top