How to register CustomSchemaConverter with Swagger on Jersey2?

54 views
Skip to first unread message

Karsten

unread,
Apr 17, 2014, 3:54:49 AM4/17/14
to swagger-sw...@googlegroups.com
Hi,

I found this post: SwaggerCustomConverter. Now I would like to do something similar to my Swagger-Api, but I have no idea how to register the Converter.
In addition to that the read method now looks slightly different. 

public Option<Model> read(Class<?> cls, Map<String, String> typeMap)

My Swagger configuration looks like this and has been working fine so far: Swagger Config. Thanks again for that one.

I hope you can help me. Thanks.

Ron

unread,
Apr 17, 2014, 4:49:09 AM4/17/14
to swagger-sw...@googlegroups.com
Please take a look here for information on how to register a converter - https://github.com/wordnik/swagger-core/wiki/overriding-models#in-java-with-swagger-core-version-13x (assuming you use Java).

You can't change the method signature, but I'm sure you can implement a creative override using the existing signature.


--
You received this message because you are subscribed to the Google Groups "Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email to swagger-swaggers...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Karsten

unread,
Apr 17, 2014, 5:07:56 AM4/17/14
to swagger-sw...@googlegroups.com
Hi,

i already read that one tried it and it didn't work. But just now I updated from 1.3.2 to 1.3.4 tried it again and it works :-)

Thanks for getting me to try it again.
To unsubscribe from this group and stop receiving emails from it, send an email to swagger-swaggersocket+unsub...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages