Skip to content

Extract ClickStack scalar enums - #395

Merged
sdairs merged 1 commit into
issue-381-clickpipes-api-modelsfrom
issue-378-clickstack-enums
Aug 13, 2026
Merged

Extract ClickStack scalar enums#395
sdairs merged 1 commit into
issue-381-clickpipes-api-modelsfrom
issue-378-clickstack-enums

Conversation

@sdairs

@sdairs sdairs commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator

Closes #378

Summary

  • Extract 104 ClickStack scalar enums into a private vocabulary module.
  • Move every associated Display/default implementation and preserve all 336 known values, 325 explicit Serde renames, and data-carrying catch-alls.
  • Keep ClickStack structs, aliases, and discriminated unions in the model facade for the final library layer.
  • Preserve public paths and byte-identical analyzer enum inventory.

Tests

  • cargo fmt --all
  • cargo check --workspace --all-features
  • cargo test -p clickhouse-cloud-api -p clickhouse-openapi-analyzer
  • cargo clippy -p clickhouse-cloud-api -p clickhouse-openapi-analyzer --all-targets -- -D warnings

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR extracts the ClickStack scalar enum vocabulary out of the models.rs facade into a dedicated models/clickstack_enums.rs module, while preserving the existing public re-export paths (clickhouse_cloud_api::... and clickhouse_cloud_api::models::...) and keeping enum wire values/catch-alls intact.

Changes:

  • Introduces src/models/clickstack_enums.rs containing the extracted ClickStack scalar enums (including their Display/Default behavior and unknown-value catch-alls).
  • Wires the new module into src/models.rs via mod clickstack_enums; and pub use clickstack_enums::*;, removing the inlined enum block from the facade.
  • Extends the model facade path-stability test to cover ClickStackChartColor as a representative ClickStack enum.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
crates/clickhouse-cloud-api/src/models/clickstack_enums.rs New module holding extracted ClickStack scalar enums and their implementations.
crates/clickhouse-cloud-api/src/models.rs Registers + re-exports the new module and removes the extracted inline enum definitions.
crates/clickhouse-cloud-api/tests/model_facade_test.rs Adds an assertion that ClickStackChartColor keeps identical root vs models:: paths.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@sdairs
sdairs force-pushed the issue-378-clickstack-enums branch from 0bbcbe9 to c662ade Compare August 8, 2026 18:37
@sdairs
sdairs temporarily deployed to cloud-integration August 8, 2026 18:37 — with GitHub Actions Inactive
@sdairs
sdairs had a problem deploying to cloud-integration August 8, 2026 19:01 — with GitHub Actions Failure
@sdairs
sdairs force-pushed the issue-378-clickstack-enums branch from c662ade to aeef35d Compare August 13, 2026 11:37
@sdairs
sdairs had a problem deploying to cloud-integration August 13, 2026 11:38 — with GitHub Actions Failure
@sdairs
sdairs had a problem deploying to cloud-integration August 13, 2026 11:48 — with GitHub Actions Failure
@sdairs
sdairs force-pushed the issue-378-clickstack-enums branch from aeef35d to 2081f74 Compare August 13, 2026 18:29

@iskakaushik iskakaushik left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@sdairs
sdairs merged commit faf940a into main Aug 13, 2026
4 checks passed
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.

Extract ClickStack scalar enums

3 participants