Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
1.9.2, 1.12.1
-
None
Description
ValidateRecord processor does not validate correctly the enum data type against a flow file with JSON content. If an AVRO schema is placed with an enum it does not check the content of the field, just the type.
Example:
We have json like this:
{"test":"test"}
Then whe have the next AVRO schema:
{
"name": "MyClass",
"type": "record",
"namespace": "com.test",
"fields": [
{
"name": "test",
"type":
}
]
}
Eventhough the word "test" is not included in one of the options for this field (that should be an enum type)The flowfile passes as valid. It only checks if it is the same type than the options inside the enum (In this case String)
I made a simple template in case you want to test it.
I've tested it in versions 1.9.2 and 1.12.1 and the same behavior is observed.
Attachments
Attachments
Issue Links
- is fixed by
-
NIFI-7981 ConvertRecord cannot handle open enum in Avro
- Resolved