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
3 changed files with 0 additions and 87 deletions
|
|
@ -10,7 +10,6 @@ ktlint = "14.2.0"
|
|||
knit = "0.5.1"
|
||||
mavenPublish = "0.36.0"
|
||||
netty = "4.2.12.Final"
|
||||
openapi-generator = "7.21.0"
|
||||
|
||||
# libraries version
|
||||
awaitility = "4.3.0"
|
||||
|
|
@ -81,4 +80,3 @@ kotlinx-binary-compatibility-validator = { id = "org.jetbrains.kotlinx.binary-co
|
|||
kover = { id = "org.jetbrains.kotlinx.kover", version.ref = "kover" }
|
||||
ktlint = { id = "org.jlleitschuh.gradle.ktlint", version.ref = "ktlint" }
|
||||
knit = { id = "org.jetbrains.kotlinx.knit", version.ref = "knit" }
|
||||
openapi-generator = { id = "org.openapi.generator", version.ref = "openapi-generator" }
|
||||
|
|
|
|||
|
|
@ -1,29 +0,0 @@
|
|||
# OpenAPI Generator Ignore
|
||||
# Generated by openapi-generator https://github.com/openapitools/openapi-generator
|
||||
|
||||
# Use this file to prevent files from being overwritten by the generator.
|
||||
# The patterns follow closely to .gitignore or .dockerignore.
|
||||
|
||||
# As an example, the C# client generator defines ApiClient.cs.
|
||||
# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
|
||||
**/auth/**
|
||||
**/infrastructure/**
|
||||
!**/Base64ByteArray.kt
|
||||
!**/Bytes.kt
|
||||
|
||||
|
||||
## Exclude Models which are causing problems
|
||||
**/JSONRPCResponse.kt
|
||||
**/Result.kt
|
||||
**/ListToolsResult.kt
|
||||
**/InitializeRequest.kt
|
||||
**/InitializeResult.kt
|
||||
**/ServerCapabilities.kt
|
||||
**/InitializeRequestParams.kt
|
||||
**/CreateMessageRequest.kt
|
||||
**/CreateMessageRequestParams.kt
|
||||
**/ClientCapabilities.kt
|
||||
**/Tool.kt
|
||||
**/ToolInputSchema.kt
|
||||
**/ToolOutputSchema.kt
|
||||
|
||||
|
|
@ -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