Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Examples or documentation would be appreciated #305

Closed
jabalsad opened this issue Jun 4, 2021 · 6 comments
Closed

Examples or documentation would be appreciated #305

jabalsad opened this issue Jun 4, 2021 · 6 comments
Labels
documentation This is a problem with documentation.

Comments

@jabalsad
Copy link

jabalsad commented Jun 4, 2021

Hello!

I'm interested in using smithy-go. Some examples or documentation would be very much appreciated. Thanks :)

@aknuds1
Copy link
Contributor

aknuds1 commented Jun 28, 2021

I'm in the same boat!

@jabalsad
Copy link
Author

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.

@aknuds1
Copy link
Contributor

aknuds1 commented Jul 1, 2021

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.

@jasdel jasdel added the documentation This is a problem with documentation. label Jul 29, 2021
@awlsring
Copy link

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.

@FuzzyStatic
Copy link

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"
    }
}

@lucix-aws
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation This is a problem with documentation.
Projects
None yet
Development

No branches or pull requests

6 participants