diff options
author | 2020-11-25 12:53:49 +0100 | |
---|---|---|
committer | 2020-11-26 13:26:01 +0100 | |
commit | 3fed3de85164c56081075dece8695d7f84ae48af (patch) | |
tree | d2877a7583e78a749024ecc4a35a664d68e713db /pmdictionaryvalidation/README.md | |
parent | 513f2ef448b14f3880981c1bc95ab395b29de4e9 (diff) |
Add possibility to validation pm-dictionary from byte array
Issue-ID: VNFSDK-713
Signed-off-by: Pawel <pawel.kasperkiewicz@nokia.com>
Change-Id: I2d2de2cfe066e1cbbdea3bc8fac771914779e117
Diffstat (limited to 'pmdictionaryvalidation/README.md')
-rw-r--r-- | pmdictionaryvalidation/README.md | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/pmdictionaryvalidation/README.md b/pmdictionaryvalidation/README.md new file mode 100644 index 0000000..2bc91a5 --- /dev/null +++ b/pmdictionaryvalidation/README.md @@ -0,0 +1,26 @@ +PMDictionary Validation +======================= +This module can be used as a library to validate pmdictionary against the schema (schema is the first document in the file). + +How to use PMDictionary validation library +------------------------------------------ +VNF-SDK validation library (pmdictionaryvalidation) should be used to validate the PM_Dictionary file. + Below dependency should be added to the required modules in your project. + + <dependency> + <groupId>org.onap.vnfsdk.validation</groupId> + <artifactId>validation-pmdictionary</artifactId> + <version>version</version> + </dependency> + +How to validate PMDictionary +-------------------------- +1.Validate PMDictionary from a path to the file. + + new YamlContentValidator().validate(pathToFile) + +2.Validate PMDictionary file from the byte array. + + new YamlContentValidator().validate(fileContentAsByteArray) + +Above methods return list of YamlDocumentValidationError(empty list for no errors) or throw YamlProcessingException/YAMLException when something goes wrong. |