[ https://issues.apache.org/jira/browse/NIFI-7985?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17227036#comment-17227036 ]
Pierre Villard commented on NIFI-7985: -------------------------------------- This would be fixed by the PR submitted on NIFI-7981. > ValidateRecord does not validate the type enum > ---------------------------------------------- > > Key: NIFI-7985 > URL: https://issues.apache.org/jira/browse/NIFI-7985 > Project: Apache NiFi > Issue Type: Bug > Affects Versions: 1.9.2, 1.12.1 > Reporter: Raquel Benito Barbero > Priority: Major > Attachments: testIssueEnums.xml > > > 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": { > "type": "enum", > "name": "status", > "symbols": [ > "OK", > "Failure" > ] > } > } > ] > } > > 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. > > > -- This message was sent by Atlassian Jira (v8.3.4#803005)