- Notifications
You must be signed in to change notification settings - Fork 2.2k
Closed
Description
I have a very simple model with a java.util.Calendar property, I want to present this as a simple string with date as a format (Similar to what we get with java.util.Date).
I tried what we have in the documentation https://github.com/wordnik/swagger-core/wiki/overriding-models#in-java-with-swagger-core-version-13x
... But it didn't work
My converter looks like this
public class Converter { public void registerConverter() { String jsonString = "{" + " \"id\": \"Calendar\"," + " \"properties\": {" + " \"value\": {" + " \"required\": true," + " \"description\": \"Date in ISO-8601 format\"," + " \"notes\": \"Add any notes you like here\"," + " \"type\": \"string\"," + " \"format\": \"date-time\"" + " }" + " }" + "}"; OverrideConverter converter = new OverrideConverter(); converter.add("java.util.Calendar", jsonString); } }
I'm initializing the converter using Spring, I wonder if that's sufficient and if it is, why is not working.
Metadata
Metadata
Assignees
Labels
No labels