Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
How do you override models with swagger-core 1.5.3? #1499
So yeah, it has changed and not documented yet (sorry about that).
In the meantime, you can have a look at the test - https://github.com/swagger-api/swagger-core/blob/master/modules/swagger-core/src/test/java/io/swagger/model/override/CustomConverterTest.java - and we'll do our best to answer any follow up questions you may have.
Thank you very much! I used that example along with this: https://github.com/swagger-api/swagger-core/blob/master/modules/swagger-core/src/test/java/io/swagger/model/override/SamplePropertyConverter.java to figure out how to create a property (that example you linked me to just returns null).
I think I have everything set up. But now I'm wondering, where do I put this code. The old way was to put it in the constructor of a servlet class. Newer documentation puts a lot of startup type code in the the init function of a servlet class, which is what I did. But it doesn't appear to be working. I'm wondering if it's because you have to create a local instance of the ModelConverters class instead of using it statically. I hope that question makes sense...