-
Notifications
You must be signed in to change notification settings - Fork 79
Add support for YAML-based config #1491
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: waldekmastykarz <11164679+waldekmastykarz@users.noreply.github.com>
Co-authored-by: waldekmastykarz <11164679+waldekmastykarz@users.noreply.github.com>
Co-authored-by: waldekmastykarz <11164679+waldekmastykarz@users.noreply.github.com>
Co-authored-by: waldekmastykarz <11164679+waldekmastykarz@users.noreply.github.com>
waldekmastykarz
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot have you also considered supporting YAML in config files for plugins, like mocks, CRUD API, etc?
Yes, YAML is already supported for all plugin config files. The Users can specify YAML files for mocks, CRUD API definitions, error responses, rate limiting configs, and all other plugin-specific configuration files - they just need to use the |
waldekmastykarz
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adds YAML as an alternative to JSON for all configuration files. Supports YAML anchors and merge keys for reusable configuration blocks.
New Files
DevProxy.Abstractions/Utils/ProxyYaml.cs- YAML-to-JSON conversion with anchor/alias/merge key supportDevProxy.Abstractions/Extensions/YamlConfigurationExtensions.cs- ASP.NET CoreIConfigurationProviderfor YAML filesModified Files
ConfigurationManagerExtensions.cs- Addeddevproxyrc.yaml/.ymlto config file discoveryBaseLoader.cs- Convert YAML plugin configs to JSON before processingConfigCommand.cs- Detect YAML config/mock files in downloaded samplesFeatures
.yamland.ymlextensions supported everywhere JSON is usedyes/no,on/off,true/false)Example
Backward compatible—existing JSON configuration continues to work unchanged.
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:
aka.ms/home/REDACTED/work/dev-proxy/dev-proxy/DevProxy/bin/Debug/net10.0/devproxy /home/REDACTED/work/dev-proxy/dev-proxy/DevProxy/bin/Debug/net10.0/devproxy --help(dns block)/home/REDACTED/work/dev-proxy/dev-proxy/DevProxy/bin/Debug/net10.0/devproxy /home/REDACTED/work/dev-proxy/dev-proxy/DevProxy/bin/Debug/net10.0/devproxy --config-file devproxyrc.yaml(dns block)/home/REDACTED/work/dev-proxy/dev-proxy/DevProxy/bin/Debug/net10.0/devproxy /home/REDACTED/work/dev-proxy/dev-proxy/DevProxy/bin/Debug/net10.0/devproxy --config-file devproxyrc-mocks.yaml(dns block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.