Skip to content

Commit 1d02ae8

Browse files
authored
chore(build): remove openapi generator (#683)
Remove unused OpenAPI Generator plugin, its configuration, and the `.openapi-generator-ignore` file. ## Breaking Changes none ## Types of changes - [ ] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to change) - [ ] Documentation update ## Checklist - [x] I have read the [MCP Documentation](https://modelcontextprotocol.io) - [x] My code follows the repository's style guidelines - [x] New and existing tests pass locally - [ ] I have added appropriate error handling - [ ] I have added or updated documentation as needed
1 parent c18a488 commit 1d02ae8

File tree

3 files changed

+0
-87
lines changed

3 files changed

+0
-87
lines changed

gradle/libs.versions.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ ktlint = "14.2.0"
1010
knit = "0.5.1"
1111
mavenPublish = "0.36.0"
1212
netty = "4.2.12.Final"
13-
openapi-generator = "7.21.0"
1413

1514
# libraries version
1615
awaitility = "4.3.0"
@@ -81,4 +80,3 @@ kotlinx-binary-compatibility-validator = { id = "org.jetbrains.kotlinx.binary-co
8180
kover = { id = "org.jetbrains.kotlinx.kover", version.ref = "kover" }
8281
ktlint = { id = "org.jlleitschuh.gradle.ktlint", version.ref = "ktlint" }
8382
knit = { id = "org.jetbrains.kotlinx.knit", version.ref = "knit" }
84-
openapi-generator = { id = "org.openapi.generator", version.ref = "openapi-generator" }

kotlin-sdk-core/.openapi-generator-ignore

Lines changed: 0 additions & 29 deletions
This file was deleted.

kotlin-sdk-core/build.gradle.kts

Lines changed: 0 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -7,62 +7,6 @@ plugins {
77
id("mcp.publishing")
88
id("mcp.dokka")
99
alias(libs.plugins.kotlinx.binary.compatibility.validator)
10-
alias(libs.plugins.openapi.generator)
11-
}
12-
13-
/*
14-
tasks.withType<KotlinCompilationTask<*>>().configureEach {
15-
dependsOn(tasks.openApiGenerate)
16-
}
17-
18-
tasks.named("runKtlintCheckOverCommonMainSourceSet") {
19-
dependsOn(tasks.openApiGenerate)
20-
}
21-
22-
// Also ensure it runs before other relevant tasks
23-
tasks.withType<DokkaGenerateTask>().configureEach {
24-
dependsOn(tasks.openApiGenerate)
25-
}
26-
27-
tasks.withType<Task>().configureEach {
28-
if (name.lowercase().contains("sourcesjar")) {
29-
dependsOn(tasks.openApiGenerate)
30-
}
31-
}
32-
*/
33-
34-
openApiGenerate {
35-
val schemaVersion = "2025-03-26" // or "2025-06-18" or "draft"
36-
val schemaUrl =
37-
// "https://raw.githubusercontent.com/modelcontextprotocol/modelcontextprotocol/refs/heads/main/schema/$schemaVersion/schema.json"
38-
"https://raw.githubusercontent.com/modelcontextprotocol/modelcontextprotocol/refs/tags/$schemaVersion/schema/$schemaVersion/schema.json"
39-
generatorName = "kotlin"
40-
remoteInputSpec = schemaUrl
41-
outputDir = layout.buildDirectory.dir("generated-sources/openapi").get().asFile.absolutePath
42-
packageName = "io.modelcontextprotocol.kotlin.sdk.models"
43-
modelPackage = "io.modelcontextprotocol.kotlin.sdk.models"
44-
apiPackage = "io.modelcontextprotocol.kotlin.sdk.api"
45-
generateModelTests = false
46-
generateModelDocumentation = false
47-
cleanupOutput = false
48-
skipValidateSpec = true // do not validate spec
49-
library.set("multiplatform")
50-
ignoreFileOverride.set("${layout.projectDirectory}/.openapi-generator-ignore")
51-
globalProperties.set(
52-
mapOf(
53-
"supportingFiles" to "",
54-
"models" to "", // or generate all models
55-
),
56-
)
57-
configOptions.set(
58-
mapOf(
59-
"omitGradleWrapper" to "true",
60-
"enumPropertyNaming" to "UPPERCASE",
61-
"dateLibrary" to "kotlinx-datetime",
62-
"explicitApi" to "true",
63-
"modelMutable" to "false",
64-
),
65-
)
6610
}
6711

6812
// Generation library versions

0 commit comments

Comments
 (0)