summaryrefslogtreecommitdiffstats
path: root/cps-service/src
diff options
context:
space:
mode:
authorBruno Sakoto <bruno.sakoto@bell.ca>2021-05-05 08:11:19 -0400
committerRishi Chail <rishi.chail@est.tech>2021-05-07 08:26:42 +0000
commitddedbd16185f756fd6171c6951877cedf78a647f (patch)
tree65528010486dfa7706e4e89ad54d82df8863d96a /cps-service/src
parent4395c1fad0b92f0f7084ca9d70e6e26f61007513 (diff)
Fix cps ran yang data model
* Add a liquibase change set to update cps ran model data * Rename model "cps-ran-schema-model@2021-01-28.yang" to be compliant with yang specifications related to file layout https://tools.ietf.org/html/rfc7950#section-5.2 * Improve yang validation error handling to provide more information about the validation failure in the request response * Add csit test to verify cps ran model retrieval Issue-ID: CPS-377 Signed-off-by: Bruno Sakoto <bruno.sakoto@bell.ca> Change-Id: I4f0e337b50d79e81f895eb32f09ae9cb5d9d8a70
Diffstat (limited to 'cps-service/src')
-rw-r--r--cps-service/src/main/java/org/onap/cps/yang/YangTextSchemaSourceSetBuilder.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/cps-service/src/main/java/org/onap/cps/yang/YangTextSchemaSourceSetBuilder.java b/cps-service/src/main/java/org/onap/cps/yang/YangTextSchemaSourceSetBuilder.java
index 0e8d939ee1..67d5ffb033 100644
--- a/cps-service/src/main/java/org/onap/cps/yang/YangTextSchemaSourceSetBuilder.java
+++ b/cps-service/src/main/java/org/onap/cps/yang/YangTextSchemaSourceSetBuilder.java
@@ -126,7 +126,8 @@ public final class YangTextSchemaSourceSetBuilder {
String.format("Exception occurred on reading resource %s.", resourceName), e);
} catch (final YangSyntaxErrorException e) {
throw new ModelValidationException("Yang resource is invalid.",
- String.format("Yang syntax validation failed for resource %s.", resourceName), e);
+ String.format(
+ "Yang syntax validation failed for resource %s:%n%s", resourceName, e.getMessage()), e);
}
}
try {