fix: remove truncated (e.g.) example from hash-type schema description#87
Merged
dmcilvaney merged 4 commits intomainfrom Apr 9, 2026
Merged
fix: remove truncated (e.g.) example from hash-type schema description#87dmcilvaney merged 4 commits intomainfrom
dmcilvaney merged 4 commits intomainfrom
Conversation
Agent-Logs-Url: https://github.com/microsoft/azure-linux-dev-tools/sessions/3df2032a-3526-4aaa-9083-9b7b246fffc6 Co-authored-by: christopherco <35273088+christopherco@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix incomplete description for hash-type in generated schema
fix: remove truncated (e.g.) example from hash-type schema description
Apr 9, 2026
reubeno
approved these changes
Apr 9, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes a truncated JSON schema description for the hash-type field by removing comma-containing example text from the jsonschema struct tag (since the tag parser treats commas as option separators). This improves the generated schema output for TOML config validation without changing the actual allowed values (still enforced via enum).
Changes:
- Remove the
(e.g., SHA256, SHA512)example from theHashTypefield’sjsonschemadescription to avoid truncation. - Rely on the existing
enum=SHA256,enum=SHA512entries in the same tag to convey valid values.
Contributor
|
@copilot Update the scenarios, and ensure they work after. |
Agent-Logs-Url: https://github.com/microsoft/azure-linux-dev-tools/sessions/4d63ddc8-2532-4745-bfe1-35d6ef3fbe8e Co-authored-by: dmcilvaney <23200982+dmcilvaney@users.noreply.github.com>
Contributor
Author
|
Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
Copilot
AI
requested review from
Copilot and
dmcilvaney
and removed request for
Copilot
April 9, 2026 21:49
dmcilvaney
approved these changes
Apr 9, 2026
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.
The
hash-typefield in the generated JSON schema produced a truncated description:"Hash algorithm used for the hash value (e.g.".The
jsonschemastruct tag uses commas as key=value separators. The description(e.g., SHA256, SHA512)contained commas, causing the parser to treatSHA256andSHA512)as separate invalid entries and truncating the description at the first inner comma.Changes
internal/projectconfig/component.go: Removed(e.g., SHA256, SHA512)from theHashTypefield'sjsonschemadescription — the valid values are already expressed viaenum=SHA256,enum=SHA512in the same tag.scenario/__snapshots__/TestSnapshots_config_generate-schema_stdout_1.snap: Updated snapshot to reflect the corrected description.scenario/__snapshots__/TestSnapshotsContainer_config_generate-schema_stdout_1.snap: Updated snapshot to reflect the corrected description.Before:
After: