$version: "2"
namespace test
service Service {
version: "1"
operations: [HelloWorld]
}
operation HelloWorld {
input: Other
}
@input
structure Other {
@required
value: String
}
But it will crash the lsp because it fails while collecting locations. This happens because the input structure test#Other is not suffixed by Input. The code here assumes it is and does some string manipulation that is wrong.
I think the original code is written with this assumption because inlined input/output shape will be annotated with @intput/@output, respectively, while also being suffixed. But this is not a hard requirement. The model above is valid and while it emits a warning because Other does not start with HelloWorld, it is still valid.
As far as I can tell, this is a valid model:
But it will crash the lsp because it fails while collecting locations. This happens because the input structure
test#Other
is not suffixed byInput
. The code here assumes it is and does some string manipulation that is wrong.I think the original code is written with this assumption because inlined input/output shape will be annotated with
@intput
/@output
, respectively, while also being suffixed. But this is not a hard requirement. The model above is valid and while it emits a warning becauseOther
does not start withHelloWorld
, it is still valid.