From 01d678768aa037596d781dad2e090e65db5ea7bb Mon Sep 17 00:00:00 2001 From: Ruben Hoenle Date: Fri, 20 Feb 2026 15:24:59 +0100 Subject: [PATCH] chore(golang): move the existing generator to a compat-layer directory this will make place for the upcoming new generator relates to STACKITSDK-294 and STACKITSDK-297 --- .../golang/{ => compat-layer}/.openapi-generator-ignore | 0 .../golang/{ => compat-layer}/openapi-generator-config.yml | 2 +- languages/golang/{ => compat-layer}/regional-allowlist.txt | 0 .../golang/{ => compat-layer}/templates/README.mustache | 0 languages/golang/{ => compat-layer}/templates/api.mustache | 0 .../golang/{ => compat-layer}/templates/api_doc.mustache | 0 .../golang/{ => compat-layer}/templates/client.mustache | 0 .../{ => compat-layer}/templates/configuration.mustache | 0 .../custom/helper/array_json_example_value.mustache | 0 .../custom/helper/container_json_example_value.mustache | 0 .../templates/custom/model_oneof_test.mustache | 0 .../templates/custom/model_simple_test.mustache | 0 .../{ => compat-layer}/templates/custom/model_test.mustache | 0 .../{ => compat-layer}/templates/git_push.sh.mustache | 0 .../golang/{ => compat-layer}/templates/gitignore.mustache | 0 .../golang/{ => compat-layer}/templates/go.mod.mustache | 0 .../golang/{ => compat-layer}/templates/go.sum.mustache | 0 .../golang/{ => compat-layer}/templates/model.mustache | 0 .../{ => compat-layer}/templates/model_anyof.mustache | 0 .../golang/{ => compat-layer}/templates/model_doc.mustache | 0 .../golang/{ => compat-layer}/templates/model_enum.mustache | 0 .../{ => compat-layer}/templates/model_oneof.mustache | 0 .../{ => compat-layer}/templates/model_simple.mustache | 0 .../{ => compat-layer}/templates/nullable_model.mustache | 0 .../golang/{ => compat-layer}/templates/openapi.mustache | 0 .../{ => compat-layer}/templates/partial_header.mustache | 0 .../golang/{ => compat-layer}/templates/response.mustache | 0 .../golang/{ => compat-layer}/templates/signing.mustache | 0 .../golang/{ => compat-layer}/templates/utils.mustache | 0 scripts/generate-sdk/languages/go.sh | 6 +++--- 30 files changed, 4 insertions(+), 4 deletions(-) rename languages/golang/{ => compat-layer}/.openapi-generator-ignore (100%) rename languages/golang/{ => compat-layer}/openapi-generator-config.yml (84%) rename languages/golang/{ => compat-layer}/regional-allowlist.txt (100%) rename languages/golang/{ => compat-layer}/templates/README.mustache (100%) rename languages/golang/{ => compat-layer}/templates/api.mustache (100%) rename languages/golang/{ => compat-layer}/templates/api_doc.mustache (100%) rename languages/golang/{ => compat-layer}/templates/client.mustache (100%) rename languages/golang/{ => compat-layer}/templates/configuration.mustache (100%) rename languages/golang/{ => compat-layer}/templates/custom/helper/array_json_example_value.mustache (100%) rename languages/golang/{ => compat-layer}/templates/custom/helper/container_json_example_value.mustache (100%) rename languages/golang/{ => compat-layer}/templates/custom/model_oneof_test.mustache (100%) rename languages/golang/{ => compat-layer}/templates/custom/model_simple_test.mustache (100%) rename languages/golang/{ => compat-layer}/templates/custom/model_test.mustache (100%) rename languages/golang/{ => compat-layer}/templates/git_push.sh.mustache (100%) rename languages/golang/{ => compat-layer}/templates/gitignore.mustache (100%) rename languages/golang/{ => compat-layer}/templates/go.mod.mustache (100%) rename languages/golang/{ => compat-layer}/templates/go.sum.mustache (100%) rename languages/golang/{ => compat-layer}/templates/model.mustache (100%) rename languages/golang/{ => compat-layer}/templates/model_anyof.mustache (100%) rename languages/golang/{ => compat-layer}/templates/model_doc.mustache (100%) rename languages/golang/{ => compat-layer}/templates/model_enum.mustache (100%) rename languages/golang/{ => compat-layer}/templates/model_oneof.mustache (100%) rename languages/golang/{ => compat-layer}/templates/model_simple.mustache (100%) rename languages/golang/{ => compat-layer}/templates/nullable_model.mustache (100%) rename languages/golang/{ => compat-layer}/templates/openapi.mustache (100%) rename languages/golang/{ => compat-layer}/templates/partial_header.mustache (100%) rename languages/golang/{ => compat-layer}/templates/response.mustache (100%) rename languages/golang/{ => compat-layer}/templates/signing.mustache (100%) rename languages/golang/{ => compat-layer}/templates/utils.mustache (100%) diff --git a/languages/golang/.openapi-generator-ignore b/languages/golang/compat-layer/.openapi-generator-ignore similarity index 100% rename from languages/golang/.openapi-generator-ignore rename to languages/golang/compat-layer/.openapi-generator-ignore diff --git a/languages/golang/openapi-generator-config.yml b/languages/golang/compat-layer/openapi-generator-config.yml similarity index 84% rename from languages/golang/openapi-generator-config.yml rename to languages/golang/compat-layer/openapi-generator-config.yml index 75c3c8b..1942baa 100644 --- a/languages/golang/openapi-generator-config.yml +++ b/languages/golang/compat-layer/openapi-generator-config.yml @@ -1,5 +1,5 @@ useOneOfDiscriminatorLookup: true -templateDir: languages/golang/templates +templateDir: languages/golang/compat-layer/templates files: custom/model_test.mustache: # TODO: this should be 'ModelTests' instead of 'Model' diff --git a/languages/golang/regional-allowlist.txt b/languages/golang/compat-layer/regional-allowlist.txt similarity index 100% rename from languages/golang/regional-allowlist.txt rename to languages/golang/compat-layer/regional-allowlist.txt diff --git a/languages/golang/templates/README.mustache b/languages/golang/compat-layer/templates/README.mustache similarity index 100% rename from languages/golang/templates/README.mustache rename to languages/golang/compat-layer/templates/README.mustache diff --git a/languages/golang/templates/api.mustache b/languages/golang/compat-layer/templates/api.mustache similarity index 100% rename from languages/golang/templates/api.mustache rename to languages/golang/compat-layer/templates/api.mustache diff --git a/languages/golang/templates/api_doc.mustache b/languages/golang/compat-layer/templates/api_doc.mustache similarity index 100% rename from languages/golang/templates/api_doc.mustache rename to languages/golang/compat-layer/templates/api_doc.mustache diff --git a/languages/golang/templates/client.mustache b/languages/golang/compat-layer/templates/client.mustache similarity index 100% rename from languages/golang/templates/client.mustache rename to languages/golang/compat-layer/templates/client.mustache diff --git a/languages/golang/templates/configuration.mustache b/languages/golang/compat-layer/templates/configuration.mustache similarity index 100% rename from languages/golang/templates/configuration.mustache rename to languages/golang/compat-layer/templates/configuration.mustache diff --git a/languages/golang/templates/custom/helper/array_json_example_value.mustache b/languages/golang/compat-layer/templates/custom/helper/array_json_example_value.mustache similarity index 100% rename from languages/golang/templates/custom/helper/array_json_example_value.mustache rename to languages/golang/compat-layer/templates/custom/helper/array_json_example_value.mustache diff --git a/languages/golang/templates/custom/helper/container_json_example_value.mustache b/languages/golang/compat-layer/templates/custom/helper/container_json_example_value.mustache similarity index 100% rename from languages/golang/templates/custom/helper/container_json_example_value.mustache rename to languages/golang/compat-layer/templates/custom/helper/container_json_example_value.mustache diff --git a/languages/golang/templates/custom/model_oneof_test.mustache b/languages/golang/compat-layer/templates/custom/model_oneof_test.mustache similarity index 100% rename from languages/golang/templates/custom/model_oneof_test.mustache rename to languages/golang/compat-layer/templates/custom/model_oneof_test.mustache diff --git a/languages/golang/templates/custom/model_simple_test.mustache b/languages/golang/compat-layer/templates/custom/model_simple_test.mustache similarity index 100% rename from languages/golang/templates/custom/model_simple_test.mustache rename to languages/golang/compat-layer/templates/custom/model_simple_test.mustache diff --git a/languages/golang/templates/custom/model_test.mustache b/languages/golang/compat-layer/templates/custom/model_test.mustache similarity index 100% rename from languages/golang/templates/custom/model_test.mustache rename to languages/golang/compat-layer/templates/custom/model_test.mustache diff --git a/languages/golang/templates/git_push.sh.mustache b/languages/golang/compat-layer/templates/git_push.sh.mustache similarity index 100% rename from languages/golang/templates/git_push.sh.mustache rename to languages/golang/compat-layer/templates/git_push.sh.mustache diff --git a/languages/golang/templates/gitignore.mustache b/languages/golang/compat-layer/templates/gitignore.mustache similarity index 100% rename from languages/golang/templates/gitignore.mustache rename to languages/golang/compat-layer/templates/gitignore.mustache diff --git a/languages/golang/templates/go.mod.mustache b/languages/golang/compat-layer/templates/go.mod.mustache similarity index 100% rename from languages/golang/templates/go.mod.mustache rename to languages/golang/compat-layer/templates/go.mod.mustache diff --git a/languages/golang/templates/go.sum.mustache b/languages/golang/compat-layer/templates/go.sum.mustache similarity index 100% rename from languages/golang/templates/go.sum.mustache rename to languages/golang/compat-layer/templates/go.sum.mustache diff --git a/languages/golang/templates/model.mustache b/languages/golang/compat-layer/templates/model.mustache similarity index 100% rename from languages/golang/templates/model.mustache rename to languages/golang/compat-layer/templates/model.mustache diff --git a/languages/golang/templates/model_anyof.mustache b/languages/golang/compat-layer/templates/model_anyof.mustache similarity index 100% rename from languages/golang/templates/model_anyof.mustache rename to languages/golang/compat-layer/templates/model_anyof.mustache diff --git a/languages/golang/templates/model_doc.mustache b/languages/golang/compat-layer/templates/model_doc.mustache similarity index 100% rename from languages/golang/templates/model_doc.mustache rename to languages/golang/compat-layer/templates/model_doc.mustache diff --git a/languages/golang/templates/model_enum.mustache b/languages/golang/compat-layer/templates/model_enum.mustache similarity index 100% rename from languages/golang/templates/model_enum.mustache rename to languages/golang/compat-layer/templates/model_enum.mustache diff --git a/languages/golang/templates/model_oneof.mustache b/languages/golang/compat-layer/templates/model_oneof.mustache similarity index 100% rename from languages/golang/templates/model_oneof.mustache rename to languages/golang/compat-layer/templates/model_oneof.mustache diff --git a/languages/golang/templates/model_simple.mustache b/languages/golang/compat-layer/templates/model_simple.mustache similarity index 100% rename from languages/golang/templates/model_simple.mustache rename to languages/golang/compat-layer/templates/model_simple.mustache diff --git a/languages/golang/templates/nullable_model.mustache b/languages/golang/compat-layer/templates/nullable_model.mustache similarity index 100% rename from languages/golang/templates/nullable_model.mustache rename to languages/golang/compat-layer/templates/nullable_model.mustache diff --git a/languages/golang/templates/openapi.mustache b/languages/golang/compat-layer/templates/openapi.mustache similarity index 100% rename from languages/golang/templates/openapi.mustache rename to languages/golang/compat-layer/templates/openapi.mustache diff --git a/languages/golang/templates/partial_header.mustache b/languages/golang/compat-layer/templates/partial_header.mustache similarity index 100% rename from languages/golang/templates/partial_header.mustache rename to languages/golang/compat-layer/templates/partial_header.mustache diff --git a/languages/golang/templates/response.mustache b/languages/golang/compat-layer/templates/response.mustache similarity index 100% rename from languages/golang/templates/response.mustache rename to languages/golang/compat-layer/templates/response.mustache diff --git a/languages/golang/templates/signing.mustache b/languages/golang/compat-layer/templates/signing.mustache similarity index 100% rename from languages/golang/templates/signing.mustache rename to languages/golang/compat-layer/templates/signing.mustache diff --git a/languages/golang/templates/utils.mustache b/languages/golang/compat-layer/templates/utils.mustache similarity index 100% rename from languages/golang/templates/utils.mustache rename to languages/golang/compat-layer/templates/utils.mustache diff --git a/scripts/generate-sdk/languages/go.sh b/scripts/generate-sdk/languages/go.sh index 31df841..5d5350c 100644 --- a/scripts/generate-sdk/languages/go.sh +++ b/scripts/generate-sdk/languages/go.sh @@ -143,9 +143,9 @@ generate_go_sdk() { GO_POST_PROCESS_FILE="gofmt -w" \ mkdir -p "${SERVICES_FOLDER}/${service}/" - cp "${ROOT_DIR}/languages/golang/.openapi-generator-ignore" "${SERVICES_FOLDER}/${service}/.openapi-generator-ignore" + cp "${ROOT_DIR}/languages/golang/compat-layer/.openapi-generator-ignore" "${SERVICES_FOLDER}/${service}/.openapi-generator-ignore" regional_api= - if grep -E "^$service$" ${ROOT_DIR}/languages/golang/regional-allowlist.txt; then + if grep -E "^$service$" ${ROOT_DIR}/languages/golang/compat-layer/regional-allowlist.txt; then echo "Generating new regional api" regional_api="regional_api" fi @@ -164,7 +164,7 @@ generate_go_sdk() { --additional-properties=isGoSubmodule=true,enumClassPrefix=true,generateInterfaces=true,$regional_api \ --http-user-agent "stackit-sdk-go/${service}" \ --reserved-words-mappings type=types \ - --config "${ROOT_DIR}/languages/golang/openapi-generator-config.yml" + --config "${ROOT_DIR}/languages/golang/compat-layer/openapi-generator-config.yml" # Remove unnecessary files rm "${SERVICES_FOLDER}/${service}/.openapi-generator-ignore"