jomarko commented on code in PR #2168:
URL:
https://github.com/apache/incubator-kie-tools/pull/2168#discussion_r1497124098
##########
packages/dmn-runner/src/jsonSchema.ts:
##########
@@ -77,6 +77,17 @@ export function
removeChangedPropertiesAndAdditionalProperties<T extends Validat
return;
}
+ // uniforms-patternfly saves the DateTimeField component value as a Date
object and
+ // AJV handles data-time as a string, causing an error with keyword type.
+ // Also, the ajv.ErrorObject doesn't correctly type the parentSchema
property
+ if (
+ error.keyword === "type" &&
+ (error.parentSchema as any)?.format === "date-time" &&
Review Comment:
Shouldn't we use `DATE_TIME` constraint instead of `"date-time"` hardcoded
string in this code snippet?
```
enum DmnAjvSchemaFormat {
DATE = "date",
TIME = "time",
DATE_TIME = "date-time",
DAYS_TIME_DURATION = "days and time duration",
YEARS_MONTHS_DURATION = "years and months duration",
}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]