gerlowskija commented on code in PR #2050:
URL: https://github.com/apache/solr/pull/2050#discussion_r1377537973


##########
solr/api/build.gradle:
##########
@@ -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")

Review Comment:
   > I strongly recommend to use the typescript or javascript generators
   
   👍  - 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.  I get the 
sense from your comments that's not necessarily the case though.  I've got some 
reading to do I think...)
   
   > Do we know whether the "typescript" generator is identical to the 
javascript generator plus types, or are they separate templates?
   
   I don't know, but it's something I can check on.  The default templates for 
each generator are in subdirectories 
[here](https://github.com/OpenAPITools/openapi-generator/tree/master/modules/openapi-generator/src/main/resources),
 so we'd just need to find the two relevant dirs and diff them.



##########
solr/api/build.gradle:
##########
@@ -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")

Review Comment:
   > I strongly recommend to use the typescript or javascript generators
   
   👍  - 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.  I get the 
sense from your comments that's not necessarily the case though.  I've got some 
reading to do I think...)
   
   > Do we know whether the "typescript" generator is identical to the 
javascript generator plus types, or are they separate templates?
   
   I don't know, but it's something I can check on.  The default templates for 
each generator are in subdirectories 
[here](https://github.com/OpenAPITools/openapi-generator/tree/master/modules/openapi-generator/src/main/resources),
 so we'd just need to find the two relevant dirs and diff them.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org
For additional commands, e-mail: issues-h...@solr.apache.org

Reply via email to