Skip to content

docs: use language-neutral type names in generated filter docs#751

Open
leseb wants to merge 3 commits into
praxis-proxy:mainfrom
leseb:leseb/docs-usize-to-integer
Open

docs: use language-neutral type names in generated filter docs#751
leseb wants to merge 3 commits into
praxis-proxy:mainfrom
leseb:leseb/docs-usize-to-integer

Conversation

@leseb

@leseb leseb commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Update the filter docs generator (xtask/src/filter_docs.rs) to map Rust-specific numeric types (usize, u32, u64, i64, etc.) to integer and floating-point types (f32, f64) to number in generated configuration tables
  • Regenerate all 44 filter docs so user-facing config tables use language-neutral type names instead of Rust implementation details
  • 24 files changed across AI, security, traffic management, payload processing, observability, and TCP filter docs

Test plan

  • make lint passes (clippy, fmt, lint-deps, lint-example-tests, lint-ai-isolation, sync-example-readme, lint-filter-docs)
  • cargo xtask generate-filter-docs regenerates docs cleanly
  • cargo xtask lint-filter-docs confirms generated docs are up to date
  • Verified docs/filters/README.md Rust code snippet (Option<usize>) is untouched

Replace Rust-specific type names (usize, u32, u64, f32, f64, etc.)
with language-neutral alternatives (integer, number) in the filter
docs generator so user-facing configuration tables are not tied to
implementation details.

Signed-off-by: Sébastien Han <seb@redhat.com>
@leseb leseb requested a review from a team July 1, 2026 08:27
@leseb leseb added the documentation Improvements or additions to documentation label Jul 1, 2026
@leseb leseb added this to AI Gateway Jul 1, 2026
@github-project-automation github-project-automation Bot moved this to Backlog in AI Gateway Jul 1, 2026
@leseb leseb added this to the v0.4.0 milestone Jul 1, 2026

@praxis-bot praxis-bot 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.

PR Review

Replaces Rust-specific numeric type names (usize, u32, u64, f64, etc.) with language-neutral names (integer, number) in generated filter docs.

Overall Assessment

The code change in render_type_path is correct and straightforward. The 23 regenerated doc files are mechanical output of that change. Two test coverage gaps should be addressed.

Findings

Severity File Description
Large xtask/src/filter_docs.rs No unit tests for the new integer/number type mapping
Medium xtask/src/filter_docs.rs sample_filter_entry() fixture uses stale "u64" type_str

Comment thread xtask/src/filter_docs.rs
leseb added 2 commits July 1, 2026 15:59
Add numeric_types_render_language_neutral test covering integer and
number type mappings. Update sample_filter_entry fixture and dependent
assertions to use the language-neutral type name.

Signed-off-by: Sébastien Han <seb@redhat.com>
…-integer

Signed-off-by: Sébastien Han <seb@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

3 participants