feat(templated_uri)!: rename unredacted macro attribute into bypass_redaction#390
feat(templated_uri)!: rename unredacted macro attribute into bypass_redaction#390
bypass_redaction#390Conversation
bypass_redactionbypass_redaction
|
why not just |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #390 +/- ##
=======================================
Coverage 100.0% 100.0%
=======================================
Files 224 224
Lines 16187 16187
=======================================
Hits 16187 16187 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
it's less descriptive, and less annoying |
There was a problem hiding this comment.
Pull request overview
This PR performs a breaking rename in the templated_uri macro API, changing the redaction-suppression attribute from unredacted to the more explicit bypass_redaction across macro parsing, documentation, examples, and downstream usage.
Changes:
- Renamed struct-level macro flag
unredactedtobypass_redactionintemplated_uriproc-macro parsing and codegen. - Renamed field-level standalone attribute
#[unredacted]to#[bypass_redaction](and updated tests/UI fixtures accordingly). - Updated crate docs, README, examples, and dependent crate docs/tests to use the new attribute name.
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| crates/templated_uri_macros_impl/src/struct_template.rs | Updates macro option/field parsing and redacted-display generation to use bypass_redaction. |
| crates/templated_uri_macros_impl/src/lib.rs | Updates attribute filtering and macro tests to reflect the renamed flag/attribute. |
| crates/templated_uri/tests/ui/string_in_restricted_position.rs | Updates UI test input to use bypass_redaction. |
| crates/templated_uri/tests/templated_uri.rs | Updates integration tests and assertions/comments to use bypass_redaction. |
| crates/templated_uri/src/uri.rs | Updates doc example to the new attribute name. |
| crates/templated_uri/src/templated.rs | Updates trait docs/examples for field- and struct-level usage. |
| crates/templated_uri/src/macros.rs | Updates macro documentation describing how to bypass redaction. |
| crates/templated_uri/src/lib.rs | Updates crate-level docs/examples for the renamed attribute. |
| crates/templated_uri/examples/uri_templating.rs | Updates example usage to bypass_redaction. |
| crates/templated_uri/examples/classified_templating.rs | Updates example field attribute to #[bypass_redaction]. |
| crates/templated_uri/README.md | Regenerates README content to reflect the renamed attribute. |
| crates/http_extensions/src/extensions/extensions_ext.rs | Updates dependent crate test usage of templated_uri macro. |
| crates/http_extensions/src/_documentation/recipes.rs | Updates dependent crate documentation example usage. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
On the topic of name, maybe |
kate-shine
left a comment
There was a problem hiding this comment.
maybe consider disable_redaction, but that's all :)
personally, I like |
|
This should be aligned with data privacy and the annotations used there, we don't want each crate to define their own terminology for opting out of redaction handling. |
Co-authored-by: Copilot <copilot@github.com>
applied the same change to data_privacy crate |
Sorry, my point was not that you should rename I also don't buy the premise. If |
|
I have the same feeling as Ralf, I don't see that much added value of |
the initial complaint about the original message from Sander
|
Renames the redaction-suppression attribute from
#[unredacted]/unredactedto#[bypass_redaction]/bypass_redactionacross thetemplated_urimacro API.The new name is intentionally more explicit and slightly more "annoying" to type. This is by design: bypassing redaction is a deliberate, security-relevant choice that should stand out at the call site and prompt the author to think twice before using it.
unredactedreads as a passive description of state;bypass_redactionreads as an active decision.Migration