aws2openapi
aws2openapi copied to clipboard
Unexpected "get" requests in generated openapi spec
The source spec for this doesn't have any mention of "GET" as far as I can tell, but the generated result has a "POST" and "GET" equivalent for every API call. I would expect just the "POST" version to show up because that's what's actually in the original definition.
It also causes some generation errors, which I think is because the generated code is trying to set query parameters from an object that it doesn't know how to turn into a string. For example:
error[E0599]: no method named `to_string` found for type `&models::tag::Tag` in the current scope
See https://github.com/APIs-guru/aws2openapi/pull/17
I think your issues with generated code are a separate issue though. I'm unsure why the type is not stringifiable from what you have posted.
Thanks for the link! That's interesting. I didn't know AWS explicitly supported both.
Maybe a basic question, but for compound types like a list of tags, how should they be serialized into parameters for a get request? The docs that the issue you linked to link to don't really mention that case.
Also, I do see the usage of toGet
mentioned in that issue here. Looks like maybe the sdk supports both, and uses get for presigned urls.