smithy-go
smithy-go copied to clipboard
Examples or documentation would be appreciated
Hello!
I'm interested in using smithy-go. Some examples or documentation would be very much appreciated. Thanks :)
I'm in the same boat!
I've since figured out a few basics: you can build and install the plugin yourself by:
make smithy-publish-local
This should create a package located at:
"$HOME/.m2/repository/software/amazon/smithy/go/smithy-go-codegen/0.1.0/smithy-go-codegen-0.1.0.pom
You then need to configure smith-build.json to output go:
"go-codegen": {
"service": "my.service#MyService",
"module": "github.com/my/module"
},
Lastly you need to add a dependency in the build.gradle.kts:
dependencies {
...
implementation("software.amazon.smithy.go:smithy-go-codegen:0.1.0")
}
I also added it as a buildscript dependency though I'm not really sure how gradle works or what i'm doing.
Does anyone here have examples of usage of generated API client code? I'm trying to use it now, but not sure how to configure the address of the API server.
Does anyone here have examples of usage of generated API client code? I'm trying to use it now, but not sure how to configure the address of the API server.
I'm glad its not just me I thought I was going crazy. Any sort of real basic quick start would be super helpful.
You then need to configure smith-build.json to output go:
"go-codegen": { "service": "my.service#MyService", "module": "github.com/my/module" },
I'd like to note that this should be nested under plugins
:
"plugins": {
"go-codegen": {
"service": "my.service#MyService",
"module": "github.com/my/module"
}
}
On its own smithy-go isn't usable its in current state - we need to at the very least move the protocol generators out of the SDK into this project (#458). I've updated the README to reflect this.