Convert single-value enums to const and add URI format constraints#8145
Closed
Convert single-value enums to const and add URI format constraints#8145
Conversation
- Converted 17 single-value enum instances to const per JSON Schema best practice: - mcp_config_schema.json: 4 instances (http, stdio type constraints) - included_file_schema.json: 5 instances (http, defaults, disable, stdio) - main_workflow_schema.json: 8 instances (completed, checks_requested, started, read, defaults, disable, all, http) - Added format: uri constraints to appropriate string fields: - MCP server url fields (all 3 schemas) - MCP server registry fields (all 3 schemas) - HTTP mode MCP server url field (main schema) - Updated test expectation for empty URL field to check format validation - Excluded environment.url from format constraint (accepts GitHub expressions) All unit tests passing. Ready for full test suite. Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Convert single-value enums to const and add format constraints
Convert single-value enums to const and add URI format constraints
Dec 30, 2025
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.
Addresses schema audit issues #5 and #6: 17 instances of single-value enums were using
"enum": ["value"]instead of the JSON Schema best practice"const": "value", and no format constraints were applied to URI fields.Changes
Single-value enum → const conversions (17 instances)
mcp_config_schema.json: HTTP/stdio type constraints (4)included_file_schema.json: HTTP type, network defaults, firewall disable, stdio validation (5)main_workflow_schema.json: Event types (completed, checks_requested, started), permissions (read), network/firewall settings, roles (all) (8)URI format constraints (8 fields)
"format": "uri"to MCP serverurlandregistryfields across all schemasenvironment.urlwhich accepts GitHub Actions expressions like${{ steps.deploy.outputs.url }}Test adjustments
Format validation now catches invalid URIs at schema validation time with clearer error messages.
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:
https://api.github.com/user/usr/bin/gh gh api user --jq .login om/super-linter/--json(http block)/usr/bin/gh gh api user --jq .login -nilfunc git /home/REDACTED/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.25.0.linux-amd64/bin/go k/gh-aw/gh-aw/.ggit 17 single-value rev-parse l/linux_amd64/as--show-toplevel go buil�� action.git action.git /usr/bin/git l ./cmd/gh-aw e/git-remote-htt/tmp/validate-js-2864696056.cjs git(http block)/usr/bin/gh gh api user --jq .login action.git t /usr/bin/git l om/actions/downl-1 l/linux_amd64/vexterm-color git -C .git .git 0/x64/bin/node l om/actions/checkapi pkg/mod/golang.ouser k/gh-aw/gh-aw/gh--jq(http block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.