Skip to content

Commit f8e96f1

Browse files
authored
Merge pull request #2075 from beyonnex-io/bugfix/wot-features-patching-validation
Fix WoT model validation calculating wrong path
2 parents 560c737 + 7f65fe8 commit f8e96f1

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

wot/validation/src/main/java/org/eclipse/ditto/wot/validation/DefaultWotThingModelValidation.java

-2
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,6 @@ public CompletionStage<Void> validateFeaturesProperties(final Map<String, ThingM
225225
features,
226226
false,
227227
validationConfig.getFeatureValidationConfig().isForbidNonModeledProperties(),
228-
resourcePath,
229228
context
230229
).thenApply(aVoid -> null);
231230
} else {
@@ -239,7 +238,6 @@ public CompletionStage<Void> validateFeaturesProperties(final Map<String, ThingM
239238
features,
240239
true,
241240
validationConfig.getFeatureValidationConfig().isForbidNonModeledDesiredProperties(),
242-
resourcePath,
243241
context
244242
).thenApply(aVoid -> null);
245243
} else {

wot/validation/src/main/java/org/eclipse/ditto/wot/validation/InternalFeatureValidation.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,6 @@ static CompletableFuture<List<Void>> enforceFeaturePropertiesInAllSubmodels(
106106
final Features features,
107107
final boolean desiredProperties,
108108
final boolean forbidNonModeledProperties,
109-
final JsonPointer resourcePath,
110109
final ValidationContext context
111110
) {
112111
final CompletableFuture<List<Void>> enforcedPropertiesListFuture;
@@ -119,7 +118,7 @@ static CompletableFuture<List<Void>> enforceFeaturePropertiesInAllSubmodels(
119118
features.getFeature(entry.getKey()).orElseThrow(),
120119
desiredProperties,
121120
forbidNonModeledProperties,
122-
resourcePath.append(Thing.JsonFields.FEATURES.getPointer())
121+
Thing.JsonFields.FEATURES.getPointer()
123122
.addLeaf(JsonKey.of(entry.getKey()))
124123
.append(desiredProperties ?
125124
Feature.JsonFields.DESIRED_PROPERTIES.getPointer() :

0 commit comments

Comments
 (0)