-
Notifications
You must be signed in to change notification settings - Fork 674
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
Changes from 1 commit
699951e
bc9cb53
7bf20b2
5e403f3
a21fb6f
b55ab32
6327d38
68b3c78
ac24097
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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" | ||
} | ||
|
||
apply plugin: 'java-library' | ||
|
@@ -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-closure-angular") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @gerlowskija a few thoughts:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Given we want to dog-food our current Admin UI first, perhaps the pure There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
👍 - I chose 'javascript-closure-angular' somewhat arbitrarily. I knew in a vague sense that the Admin UI used Angular, and just went with that. But I like your point about vendor-neutrality. Will update this to use the 'javascript' generator. (I was under the impression that typescript was a distinct language from Javascript, and that the two weren't necessarily interchangeable. But I'm getting the sense from you guys above that there's more interplay there than I'd imagined. I've got some reading to do I think...)
I don't know, but it's something I can check on. The default templates for each generator are in subdirectories here, so we'd just need to find the two relevant dirs and diff them. |
||
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) | ||
} |
There was a problem hiding this comment.
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?