From edf9c19b2c6ce92518eca5c789b92d68f1cdc54f Mon Sep 17 00:00:00 2001 From: Olivier Melois Date: Thu, 19 May 2022 15:14:06 +0200 Subject: [PATCH] Remove the inference of fs paths from strings --- .../codegen-plugin/src/smithy4s/codegen/CodegenPlugin.scala | 4 ++-- modules/codegen/src/smithy4s/codegen/Codegen.scala | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/modules/codegen-plugin/src/smithy4s/codegen/CodegenPlugin.scala b/modules/codegen-plugin/src/smithy4s/codegen/CodegenPlugin.scala index e27f4b2a5..905871972 100644 --- a/modules/codegen-plugin/src/smithy4s/codegen/CodegenPlugin.scala +++ b/modules/codegen-plugin/src/smithy4s/codegen/CodegenPlugin.scala @@ -133,8 +133,8 @@ object Smithy4sCodegenPlugin extends AutoPlugin { * to decide whether or not Codegen should run. */ def cachedSmithyCodegen(conf: Configuration) = Def.task { - val outputPath = (conf / smithy4sOutputDir).value.getAbsolutePath() - val openApiOutputPath = (conf / smithy4sOpenapiDir).value.getAbsolutePath() + val outputPath = (conf / smithy4sOutputDir).value + val openApiOutputPath = (conf / smithy4sOpenapiDir).value val allowedNamespaces = (conf / smithy4sAllowedNamespaces).?.value.map(_.toSet) val excludedNamespaces = diff --git a/modules/codegen/src/smithy4s/codegen/Codegen.scala b/modules/codegen/src/smithy4s/codegen/Codegen.scala index 558f8cd14..ee29305e2 100644 --- a/modules/codegen/src/smithy4s/codegen/Codegen.scala +++ b/modules/codegen/src/smithy4s/codegen/Codegen.scala @@ -96,7 +96,8 @@ object Codegen { self => Renderer(amended) } .map { result => - val relPath = os.RelPath(result.namespace.replace('.', '/')) + val relPath = + os.RelPath(result.namespace.split('.').toIndexedSeq, ups = 0) (relPath, result.name, result.content) } }