swagger-core
swagger-core copied to clipboard
Add GSON support
Currently swagger-core is jackson-only, many users want to support GSON. Need to see how feasible this is, but it would be nice if user-selectable.
Any news on this one?
Any update on this?
It's not really on our radar.
any update? We need Gson in swagger.
PLEASE ADD SUPPORT
+1
+1
@webron should we expect this feature request to enter the radar anytime soon? Thank you
please add the gson support.
Currently swagger-core is jackson-only, many users want to support GSON. Need to see how feasible this is, but it would be nice if user-selectable.
how did you solve this problem?
I wonder if this is still worth the effort. I was one of the people who upvoted this issue years ago, but a lot has changed since then. We've moved away from gson completely. Even Google has mostly ceased development of gson. See the README of the gson project:
Gson is currently in maintenance mode; existing bugs will be fixed, but large new features will likely not be added.
This begs the question: Is it worth the time and effort to support a library that is even barely kept alive by its maintainers?
I am trying to remove the gson from my project, it take me too much time to solve this imcompatible problem.
+1
My company still uses gson pretty heavily and we're going to work on supporting it inside this project. The goal is to add gson support by treating gson annotations as their corresponding Jackson annotations (SerializedName -> JsonProperty etc) in the AnnotationIntrospector. We can then extend some key classes to use a custom ObjectMapper that uses the custom AnnotationIntrospector. It's a little hacky but should work nicely. Here's the repo where I'm working on it https://github.com/bcb44/gson-swagger-core/, still very much in the infancy stages but would love to work with others on implementing more of this!