-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
impl(generator): better blockquote handling (#346)
Rust treats any blockquote as a Rust code sample, unless it has the `norust` tag. Furthermore, `cargo test` will try to compile these code samples. This is all very good, but we generate the documentation comments from the Probobuf (or OpenAPI) comments, which may and do include blockquotes that are not Rust code. This change handles a few more blockquote types. We really need to parse the Markdown comments to handle all possible cases, but this can handle the most urgent cases.
- Loading branch information
Showing
12 changed files
with
595 additions
and
329 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -437,41 +437,43 @@ impl Binding { | |
/// | ||
/// Example Policy with multiple AuditConfigs: | ||
/// | ||
/// ```norust | ||
/// { | ||
/// "audit_configs": [ | ||
/// { | ||
/// "audit_configs": [ | ||
/// "service": "allServices", | ||
/// "audit_log_configs": [ | ||
/// { | ||
/// "service": "allServices", | ||
/// "audit_log_configs": [ | ||
/// { | ||
/// "log_type": "DATA_READ", | ||
/// "exempted_members": [ | ||
/// "user:[email protected]" | ||
/// ] | ||
/// }, | ||
/// { | ||
/// "log_type": "DATA_WRITE" | ||
/// }, | ||
/// { | ||
/// "log_type": "ADMIN_READ" | ||
/// } | ||
/// "log_type": "DATA_READ", | ||
/// "exempted_members": [ | ||
/// "user:[email protected]" | ||
/// ] | ||
/// }, | ||
/// { | ||
/// "service": "sampleservice.googleapis.com", | ||
/// "audit_log_configs": [ | ||
/// { | ||
/// "log_type": "DATA_READ" | ||
/// }, | ||
/// { | ||
/// "log_type": "DATA_WRITE", | ||
/// "exempted_members": [ | ||
/// "user:[email protected]" | ||
/// ] | ||
/// } | ||
/// "log_type": "DATA_WRITE" | ||
/// }, | ||
/// { | ||
/// "log_type": "ADMIN_READ" | ||
/// } | ||
/// ] | ||
/// }, | ||
/// { | ||
/// "service": "sampleservice.googleapis.com", | ||
/// "audit_log_configs": [ | ||
/// { | ||
/// "log_type": "DATA_READ" | ||
/// }, | ||
/// { | ||
/// "log_type": "DATA_WRITE", | ||
/// "exempted_members": [ | ||
/// "user:[email protected]" | ||
/// ] | ||
/// } | ||
/// ] | ||
/// } | ||
/// ] | ||
/// } | ||
/// ``` | ||
/// | ||
/// For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ | ||
/// logging. It also exempts `[email protected]` from DATA_READ logging, and | ||
|
@@ -510,19 +512,21 @@ impl AuditConfig { | |
/// Provides the configuration for logging a type of permissions. | ||
/// Example: | ||
/// | ||
/// ```norust | ||
/// { | ||
/// "audit_log_configs": [ | ||
/// { | ||
/// "audit_log_configs": [ | ||
/// { | ||
/// "log_type": "DATA_READ", | ||
/// "exempted_members": [ | ||
/// "user:[email protected]" | ||
/// ] | ||
/// }, | ||
/// { | ||
/// "log_type": "DATA_WRITE" | ||
/// } | ||
/// "log_type": "DATA_READ", | ||
/// "exempted_members": [ | ||
/// "user:[email protected]" | ||
/// ] | ||
/// }, | ||
/// { | ||
/// "log_type": "DATA_WRITE" | ||
/// } | ||
/// ] | ||
/// } | ||
/// ``` | ||
/// | ||
/// This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting | ||
/// [email protected] from DATA_READ logging. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.