[ 
https://issues.apache.org/jira/browse/NIFI-7636?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Pierre Villard resolved NIFI-7636.
----------------------------------
    Resolution: Feedback Received

Apache NiFi 1.x is no longer maintained and no new release is planned on the 
1.x release line. Marking as resolved as part of a cleanup operation. Please 
open a new one with an updated description if this is still relevant for NiFi 
2.x.

> ValidateRecord Prints Array Paths in Confusing Way
> --------------------------------------------------
>
>                 Key: NIFI-7636
>                 URL: https://issues.apache.org/jira/browse/NIFI-7636
>             Project: Apache NiFi
>          Issue Type: Bug
>    Affects Versions: 1.11.4
>            Reporter: Eric Secules
>            Priority: Major
>
> When there is a avro Validation Error in an element of a JSON array the array 
> index is placed before the array's name in the path. For example if the input 
> JSON was this:
> {code:java}
> {
>   "myArray": [
>     {
>       "myValue": null
>     }
>   ]
> }
> {code}
>  and "myValue" was required
>  the validation error would be:
>  
> {code:java}
> {
>   "fieldName" : "[0]/myArray/myValue",
>   "inputValue" : null,
>   "explanation" : "Field is required",
>   "type" : "MISSING_FIELD"
> }
> {code}
> It would make more sense if the array index was after the array field name 
> like so. Placing the array index before the array doesn't make any sense to 
> me.
> {code:java}
> { 
>   "fieldName" : "/myArray[0]/myValue",
>   "inputValue" : null,
>   "explanation" : "Field is required",
>   "type" : "MISSING_FIELD"
> }
> {code}
> or if the field name was made using JSONPath syntax like:
> {code:java}
> { 
>   "fieldName" : "$.myArray[0].myValue",
>   "inputValue" : null,
>   "explanation" : "Field is required",
>   "type" : "MISSING_FIELD"
> } 
> {code}
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to