From 28c780bfa09212e564d0dccb5d4dcc91da25c86d Mon Sep 17 00:00:00 2001 From: Adam Nichols Date: Thu, 9 Mar 2023 12:05:52 -0500 Subject: [PATCH] WX-950 Set user agent in Java client (#7087) --- scripts/gen_java_client.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/gen_java_client.sh b/scripts/gen_java_client.sh index 59642098b1d..beeac43ed2f 100755 --- a/scripts/gen_java_client.sh +++ b/scripts/gen_java_client.sh @@ -5,6 +5,7 @@ BASE_PACKAGE="cromwell.client" ORIGINAL_API_YAML=engine/src/main/resources/swagger/cromwell.yaml API_YAML=codegen_java/cromwell.nofile.yaml OPENAPI_DOCKER="openapitools/openapi-generator-cli@sha256:ddd1b01cbe8f494c6612c548e91f983938164ab713a4d18d099a1fc4a77c651d" +CROMWELL_HASH=$(git rev-parse --short=7 HEAD) # Cromwell doesn't specify the OAuth configuration in its swagger, and # without it the client doesn't support authentication. @@ -42,6 +43,7 @@ docker run --rm -v ${PWD}:/local ${OPENAPI_DOCKER} generate \ -i /local/$API_YAML \ -g java \ -o /local/codegen_java \ + --http-user-agent "Cromwell-Java-Client/${CROMWELL_HASH}" \ --skip-validate-spec \ --api-package ${BASE_PACKAGE}.api \ --model-package ${BASE_PACKAGE}.model