(GH-538) Add dsc-lib-jsonschema crate#1171
Closed
michaeltlombardi wants to merge 3 commits intoPowerShell:mainfrom
Closed
(GH-538) Add dsc-lib-jsonschema crate#1171michaeltlombardi wants to merge 3 commits intoPowerShell:mainfrom
dsc-lib-jsonschema crate#1171michaeltlombardi wants to merge 3 commits intoPowerShell:mainfrom
Conversation
567daae to
2d9b276
Compare
d3c21ef to
09a7538
Compare
SteveL-MSFT
previously requested changes
Oct 14, 2025
lib/dsc-lib-jsonschema/tests/integration/transforms/idiomaticizing/enums/string_variants.rs
Show resolved
Hide resolved
lib/dsc-lib-jsonschema/Cargo.toml
Outdated
| pretty_assertions = { workspace = true } | ||
|
|
||
| [lints.clippy] | ||
| pedantic ={ level = "deny" } |
Member
There was a problem hiding this comment.
Is there a specific pedantic rule(s) you are suppressing?
Suggested change
| pedantic ={ level = "deny" } | |
| pedantic = { level = "deny" } |
Collaborator
Author
There was a problem hiding this comment.
This is functionally hoisting the deny flag from the CLI to the configuration file. I was trying to get rust analyzer to flag pedantic lints for me without having to separately run clippy.
09a7538 to
393d6a2
Compare
9 tasks
393d6a2 to
4009356
Compare
fae130e to
5975ae8
Compare
SteveL-MSFT
approved these changes
Oct 21, 2025
This change begins the schema canonicalization process by adding a new library crate to contain the helpers for defining canonical and enhanced schemas ergonomically. In this initial phase, the new crate defines: - The `VSCODE_KEYWORDS` constant, enumerating the keywords that VS Code's JSON language server recognizes. - The `idiomaticize_string_enum` transformer for munging the generated schemas for string enums with annotation keywords. - The `idiomaticize_externally_tagged_enum` transformer for munging the generated schemas for externally tagged enums to a more idiomatic and readable representation.
This change uses the new `idiomaticize_*` transformers from the `dsc-lib-jsonschema` crate in the `dsc-lib` crate to ensure that the generated schemas are idiomatic.
This change updates the i18n Pester tests to account for: - Usage of the `t!` macro when the translation key is defined on the next line. - Usage of the convenience `panic_t!` macro, which simplifies sending translated strings to the `panic!` macro. - Usage of the convenience `assert_t!` macro, which simplifies sending translated strings to the panic when an `assert!` macro fails. These use cases were required for the `dsc-lib-jsonschema` crate, which uses both `panic_t!` and `assert_t!` to raise translated panic messages when a transform is invalidly applied. While this change doesn't modify the behavior for any other crates, it does lay the groundwork for translating panic messages and assertions throughout the crates.
5975ae8 to
1ee04f8
Compare
Member
|
@michaeltlombardi can you address the merge conflicts? |
Collaborator
Author
|
@SteveL-MSFT it looks like the changes for this PR are already in place because ##1197, which included these changes and built on them, is already merged. Closing this PR as it's no longer required. |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Summary
This change begins the schema canonicalization process by adding a new library crate to contain the helpers for defining canonical and enhanced schemas ergonomically.
In this initial phase, the new crate defines:
VSCODE_KEYWORDSconstant, enumerating the keywords that VS Code's JSON language server recognizes.idiomaticize_string_enumtransformer for munging the generated schemas for string enums with annotation keywords.idiomaticize_externally_tagged_enumtransformer for munging the generated schemas for externally tagged enums to a more idiomatic and readable representation.This change uses the new
idiomaticize_*transformers from thedsc-lib-jsonschemacrate in thedsc-libcrate to ensure that the generated schemas are idiomatic.PR Context
dsc schemacommand #538