Closed ST-DDT closed 6 years ago
I'm surprised because this case is already taken into account, and I have some tests using Object
ensuring that the template is {}
. I'll try to reproduce with your exact class shapes, maybe I missed something.
I have tested with the same classes as yours, and the template provider gives me the correct output:
{"filters":[{"key":"","op":"","value":{}}],"limit":0}
Do you confirm you are using livedoc 4.3.0? The default for strings has changed to ""
since 4.2.0, so I'm surprised you're even getting nulls for the key
and op
fields.
Ok, I managed to reproduce using the sample webapp and your classes. It looks like the template provider in itself is correct, but somehow, when integrated in the app, the resulting template is the complicated JSON you sent. I'll look into it ASAP, but currently I'm at work, so please hold on ;)
In one of my DTOs I have a field that is of type
Object
because its some kind of generic filter param. However in the generated template it looks like it was a really complex data object (because it exposes the stuff insideObject#getClass()
).It would be nice if you could replace the template for
Object
with some kind of"any"
ornull
.In the generated JsonDoc the template is displayed like this:
I'm using
livedoc-springmvc-4.3.0
.