smithy-lang / smithy

Smithy is a protocol-agnostic interface definition language and set of tools for generating clients, servers, and documentation for any programming language.
https://smithy.io
Apache License 2.0
1.79k stars 214 forks source link

Official AWS models? #1423

Closed pcolby closed 2 years ago

pcolby commented 2 years ago

Hi, not sure this is the right place to ask, can't see anywhere better 🤷🏻

If I understand correctly, this repo covers the Smithy project itself. And apart from some AWS-specific traits, etc, is not specific to AWS.

I also see that a number of AWS SDKs are built from AWS Smithy models, such as aws-sdk-go-v2 and aws-sdk-js-v3. But these projects copy the AWS Models into their own repos, resulting in lots of different versions of the Models floating around the awslabs repos - some versions are hours old, some months.

So, my question is: where is the canonical source for the current AWS Models, that I can track for my own open-source projects? I assume there's some internal AWS repo from which these SDKs get their updates - can that be made public? (if it's not already)

Thanks! 🙂

AndrewFossAWS commented 2 years ago

Unfortunately we do not share the models publicly.

However the models from aws-sdk-js-v3 get updated automatically and will always be up to date.

pcolby commented 2 years ago

Thanks @AndrewFossAWS, that is unfortunate, but I will use aws-sdk-js-v3 for now as suggested.

That said, aws-sdk-go-v2 and aws-sdk-js-v3 seem to both stay up to date far more than any of the others I've looked at. For interest, I normalised all of the model files in both (they use slightly different JSON formatting), and found only two small differences:

diff -br aws-sdk-go-v2/codegen/sdk-codegen/aws-models/iotsecuretunneling.json aws-sdk-js-v3/codegen/sdk-codegen/aws-models/iotsecuretunneling.json
241c241
<           "name": "IoTSecuredTunneling"
---
>           "name": "iotsecuredtunneling"
diff -br aws-sdk-go-v2/codegen/sdk-codegen/aws-models/mobile.json aws-sdk-js-v3/codegen/sdk-codegen/aws-models/mobile.json
73c73
<           "name": "AWSMobileHubService"
---
>           "name": "awsmobilehubservice"

This "name" is for the "aws.auth#sigv4" trait, which "SHOULD match the arnNamespace property" (and is required to be applied in lowercase for V4 signatures) so the JS SDK is "more" right than Go in this case (Go's doesn't match the arnNamespace), but both are valid, as long as Go is lowercasing in the V4 signature code. I'll mention it to the aws-sdk-go-v2 project, but it is only a SHOULD, not a MUST, in the Smithy spec.

Cheers.

AndrewFossAWS commented 2 years ago

Thanks for bringing this up. @pcolby

Just want to mention we do plan on creating a seperate repo specifically for AWS models in the future.

irad100 commented 10 months ago

Thanks for bringing this up. @pcolby

Just want to mention we do plan on creating a seperate repo specifically for AWS models in the future.

Is there an update about publishing AWS models?

will-rippling commented 1 month ago

@AndrewFossAWS any update on a separate repo for AWS smithy definitions?

cmoher commented 1 month ago

We have received a number of requests for a canonical source of Smithy models for AWS Services. In 2025, we plan to provide a public GitHub repo with Smithy models that are updated regularly. (I can't provide a more precise timeline at this time.)