Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SOLR-17062: Create JS client for Admin UI use #2050

Merged
merged 9 commits into from
Nov 13, 2023
17 changes: 17 additions & 0 deletions solr/api/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

plugins {
id 'io.swagger.core.v3.swagger-gradle-plugin' version '2.2.2'
id "org.openapi.generator" version "6.0.1"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BTW, I looked and there is a 7.0.1 versin https://plugins.gradle.org/plugin/org.openapi.generator, maybe we have to update gradle?

}

apply plugin: 'java-library'
Expand Down Expand Up @@ -55,8 +56,24 @@ dependencies {
testImplementation 'org.apache.lucene:lucene-test-framework'
}

// Ensure the OAS is available to other modules who want to generate code (i.e. solrj)
artifacts {
openapiSpec resolve.outputDir, {
builtBy resolve
}
}

// Non-Java client generation tasks below:

task buildJSClient(type: org.openapitools.generator.gradle.plugin.tasks.GenerateTask) {
generatorName.set("javascript")
inputSpec.set("$openApiSpecFile")
outputDir.set("${buildDir}/generated/js")
packageName.set("solr")
generateApiTests.set(false)
generateModelTests.set(false)
}

tasks.withType(org.openapitools.generator.gradle.plugin.tasks.GenerateTask) {
dependsOn(resolve)
}
Loading