Open
Description
If a structure member has a custom @JsonName
:
$version: "2.0"
namespace example.hello
operation Hello {
output: Greeting
}
structure Greeting {
@required
@jsonName("msg")
message: String
}
apply Hello @examples([
{
title: "My name is Jeff"
output: {
message: "Hello Jeff"
}
}
])
the generated swagger doc for the above service would ignore the @JsonName
and use message
instead of msg
:
I think this is wrong. Smithy docs mention useJsonName
which might be of relevance but I couldn't find a way of setting that in the interface provided by smithy4s.http4s.swagger.docs
.
Also note that in my example, I had to provide the output example as a smithy structure rather than a json. ie {message: "Hello Jeff"}
rather than msg
, which I'd argue, is a little counter intuitive for the reader. I understand this is perhaps one for smithy but do we know if it Would be possible to specify examples in json rather than smithy structures? 🤔
Metadata
Assignees
Labels
No labels