{"id":13770329,"url":"https://github.com/aws/smithy-go","last_synced_at":"2025-05-14T02:09:05.312Z","repository":{"id":38330802,"uuid":"238800969","full_name":"aws/smithy-go","owner":"aws","description":"Smithy code generators for Go (in development)","archived":false,"fork":false,"pushed_at":"2025-03-20T19:15:56.000Z","size":2423,"stargazers_count":199,"open_issues_count":29,"forks_count":55,"subscribers_count":14,"default_branch":"main","last_synced_at":"2025-05-07T00:54:46.761Z","etag":null,"topics":["golang","smithy"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aws.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-02-06T22:50:59.000Z","updated_at":"2025-05-05T19:41:53.000Z","dependencies_parsed_at":"2023-10-30T15:44:37.057Z","dependency_job_id":"5247a08a-1606-4f0c-8fb4-5b928222b095","html_url":"https://github.com/aws/smithy-go","commit_stats":{"total_commits":827,"total_committers":26,"mean_commits":"31.807692307692307","dds":0.7218863361547763,"last_synced_commit":"10fbeed6f8454b3c0ce3a960646c09cb218a4936"},"previous_names":["awslabs/smithy-go"],"tags_count":86,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aws%2Fsmithy-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aws%2Fsmithy-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aws%2Fsmithy-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aws%2Fsmithy-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aws","download_url":"https://codeload.github.com/aws/smithy-go/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254053235,"owners_count":22006717,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["golang","smithy"],"created_at":"2024-08-03T17:00:36.281Z","updated_at":"2025-05-14T02:09:00.295Z","avatar_url":"https://github.com/aws.png","language":"Java","funding_links":[],"categories":["Code Generators"],"sub_categories":["Client Code Generators"],"readme":"# Smithy Go\n\n[![Go Build Status](https://github.com/aws/smithy-go/actions/workflows/go.yml/badge.svg?branch=main)](https://github.com/aws/smithy-go/actions/workflows/go.yml)[![Codegen Build Status](https://github.com/aws/smithy-go/actions/workflows/codegen.yml/badge.svg?branch=main)](https://github.com/aws/smithy-go/actions/workflows/codegen.yml)\n\n[Smithy](https://smithy.io/) code generators for Go and the accompanying smithy-go runtime.\n\nThe smithy-go runtime requires a minimum version of Go 1.20.\n\n**WARNING: All interfaces are subject to change.**\n\n## Can I use the code generators?\n\nIn order to generate a usable smithy client you must provide a [protocol definition](https://github.com/aws/smithy-go/blob/main/codegen/smithy-go-codegen/src/main/java/software/amazon/smithy/go/codegen/integration/ProtocolGenerator.java),\nsuch as [AWS restJson1](https://smithy.io/2.0/aws/protocols/aws-restjson1-protocol.html),\nin order to generate transport mechanisms and serialization/deserialization\ncode (\"serde\") accordingly.\n\nThe code generator does not currently support any protocols out of the box other than the new `smithy.protocols#rpcv2Cbor`,\ntherefore the useability of this project on its own is currently limited.\nSupport for all [AWS protocols](https://smithy.io/2.0/aws/protocols/index.html)\nexists in [aws-sdk-go-v2](https://github.com/aws/aws-sdk-go-v2). We are\ntracking the movement of those out of the SDK into smithy-go in\n[#458](https://github.com/aws/smithy-go/issues/458), but there's currently no\ntimeline for doing so.\n\n## Plugins\n\nThis repository implements the following Smithy build plugins:\n\n| ID | GAV prefix | Description |\n|----|------------|-------------|\n| `go-codegen`        | `software.amazon.smithy.go:smithy-go-codegen` | Implements Go client code generation for Smithy models. |\n| `go-server-codegen` | `software.amazon.smithy.go:smithy-go-codegen` | Implements Go server code generation for Smithy models. |\n\n**NOTE: Build plugins are not currently published to mavenCentral. You must publish to mavenLocal to make the build plugins visible to the Smithy CLI. The artifact version is currently fixed at 0.1.0.**\n\n## `go-codegen`\n\n### Configuration\n\n[`GoSettings`](codegen/smithy-go-codegen/src/main/java/software/amazon/smithy/go/codegen/GoSettings.java)\ncontains all of the settings enabled from `smithy-build.json` and helper\nmethods and types. The up-to-date list of top-level properties enabled for\n`go-client-codegen` can be found in `GoSettings::from()`.\n\n| Setting         | Type    | Required | Description                                                                                                                 |\n|-----------------|---------|----------|-----------------------------------------------------------------------------------------------------------------------------|\n| `service`       | string  | yes      | The Shape ID of the service for which to generate the client.                                                               |\n| `module`        | string  | yes      | Name of the module in `generated.json` (and `go.mod` if `generateGoMod` is enabled) and `doc.go`.                           |\n| `generateGoMod` | boolean |          | Whether to generate a default `go.mod` file. The default value is `false`.                                                  |\n| `goDirective`   | string  |          | [Go directive](https://go.dev/ref/mod#go-mod-file-go) of the module. The default value is the minimum supported Go version. |\n\n### Supported protocols\n\n| Protocol | Notes |\n|----------|-------|\n| [`smithy.protocols#rpcv2Cbor`](https://smithy.io/2.0/additional-specs/protocols/smithy-rpc-v2.html) | Event streaming not yet implemented. |\n\n### Example\n\nThis example applies the `go-codegen` build plugin to the Smithy quickstart\nexample created from `smithy init`:\n\n```json\n{\n  \"version\": \"1.0\",\n  \"sources\": [\n    \"models\"\n  ],\n  \"maven\": {\n    \"dependencies\": [\n      \"software.amazon.smithy.go:smithy-go-codegen:0.1.0\"\n    ]\n  },\n  \"plugins\": {\n    \"go-codegen\": {\n      \"service\": \"example.weather#Weather\",\n      \"module\": \"github.com/example/weather\",\n      \"generateGoMod\": true,\n      \"goDirective\": \"1.20\"\n    }\n  }\n}\n```\n\n## `go-server-codegen`\n\nThis plugin is a work-in-progress and is currently undocumented.\n\n## License\n\nThis project is licensed under the Apache-2.0 License.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faws%2Fsmithy-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faws%2Fsmithy-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faws%2Fsmithy-go/lists"}