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
This commit is contained in:
Pavel Gorgulov 2026-04-13 14:15:00 +02:00 • committed by GitHub
commit 1d02ae8a7f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -7,62 +7,6 @@ plugins {
id("mcp.publishing")
id("mcp.dokka")
alias(libs.plugins.kotlinx.binary.compatibility.validator)
alias(libs.plugins.openapi.generator)
}
/*
tasks.withType<KotlinCompilationTask<*>>().configureEach {
dependsOn(tasks.openApiGenerate)
}
tasks.named("runKtlintCheckOverCommonMainSourceSet") {
dependsOn(tasks.openApiGenerate)
}
// Also ensure it runs before other relevant tasks
tasks.withType<DokkaGenerateTask>().configureEach {
dependsOn(tasks.openApiGenerate)
}
tasks.withType<Task>().configureEach {
if (name.lowercase().contains("sourcesjar")) {
dependsOn(tasks.openApiGenerate)
}
}
*/
openApiGenerate {
val schemaVersion = "2025-03-26" // or "2025-06-18" or "draft"
val schemaUrl =
// "https://raw.githubusercontent.com/modelcontextprotocol/modelcontextprotocol/refs/heads/main/schema/$schemaVersion/schema.json"
"https://raw.githubusercontent.com/modelcontextprotocol/modelcontextprotocol/refs/tags/$schemaVersion/schema/$schemaVersion/schema.json"
generatorName = "kotlin"
remoteInputSpec = schemaUrl
outputDir = layout.buildDirectory.dir("generated-sources/openapi").get().asFile.absolutePath
packageName = "io.modelcontextprotocol.kotlin.sdk.models"
modelPackage = "io.modelcontextprotocol.kotlin.sdk.models"
apiPackage = "io.modelcontextprotocol.kotlin.sdk.api"
generateModelTests = false
generateModelDocumentation = false
cleanupOutput = false
skipValidateSpec = true // do not validate spec
library.set("multiplatform")
ignoreFileOverride.set("${layout.projectDirectory}/.openapi-generator-ignore")
globalProperties.set(
mapOf(
"supportingFiles" to "",
"models" to "", // or generate all models
),
)
configOptions.set(
mapOf(
"omitGradleWrapper" to "true",
"enumPropertyNaming" to "UPPERCASE",
"dateLibrary" to "kotlinx-datetime",
"explicitApi" to "true",
"modelMutable" to "false",
),
)
}
// Generation library versions