aws2openapi
aws2openapi copied to clipboard
AWS Lambda Blob format incorrect
The Blob
definition is defined here. A Blob
is used in a few locations, one of which is in a Code object here. According to the AWS API Reference doc, this should be encoded as "Base64-encoded binary data object." Swagger has support for Base64 encoded content by using the format: byte
property. The Blob
format
property is currently set to password
. I believe it should be set to byte
.
Paging @pimterry
Totally makes sense to me. The backing AWS data for this is here, and the conversion logic is over here.
Right now, it:
- Assumes blobs are all plain strings
- Assumes all fields marked as
sensitive
in the AWS SDK should be inpassword
format, so OpenAPI tools don't show the content
I think we should treat blob as a special case here, which is always in base64
format, and never marked as password
. They can indeed be sensitive (e.g. PrivateKeyBlob), but managing base64 data feels different to managing passwords - nobody is going to be looking over your shoulder and memorizing your entire base64 private key, and I can imagine that tools properly understanding the blob format could be very helpful.
It doesn't sound like this is an urgent problem for now, and I'm quite busy, so I'm not going to be able to fix this in the short term. Assuming @MikeRalphson agrees with the plan above though, it should be easy to put in a PR for the linked aws2openapi conversion logic to add that special case, and fix this.