A dynamic response at root #542
-
I'm trying to wrap an API, which looks something like this;
The response, looks something along these lines
I gotta say, that this doesn't look like the way I would choose to model something, but here we are... currently, I think that this is not modelable in smithy - the return type is a
To my eye, but the map is at the root of the document. I don't think smithy allows that? As I don't know the field names... I'm stumped... is there a trick to get around this, or is it fairly fundamental? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Give me a minute to test my hopethises but I think you can! |
Beta Was this translation helpful? Give feedback.
-
You can do something like that: structure GreetingOutput {
@required
@httpPayload
payload: ReverseLookupMap
}
map ReverseLookupMap {
key: String,
value: Something
}
list Something {
member: String
} Where |
Beta Was this translation helpful? Give feedback.
You can do something like that:
Where
GreetingOutput
is the output of your operation