Skip to content

Commit efa7000

Browse files
committed
add yaml validator document
1 parent 69813b9 commit efa7000

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

doc/yaml.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,16 @@
1-
One of the features for this library
1+
One of the features of this library is to validate the YAML file in addition to the JSON. In fact, the main use case for this library is to be part of the light-4j framework to validate the request/response at runtime against the OpenAPI specification file openapi.yaml. If you are not using light-4j, you need to load the YAML with https://github.com/FasterXML/jackson-dataformats-text first, and then everything is the same as JSON.
2+
3+
### Usage
4+
5+
Add the dependency
6+
7+
```
8+
<dependency>
9+
<groupId>com.fasterxml.jackson.dataformat</groupId>
10+
<artifactId>jackson-dataformat-yaml</artifactId>
11+
<version>2.10.1</version>
12+
</dependency>
13+
```
14+
15+
and created object mapper using yaml factory i.e ObjectMapper objMapper =new ObjectMapper(new YAMLFactory());
16+

0 commit comments

Comments
 (0)