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:
parent
c18a488785
commit
1d02ae8a7f
1 changed files with 0 additions and 87 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue