-
Notifications
You must be signed in to change notification settings - Fork 5
Adding Rust cli generation to firestone #84
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
Conversation
36d60e5 to
a52e67a
Compare
|
Interesting @dgunzy ! You seem to be on a roll here, how about we build the crd2openapi, let's talk tomorrow about this, as this woudl be a great path forward for us to support both kube-native and REST, all with one definition! |
|
Can you provide some output of |
CLI |
Sounds good! Lets chat - and i have some tweaks to make for the generated cli code as well. I can iterate on this for a bit. |
Signed-off-by: Daniel Guns <danbguns@gmail.com>
ebourgeois
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
gtg
Add Rust Clap CLI Code Generation Support
Summary
Adds Rust
clapCLI code generation tofirestone. Python Click CLI generation remains unchanged except for a bugfix that resolves duplicate argument decorators in update operations.Changes
New Feature: Rust CLI Generation
--languageflag togenerate clicommand (defaults to"python"for backward compatibility)firestone/spec/cli_rust.pyfor Rust CLI generation logiccli_module.rs.jinja2andmain.rs.jinja2for generating idiomatic Rustclapcodeexamples/addressbook_rs/demonstrating CLI + server integrationBugfix: Duplicate Arguments in Python CLI
@click.argumentdecorators in update operations (e.g.,address_key,uuidappearing twice)get_resource_attrs()and add deduplication in templateTesting
test/spec/test_cli_rust.py)Backward Compatibility
✅ Fully backward compatible - default language is
"python", existing commands work unchanged.