Comments (4)
Thanks for reaching out @jabalsad. Currently the smithy-go
code generation is a basic smithy generator that does not yet have any protocol implementations. All protocol implementations are in the aws-sdk-go-v2
's smithy code generation. This is one of the main reasons the smithy-go
codegen has limited documentation is not published to maven central yet.
With that said, I think its reasonable to investigate moving the aws-sdk-go-v2
codegen implementation of awsRestJson1
to smithy-go
as a opinionated generic REST JSON smithy protocol implementation. This most likely will require extracting/decoupling AWS specific traits, behavior, and AWS codegen utilities from the awsRestJson1
protocol implementation. This would be the first step to investigate at how tightly the awsRestJson1
protocol implementation s coupled with the AWS code generators.
The AwsRestJson1.java is the implementation of this protocol in the v2 SDK's codegen, which is basically just RestJsonProtocolGenerator. The smithy-go
HttpBindingProtocolGenerator provides the bulk of the HTTP REST implementation with RestJsonProtocolGenerator
defining mostly the JSON serde, and middleware.
from smithy-go.
Actually, I think this problem might be core to the issue we're facing. Besides the VSCode editor complaining that it cannot resolve the restJson1
trait, we also realize that the generated go client contains no implementation for serializing, deserializing and building the request/response cycles.
We've tried to implement these ourselves, but with no luck due to poor documentation. Any advice on how to go about solving this problem? This is a blocker for us.
from smithy-go.
I managed to build the smithy-aws-go-codegen
and smithy-go-codegen
packages and then use them to generate client Go code for the simple weather demo model.
Unfortunately, the generated code has a few dependencies on internal packages of the AWS SDK package, e.g.
api_client.go: internalConfig "github.com/aws/aws-sdk-go-v2/internal/configsources"
internal/endpoints/endpoints.go: endpoints "github.com/aws/aws-sdk-go-v2/internal/endpoints/v2"
That makes the generated code pretty much unusable at the moment. On the other hand, it looks like maybe the effort required to generate code that's decoupled from the AWS SDK might not be that big?
from smithy-go.
This is true for every aws protocol right now, moving to #458.
from smithy-go.
Related Issues (20)
- codegen/runtime: Interceptors
- runtime: sigv4 signer
- runtime: sigv4a signer
- refactor: replace middleware with explicit operation phases
- codegen: remove "V2" suffix from endpoint resolution codegen
- codegen/runtime: @httpChecksum
- publish to maven
- runtime: refactor httpBearerAuth
- codegen: `RuntimeClientPlugin` not having access to a `SymbolProvider` HOT 1
- docs: revamp README and usage guide HOT 1
- Middleware, Transport (and maybe others) broken since aws-sdk-go-v2 release-2023-11-15 HOT 1
- codegen/runtime: operation checksums
- protocol: smithy.protocols#rpcv2Cbor HOT 1
- codegen/runtime: event streams
- Explore ways to reduce size of generated output HOT 3
- codegen: refactor waiters/paginators to be not integrations
- codegen: use DirectedCodegen in client codegen
- rename go-codegen plugin to go-client-codegen
- test: migrate auth scheme resolution tests to standalone, generated module
- enhancement: support range iterators in paginators
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from smithy-go.