mirror of https://github.com/apache/kafka.git
KAFKA-14198: Define separate configuration for Swagger (#12616)
Reviewers: Ismael Juma <ismael@juma.me.uk>
This commit is contained in:
parent
47252f431e
commit
e43e59fce1
12
build.gradle
12
build.gradle
|
@ -2535,6 +2535,10 @@ project(':connect:json') {
|
||||||
}
|
}
|
||||||
|
|
||||||
project(':connect:runtime') {
|
project(':connect:runtime') {
|
||||||
|
configurations {
|
||||||
|
swagger
|
||||||
|
}
|
||||||
|
|
||||||
archivesBaseName = "connect-runtime"
|
archivesBaseName = "connect-runtime"
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
|
@ -2564,7 +2568,9 @@ project(':connect:runtime') {
|
||||||
implementation libs.mavenArtifact
|
implementation libs.mavenArtifact
|
||||||
implementation libs.swaggerAnnotations
|
implementation libs.swaggerAnnotations
|
||||||
|
|
||||||
compileOnly libs.swaggerJaxrs2
|
// We use this library to generate OpenAPI docs for the REST API, but we don't want or need it at compile
|
||||||
|
// or run time. So, we add it to a separate configuration, which we use later on during docs generation
|
||||||
|
swagger libs.swaggerJaxrs2
|
||||||
|
|
||||||
testImplementation project(':clients').sourceSets.test.output
|
testImplementation project(':clients').sourceSets.test.output
|
||||||
testImplementation project(':core')
|
testImplementation project(':core')
|
||||||
|
@ -2653,9 +2659,9 @@ project(':connect:runtime') {
|
||||||
}
|
}
|
||||||
|
|
||||||
task genConnectOpenAPIDocs(type: io.swagger.v3.plugins.gradle.tasks.ResolveTask, dependsOn: setVersionInOpenAPISpec) {
|
task genConnectOpenAPIDocs(type: io.swagger.v3.plugins.gradle.tasks.ResolveTask, dependsOn: setVersionInOpenAPISpec) {
|
||||||
classpath = sourceSets.main.compileClasspath + sourceSets.main.runtimeClasspath
|
classpath = sourceSets.main.runtimeClasspath
|
||||||
|
|
||||||
buildClasspath = classpath
|
buildClasspath = classpath + configurations.swagger.asCollection()
|
||||||
outputFileName = 'connect_rest'
|
outputFileName = 'connect_rest'
|
||||||
outputFormat = 'YAML'
|
outputFormat = 'YAML'
|
||||||
prettyPrint = 'TRUE'
|
prettyPrint = 'TRUE'
|
||||||
|
|
Loading…
Reference in New Issue