You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've added the DocumentationExample annotation on 2 getters:
public static final String DATETIME_VALUE = "2020-05-25'T'124:35:75'Z'";
@DocumentationExample(value=DATETIME_VALUE, type=@TypeHint(java.sql.Date.class) )
@Override
public java.sql.Date getSqlDate() {
return sqlDate != null ? (java.sql.Date) sqlDate.clone() : null;
}
@DocumentationExample(value=DATETIME_VALUE, type=@TypeHint(Date.class) )
@Override
public Date getJavaDate() {
return javaDate != null ? (Date) javaDate.clone() : null;
}
When swagger module is enabled it failed with the error:
[ERROR] Failed to execute goal com.webcohesion.enunciate:enunciate-maven-plugin:2.13.1:docs (default) on project some-project-rest-api: com.fasterxml.jackson.core.JsonParseException: Unexpected character ('-' (code 45)): was expecting comma to separate Object entries
[ERROR] at [Source: (FileReader); line: 183, column: 30]
In the enunciate/docs/ui/swagger.json the DATETIME_VALUE (see example attribute) for java.util.Date is wrapped with double quotes and is a valid json string, but for java.sql.Date it is generated without double quotes and as a result we get this error. Here are two generated values for comparison:
I've added the
DocumentationExample
annotation on 2 getters:When swagger module is enabled it failed with the error:
In the enunciate/docs/ui/swagger.json the
DATETIME_VALUE
(see example attribute) forjava.util.Date
is wrapped with double quotes and is a valid json string, but forjava.sql.Date
it is generated without double quotes and as a result we get this error. Here are two generated values for comparison:The text was updated successfully, but these errors were encountered: