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

Feature request: provide smithy build information in metadata in the model when using the run plugin #2463

Open
mullermp opened this issue Nov 14, 2024 · 0 comments

Comments

@mullermp
Copy link
Contributor

mullermp commented Nov 14, 2024

The run plugin feature for smithy cli will only pass along the model through standard input. To enable code generators in multiple target languages, it is beneficial for the run plugin to provide access to configuration on the smithy build file, such as library names, versions, and other code generation options. This should either be provided in the model as metadata or an environment variable should provide access to the smithy build json or this metadata.

https://smithy.io/2.0/guides/smithy-build-json.html#run-plugin

I lean towards an option that has an ENV variable that contains a json string of arbitrary metadata that is a sibling to the run plugin. Example, given:

            "plugins": {
                "run::smithy-ruby": {
                    "command": ["smithy-ruby", "smith", "client", "--gem-name=weather", "--gem-version=1.0.0"],
                    "options": {
                        "foo": "bar"
                    }
                }
            }

perhaps ENV['SMITHY_PROJECTION_OPTIONS'] could be '{"foo": "bar"}'?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant