Skip to content

Commit 737186d

Browse files
committed
feat: use redocly to merge the specs
1 parent 4a8122b commit 737186d

File tree

13 files changed

+3423
-23
lines changed

13 files changed

+3423
-23
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ build
66

77
/specifications/merged.yaml
88
/version.txt
9+
node_modules

build.gradle.kts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
1+
2+
13
plugins {
24
base
35
alias(libs.plugins.kotlin.jvm) apply false
46
alias(libs.plugins.kotlin.serialization) apply false
57
alias(libs.plugins.gitVersion)
8+
//alias(libs.plugins.node)
69
`maven-publish`
710
}
811

client-ts/build.gradle.kts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ plugins {
99
alias(libs.plugins.node)
1010
}
1111

12-
val packageOutputDir = layout.buildDirectory.dir("packages") // Output for .tgz files
13-
1412
val publishAllClients by tasks.registering {
1513
group = "publishing"
1614
}
@@ -28,16 +26,16 @@ fun registerNpmPackageTasks(
2826
val publicationFile = clientBuildDir.map { it.file("modelix-${npmPackageName}-${project.version}.tgz") }
2927

3028
val generatorTask = tasks.register("generateTypescript$clientType", GenerateTask::class) {
29+
dependsOn(":redocly:npm_run_join")
3130
group = "openapi tools"
32-
inputSpecRootDirectory = rootProject.layout.projectDirectory.dir("specifications").asFile.absolutePath
33-
inputSpecRootDirectorySkipMerge = false
31+
inputSpec = project(":redocly").layout.buildDirectory.file("joined.yaml").get().asFile.absolutePath
3432
configOptions = mapOf(
3533
"npmRepository" to "https://artifacts.itemis.cloud/repository/npm-open/",
3634
"npmVersion" to project.version.toString(),
3735
"npmName" to "@modelix/$npmPackageName",
3836
)
3937
gitUserId = "modelix"
40-
gitRepoId = "modelix.api-specifications"
38+
gitRepoId = "modelix.openapi"
4139
generatorName = openApiGeneratorName
4240
outputDir = layout.buildDirectory.dir("generate/$openApiGeneratorName").get().asFile.absolutePath
4341
}

redocly/build.gradle.kts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
plugins {
2+
base
3+
alias(libs.plugins.node)
4+
}
5+
6+
tasks.named("npm_run_join") {
7+
dependsOn("npm_run_bundle")
8+
}

0 commit comments

Comments
 (0)