Skip to content

Commit 68c77e6

Browse files
committed
CAMEL-20410: documentation fixes for camel-json-validator
- Fixed samples - Fixed grammar and typos - Fixed punctuation - Added and/or fixed links - Converted to use tabs
1 parent e6cbbb3 commit 68c77e6

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

components/camel-json-validator/src/main/docs/json-validator-component.adoc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*{component-header}*
1616

1717
The JSON Schema Validator component performs bean validation of the message body
18-
against JSON Schemas v4, v6, v7, v2019-09 draft and and v2020-12(partial) using the NetworkNT JSON Schema library
18+
against JSON Schemas v4, v6, v7, v2019-09 draft and v2020-12(partial) using the NetworkNT JSON Schema library
1919
(https://github.com/networknt/json-schema-validator).
2020

2121
Maven users will need to add the following dependency to their `pom.xml`
@@ -59,7 +59,7 @@ include::partial$component-endpoint-options.adoc[]
5959

6060
== Example
6161

62-
Assuming we have the following JSON Schema
62+
Assuming we have the following JSON Schema:
6363

6464
*myschema.json*
6565

@@ -101,7 +101,7 @@ Assuming we have the following JSON Schema
101101
}
102102
----
103103

104-
we can validate incoming JSON with the following Camel route, where `myschema.json` is loaded from the classpath.
104+
We can validate incoming JSON with the following Camel route, where `myschema.json` is loaded from the classpath.
105105

106106
[source,java]
107107
----
@@ -112,7 +112,7 @@ from("direct:start")
112112

113113
If you use the default schema loader, it will try to determine the schema version from the $schema property and instruct the https://github.com/networknt[validator] appropriately. If it can't find (or doesn't recognize) the $schema property, it will assume your schema is version https://json-schema.org/specification-links.html#draft-2019-09-formerly-known-as-draft-8[2019-09].
114114

115-
If your schema is local to your application (e.g. a classpath location as opposed to URL), your schema can also contain $ref links to a relative subschema in the classpath. Per the JSON schema spec, your schema must not have an $id identifier property for this to work properly. See the https://github.com/apache/camel/blob/main/components/camel-json-validator/src/test/java/org/apache/camel/component/jsonvalidator/LocalRefSchemaTest.java[unit test] and https://github.com/apache/camel/blob/main/components/camel-json-validator/src/test/resources/org/apache/camel/component/jsonvalidator/Order.json[schema] for an example.
115+
If your schema is local to your application (e.g. a classpath location as opposed to URL), your schema can also contain `$ref` links to a relative subschema in the classpath. Per the JSON schema spec, your schema must not have an $id identifier property for this to work properly. See the https://github.com/apache/camel/blob/main/components/camel-json-validator/src/test/java/org/apache/camel/component/jsonvalidator/LocalRefSchemaTest.java[unit test] and https://github.com/apache/camel/blob/main/components/camel-json-validator/src/test/resources/org/apache/camel/component/jsonvalidator/Order.json[schema] for an example.
116116

117117

118118
include::spring-boot:partial$starter.adoc[]

0 commit comments

Comments
 (0)