Skip to content

Commit

Permalink
Merge pull request #199 from disneystreaming/fix-imports
Browse files Browse the repository at this point in the history
Fix packed-imput imports logic
  • Loading branch information
Baccata authored Apr 22, 2022
2 parents f4bebaf + 8b8d07a commit 7ee2cbe
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions modules/codegen/src/smithy4s/codegen/Renderer.scala
Original file line number Diff line number Diff line change
Expand Up @@ -576,10 +576,11 @@ private[codegen] class Renderer(compilationUnit: CompilationUnit) { self =>

def methodName = uncapitalise(op.name)

val params = if(op.hints.contains(Hint.PackedInputs)) op.params.map(_.tpe) else Nil
val paramImports =
if (op.hints.contains(Hint.PackedInputs)) Nil else op.params.map(_.tpe)

def imports =
(op.input :: op.output :: params ++ op.errors)
(op.input :: op.output :: paramImports ++ op.errors)
.foldMap(_.imports)

def renderInput = op.input.render
Expand Down

0 comments on commit 7ee2cbe

Please sign in to comment.