Skip to content

Commit

Permalink
Clean openApiGenerate output dir before generating (#2502)
Browse files Browse the repository at this point in the history
This commit fixes a problem in the Solr build whereby files generated
from our OpenAPI spec could "leak" between branches and cause
compilation issues.

In short, generated SolrRequest implementations were not being
overwritten or cleaned up after switching branches.  This caused
compilation problems whenever the new branch didn't have other classes
(typically 'model' POJOs) that the generated file relied on.

This commit uses the openApiGenerate task's "cleanupOutput" option to
prevent this from happening.
  • Loading branch information
gerlowskija authored Jun 7, 2024
1 parent 2636567 commit 32418ee
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions solr/solrj/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ openApiGenerate {
generateModelTests = false
generateApiDocumentation = false
generateModelDocumentation = false
cleanupOutput = true
additionalProperties = ["modelPackage": "org.apache.solr.client.api.model"]
}

Expand Down

0 comments on commit 32418ee

Please sign in to comment.