@@ -7,34 +7,20 @@ An annotation processor converting JSON schemas to java records.
7
7
8
8
# Quick start
9
9
10
- 1 . Import the BOM:
11
- ``` xml
12
- <dependencyManagement >
13
- <dependencies >
14
- <!-- ... -->
15
- <dependency >
16
- <groupId >com.cosium.json_schema_to_java_record</groupId >
17
- <artifactId >json-schema-to-java-record-bom</artifactId >
18
- <version >${json-schema-to-java-record.version}</version >
19
- <scope >import</scope >
20
- <type >pom</type >
21
- </dependency >
22
- <!-- ... -->
23
- </dependencies >
24
- </dependencyManagement >
25
- ```
26
- 2 . Import the API:
10
+ 1 . Import the API:
27
11
``` xml
28
12
<dependencies >
29
13
<!-- ... -->
30
14
<dependency >
31
15
<groupId >com.cosium.json_schema_to_java_record</groupId >
32
16
<artifactId >json-schema-to-java-record-api</artifactId >
17
+ <version >${json-schema-to-java-record.version}</version >
18
+ <scope >provided</scope >
33
19
</dependency >
34
20
<!-- ... -->
35
21
</dependencies >
36
22
```
37
- 3 . Import the annotation processor:
23
+ 2 . Import the annotation processor:
38
24
``` xml
39
25
<plugin >
40
26
<groupId >org.apache.maven.plugins</groupId >
@@ -44,17 +30,18 @@ An annotation processor converting JSON schemas to java records.
44
30
<path >
45
31
<groupId >com.cosium.json_schema_to_java_record</groupId >
46
32
<artifactId >json-schema-to-java-record</artifactId >
33
+ <version >${json-schema-to-java-record.version}</version >
47
34
</path >
48
35
</annotationProcessorPaths >
49
36
</configuration >
50
37
</plugin >
51
38
```
52
- 4 . Add your JSON schema files to the class path:
39
+ 3 . Add your JSON schema files to the class path:
53
40
```
54
41
src/main/resources/com/aqme
55
42
└── foo.schema.json
56
43
```
57
- 5 . Annotate a ` package-info.java ` file like this:
44
+ 4 . Annotate a ` package-info.java ` file like this:
58
45
``` java
59
46
@GenerateRecordsFromJsonSchemas (
60
47
schemaRootFileLocations =
@@ -69,4 +56,4 @@ An annotation processor converting JSON schemas to java records.
69
56
import com.cosium.json_schema_to_java_record_api.JsonSchemaConfiguration ;
70
57
import com.cosium.json_schema_to_java_record_api.JsonSchemaFileLocation ;
71
58
```
72
- 6 . Compile to generate the java files
59
+ 5 . Compile to generate the java files
0 commit comments