smithy icon indicating copy to clipboard operation
smithy copied to clipboard

`CreateDedicatedInputAndOutput` leaves orphaned shapes in some cases

Open jdisanti opened this issue 3 years ago • 0 comments

Consider the following Smithy model:

        namespace test
        operation GenerateSpeech {
            output: GenerateSpeechOutput,
            input: GenerateSpeechOutput
        }

        structure GenerateSpeechOutput {
            data: BlobStream
        }

        @streaming
        blob BlobStream

The CreateDedicatedInputAndOutput model transformer (with suffixes “Input” and “Output”) will create GenerateSpeechInput and GenerateSpeechOperationOutput structures to replace the input/output on that operation. However, when it does so, it does NOT remove GenerateSpeechOutput from the model when it should because it gets confused into thinking it’s not a singular reference due to the original unmutated operation’s input referencing it. However, it is a singular reference because it replaced that input with GenerateSpeechInput.

jdisanti avatar Aug 29 '22 18:08 jdisanti