Skip to content

Conversation

@dgunzy
Copy link
Contributor

@dgunzy dgunzy commented Dec 14, 2025

Signed-off-by: Daniel Guns danbguns@gmail.com

Rust CLI Generation Improvements

Overview

Improves Firestone's Rust CLI generation with comprehensive enum handling and flexible query parameter management.

Key Changes

Enum Handling:

  • Proper kebab-case to PascalCase conversion for enum variants
  • Auto-escape Rust keywords (type → r#type)
  • Full support for array of enums with correct type conversions
  • Fixed handling for required/optional/default enums

Query Parameters:

  • Replaced hardcoded limit/offset with data-driven approach from OpenAPI spec
  • Supports any pagination pattern (offset-based, page-based, cursor-based)
  • Simplified template logic (~80 lines removed)

@dgunzy
Copy link
Contributor Author

dgunzy commented Dec 14, 2025

@ebourgeois - added much better support for rust enums to avoid having a lot of template complexity.

@dgunzy dgunzy force-pushed the rust-cli-gen-tweaks branch from aef32b2 to fe41e80 Compare December 14, 2025 02:40
Signed-off-by: Daniel Guns <danbguns@gmail.com>
@dgunzy dgunzy force-pushed the rust-cli-gen-tweaks branch from fe41e80 to 1eba5c8 Compare December 14, 2025 02:50
Copy link
Contributor

@ebourgeois ebourgeois left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gtg

@dgunzy dgunzy merged commit 450c3f9 into main Dec 14, 2025
4 checks passed
@dgunzy dgunzy deleted the rust-cli-gen-tweaks branch December 14, 2025 18:24
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

Successfully merging this pull request may close these issues.

3 participants