wkennedy / swagger4spring-web

Swagger support for Spring MVC
89 stars 46 forks source link

Overriding models #18

Open suksant opened 11 years ago

suksant commented 11 years ago

Hello, I'm trying to override models per https://github.com/wordnik/swagger-core/wiki/overriding-models but swagger doesn't seem to encounter and return overridden schema. And it seems that the controllers are always loaded prior to serializer being bootstrapped. I'm not sure if this is an issue or is it just my fault...

@Component public class BootstrapController implements ApplicationListener { @Override public void onApplicationEvent(ContextRefreshedEvent event) { new DateSerializer(); } }

wkennedy commented 11 years ago

Hey there suksant,

I will look into this. If possible, could you give me a sample project to test? If not, that's okay, but it might take me a bit longer.

Thanks!

suksant commented 11 years ago

Hello Will,

Thanks a lot. I can't upload the repo right now as the connection is not so reliable. However, the example was mainly here: https://github.com/noppanit/swagger-spring-example However, it does not seem to serialize the Date object properly. Similar approach works with RESTeasy, etc without plugin. It might be my mistake somewhere in the code but I couldn't figure out :( Thanks again for helping. I really appreciate it.

Best, Suksant

suksant commented 11 years ago

Hello Will,

Just wonder whether you had a chance to test it?

Thanks a lot! Suksant.

wkennedy commented 11 years ago

Hi suksant,

I have not had a chance to test this particular issue, but I'm working on some changes which may inadvertently fix the issue you are seeing. As soon as I'm done with these changes, I'll test this issue and see if it still occurs. If not, I'll begin investigating why this is happening.

Thanks!

suksant commented 11 years ago

Thanks a lot. I'm looking forward to the updates.