Lehel44 commented on code in PR #6018:
URL: https://github.com/apache/nifi/pull/6018#discussion_r866130388
##########
nifi-nar-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/main/java/org/apache/nifi/json/JsonTreeReader.java:
##########
@@ -95,6 +98,18 @@ public class JsonTreeReader extends SchemaRegistryService
implements RecordReade
.dependsOn(STARTING_FIELD_STRATEGY,
StartingFieldStrategy.NESTED_FIELD.name())
.build();
+ public static final PropertyDescriptor SCHEMA_APPLICATION_STRATEGY = new
PropertyDescriptor.Builder()
+ .name("schema-application-strategy")
+ .displayName("Schema Application Strategy")
+ .description("Specifies whether the schema is defined for the
whole JSON or for the selected part starting from \"Starting Field Name\".")
+ .required(true)
+ .addValidator(StandardValidators.NON_BLANK_VALIDATOR)
+ .defaultValue(SchemaApplicationStrategy.SELECTED_PART.getValue())
+ .dependsOn(STARTING_FIELD_STRATEGY,
StartingFieldStrategy.NESTED_FIELD.name())
+ .dependsOn(SCHEMA_ACCESS_STRATEGY, SCHEMA_NAME_PROPERTY,
SCHEMA_TEXT_PROPERTY, HWX_SCHEMA_REF_ATTRIBUTES, HWX_CONTENT_ENCODED_SCHEMA,
CONFLUENT_ENCODED_SCHEMA)
Review Comment:
When the schema is inferred in case of Nested Field Strategy, it
automatically applies it for the nested part. The Schema Application Strategy
is only meaningful when the schema is exactly defined.
--
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]