Skip to content

Commit

Permalink
fix: generate go client in a subdir (#208)
Browse files Browse the repository at this point in the history
* Generate go client in a subdir
This makes importing the client easier

* Make it unconfigurable
Let's make clients more opinionated
  • Loading branch information
julienduchesne authored Aug 7, 2024
1 parent 8a3024a commit 335e261
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion actions/generate-openapi-clients/generate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
set -euo pipefail

# Generate Go client (TODO: Add support for other languages)
GO_DIR="${OUTPUT_DIR}/go"
GO_DIR="${OUTPUT_DIR}/go/${PACKAGE_NAME}"
rm -rf "${GO_DIR}"
java -jar openapi-generator-cli.jar generate \
-i "${SPEC_PATH}" \
Expand All @@ -11,6 +11,7 @@ java -jar openapi-generator-cli.jar generate \
--git-user-id "grafana" \
--git-repo-id "${REPO_NAME}/go" \
--package-name "${PACKAGE_NAME}" \
-p isGoSubmodule=true \
-p disallowAdditionalPropertiesIfNotPresent=false \
-t "${GITHUB_ACTION_PATH}/templates/go"

Expand Down

0 comments on commit 335e261

Please sign in to comment.