Skip to content

Commit

Permalink
fix WoT model validation calculating wrong path
Browse files Browse the repository at this point in the history
* for enforcing feature properties in all submodels
  • Loading branch information
thjaeckle committed Dec 16, 2024
1 parent 560c737 commit 7f65fe8
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,6 @@ public CompletionStage<Void> validateFeaturesProperties(final Map<String, ThingM
features,
false,
validationConfig.getFeatureValidationConfig().isForbidNonModeledProperties(),
resourcePath,
context
).thenApply(aVoid -> null);
} else {
Expand All @@ -239,7 +238,6 @@ public CompletionStage<Void> validateFeaturesProperties(final Map<String, ThingM
features,
true,
validationConfig.getFeatureValidationConfig().isForbidNonModeledDesiredProperties(),
resourcePath,
context
).thenApply(aVoid -> null);
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@ static CompletableFuture<List<Void>> enforceFeaturePropertiesInAllSubmodels(
final Features features,
final boolean desiredProperties,
final boolean forbidNonModeledProperties,
final JsonPointer resourcePath,
final ValidationContext context
) {
final CompletableFuture<List<Void>> enforcedPropertiesListFuture;
Expand All @@ -119,7 +118,7 @@ static CompletableFuture<List<Void>> enforceFeaturePropertiesInAllSubmodels(
features.getFeature(entry.getKey()).orElseThrow(),
desiredProperties,
forbidNonModeledProperties,
resourcePath.append(Thing.JsonFields.FEATURES.getPointer())
Thing.JsonFields.FEATURES.getPointer()
.addLeaf(JsonKey.of(entry.getKey()))
.append(desiredProperties ?
Feature.JsonFields.DESIRED_PROPERTIES.getPointer() :
Expand Down

0 comments on commit 7f65fe8

Please sign in to comment.