swagger-core icon indicating copy to clipboard operation
swagger-core copied to clipboard

Add GSON support

Open fehguy opened this issue 8 years ago • 14 comments

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.

fehguy avatar Jun 19 '16 16:06 fehguy

Any news on this one?

cleankod avatar Jul 19 '17 12:07 cleankod

Any update on this?

danielgomezrico avatar Apr 16 '18 14:04 danielgomezrico

It's not really on our radar.

webron avatar Apr 21 '18 14:04 webron

any update? We need Gson in swagger.

hptvl avatar Jun 19 '19 07:06 hptvl

PLEASE ADD SUPPORT

Larkenx avatar Feb 14 '20 16:02 Larkenx

+1

softboy99 avatar Oct 15 '20 04:10 softboy99

+1

RUANHAOANDROID avatar Jun 29 '21 07:06 RUANHAOANDROID

@webron should we expect this feature request to enter the radar anytime soon? Thank you

albertocavalcante avatar Jul 07 '21 22:07 albertocavalcante

please add the gson support.

jiangxiaoqiang avatar Jun 03 '22 15:06 jiangxiaoqiang

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?

jiangxiaoqiang avatar Jun 03 '22 15:06 jiangxiaoqiang

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?

ChristianCiach avatar Jun 03 '22 16:06 ChristianCiach

I am trying to remove the gson from my project, it take me too much time to solve this imcompatible problem.

jiangxiaoqiang avatar Jun 03 '22 16:06 jiangxiaoqiang

+1

hubefonseca avatar Sep 29 '22 17:09 hubefonseca

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!

bcb44 avatar May 16 '23 16:05 bcb44