Swagger fails on response type of ObjectNode
See original GitHub issueSeveral of our REST APIs return ObjectNode as a free-form JSON object. JAXRS handles this cleanly. However, swagger fails to initialize in this scenario with the following error:
java.lang.IllegalArgumentException: Conflicting setter definitions for property "all": com.fasterxml.jackson.databind.node.ObjectNode#setAll(1 params) vs com.fasterxml.jackson.databind.node.ObjectNode#setAll(1 params)
at com.fasterxml.jackson.databind.introspect.POJOPropertyBuilder.getSetter(POJOPropertyBuilder.java:320)
at io.swagger.jackson.ModelResolver.resolve(ModelResolver.java:267)
at io.swagger.jackson.ModelResolver.resolve(ModelResolver.java:149)
It would be nice for swagger to not to be completely unusable in this scenario. For example, the implementation could special case ObjectNode response types and document as a schema-less response object.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:11
- Comments:7 (1 by maintainers)
Top Results From Across the Web
Swagger fails on response type of ObjectNode - Bountysource
Several of our REST APIs return ObjectNode as a free-form JSON object. JAXRS handles this cleanly. However, swagger fails to initialize in ...
Read more >Custom ResponseModel in Springfox/Swagger for returning of ...
We can give custom request and response model in swagger api documentation using swagger springfox annotations as shown below
Read more >com.fasterxml.jackson.databind.node.ArrayNode incompatible ...
I'm getting this error when trying to build a new REST API in IIB toolkit ... After changing the data type to object...
Read more >Error when validating response body against a schema ...
JsonNode which returns following error: com.github.fge.jsonschema.core.report.ListProcessingReport: failure --- BEGIN MESSAGES --- error: ...
Read more >Describing Responses - Swagger
To specify the response media types, use the content keyword at the operation level. ... For example, you can describe the conditions for...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Thx a lot for the workaround @StevenChoo!!
Try snapshot, we’ve updated the jackson version there.