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"