11apply plugin : " java"
22ext {
33 javaMainClass = ' org.brapi.schematools.cli.BrAPICommand'
4- brapiSchemaToolsVersion = ' 0.20.0-SNAPSHOT'
5- brapiVersion = ' v2_1'
4+ brapiSchemaToolsVersion = ' 0.30.0-SNAPSHOT'
65}
76
87repositories {
@@ -29,7 +28,7 @@ tasks.register("generateGraphQL", JavaExec) {
2928 classpath = sourceSets. main. runtimeClasspath
3029 mainClass = javaMainClass
3130 workingDir = ' ../'
32- def filename = " Specification/Generated/brapi_ " + brapiVersion + " .graphqls"
31+ def filename = " Specification/Generated/brapi_generated .graphqls"
3332 args = [' generate' ,
3433 ' Specification/BrAPI-Schema' ,
3534 ' -l' , ' GRAPHQL' ,
@@ -43,21 +42,38 @@ tasks.register("generateOpenAPI", JavaExec) {
4342 classpath = sourceSets. main. runtimeClasspath
4443 mainClass = javaMainClass
4544 workingDir = ' ../'
46- def filename = " Specification/Generated/brapi_ " + brapiVersion + " .json"
45+ def filename = " Specification/Generated/brapi_generated .json"
4746 args = [' generate' , ' Specification/BrAPI-Schema' ,
4847 ' -l' , ' OPEN_API' ,
4948 ' -f' , filename,
5049 ' -c' , ' Specification/OpenAPI-Components' ,
5150 ' -x' ]
5251}
5352
53+ tasks. register(" compareOpenAPI" , JavaExec ) {
54+ group = ' BrAPI'
55+ description = ' Compares the generated OpenAPI schema with the compiled version'
56+ classpath = sourceSets. main. runtimeClasspath
57+ mainClass = javaMainClass
58+ workingDir = ' ../'
59+ def filename1 = " Specification/Generated/brapi_compiled.json"
60+ def filename2 = " Specification/Generated/brapi_generated.json"
61+ def filename = " Specification/Generated/brapi_comparison.md"
62+ args = [' compare' , filename1, filename2,
63+ ' -l' , ' OPEN_API' ,
64+ ' -w' , ' MARKDOWN' ,
65+ ' -f' , filename,
66+ ' -x' ,
67+ ' -s' ]
68+ }
69+
5470tasks. register(" generateOWL" , JavaExec ) {
5571 group = ' BrAPI'
5672 description = ' Generate OWL schema from the Json Schema'
5773 classpath = sourceSets. main. runtimeClasspath
5874 mainClass = javaMainClass
5975 workingDir = ' ../'
60- def filename = " Specification/Generated/brapi_ " + brapiVersion + " .ttl"
76+ def filename = " Specification/Generated/brapi_generated .ttl"
6177 args = [' generate' , ' Specification/BrAPI-Schema' ,
6278 ' -l' , ' OWL' ,
6379 ' -f' , filename,
0 commit comments