Skip to content

Adds v2.3.2 schemas#1625

Merged
waldekmastykarz merged 1 commit intomainfrom
v232-schemas
Apr 23, 2026
Merged

Adds v2.3.2 schemas#1625
waldekmastykarz merged 1 commit intomainfrom
v232-schemas

Conversation

@waldekmastykarz
Copy link
Copy Markdown
Collaborator

No description provided.

Copilot AI review requested due to automatic review settings April 23, 2026 13:12
@waldekmastykarz waldekmastykarz requested a review from a team as a code owner April 23, 2026 13:12
@waldekmastykarz waldekmastykarz merged commit f0c59b4 into main Apr 23, 2026
3 checks passed
@waldekmastykarz waldekmastykarz deleted the v232-schemas branch April 23, 2026 13:13
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds JSON Schema definitions for Dev Proxy v2.3.2 configuration files and plugin-specific config files, enabling schema-based validation and editor tooling for that version.

Changes:

  • Introduces a new schemas/v2.3.2/ schema set for core rc config and multiple plugins.
  • Adds schemas for plugin auxiliary files (e.g., mocks files, rewrite rules, custom responses, prices files).
  • Aligns the v2.3.2 schema inventory with the plugin surface area for that release.

Reviewed changes

Copilot reviewed 39 out of 39 changed files in this pull request and generated 9 comments.

Show a summary per file
File Description
schemas/v2.3.2/typespecgeneratorplugin.schema.json Adds schema for TypeSpec generator plugin configuration.
schemas/v2.3.2/rewriteplugin.schema.json Adds schema for RewritePlugin configuration (rewrites file path).
schemas/v2.3.2/rewriteplugin.rewritesfile.schema.json Adds schema for the RewritePlugin rewrite rules file.
schemas/v2.3.2/rc.schema.json Adds schema for the main Dev Proxy config file (devproxyrc.json).
schemas/v2.3.2/ratelimitingplugin.schema.json Adds schema for RateLimitingPlugin configuration.
schemas/v2.3.2/ratelimitingplugin.customresponsefile.schema.json Adds schema for RateLimitingPlugin custom response file.
schemas/v2.3.2/openapispecgeneratorplugin.schema.json Adds schema for OpenAPI spec generator plugin configuration.
schemas/v2.3.2/openaitelemetryplugin.schema.json Adds schema for OpenAI Telemetry plugin configuration.
schemas/v2.3.2/openaitelemetryplugin.pricesfile.schema.json Adds schema for OpenAI Telemetry plugin prices file.
schemas/v2.3.2/mockstdioresponseplugin.schema.json Adds schema for MockStdioResponsePlugin configuration.
schemas/v2.3.2/mockstdioresponseplugin.mocksfile.schema.json Adds schema for MockStdioResponsePlugin mocks file.
schemas/v2.3.2/mockresponseplugin.schema.json Adds schema for MockResponsePlugin configuration.
schemas/v2.3.2/mockresponseplugin.mocksfile.schema.json Adds schema for MockResponsePlugin mocks file.
schemas/v2.3.2/mockrequestplugin.schema.json Adds schema for MockRequestPlugin configuration.
schemas/v2.3.2/mockrequestplugin.mockfile.schema.json Adds schema for MockRequestPlugin mock request file.
schemas/v2.3.2/minimalpermissionsplugin.schema.json Adds schema for MinimalPermissionsPlugin configuration.
schemas/v2.3.2/minimalpermissionsguidanceplugin.schema.json Adds schema for MinimalPermissionsGuidancePlugin configuration.
schemas/v2.3.2/minimalcsompermissionsplugin.schema.json Adds schema for MinimalCsomPermissionsPlugin configuration.
schemas/v2.3.2/minimalcsompermissions.types.schema.json Adds schema for the CSOM types/permissions definition file.
schemas/v2.3.2/latencyplugin.schema.json Adds schema for LatencyPlugin configuration.
schemas/v2.3.2/languagemodelratelimitingplugin.schema.json Adds schema for LanguageModelRateLimitingPlugin configuration.
schemas/v2.3.2/languagemodelratelimitingplugin.customresponsefile.schema.json Adds schema for LanguageModelRateLimitingPlugin custom response file.
schemas/v2.3.2/languagemodelfailureplugin.schema.json Adds schema for LanguageModelFailurePlugin configuration.
schemas/v2.3.2/httpfilegeneratorplugin.schema.json Adds schema for HttpFileGeneratorPlugin configuration.
schemas/v2.3.2/hargeneratorplugin.schema.json Adds schema for HarGeneratorPlugin configuration.
schemas/v2.3.2/graphrandomerrorplugin.schema.json Adds schema for GraphRandomErrorPlugin configuration.
schemas/v2.3.2/graphminimalpermissionsplugin.schema.json Adds schema for GraphMinimalPermissionsPlugin configuration.
schemas/v2.3.2/graphminimalpermissionsguidanceplugin.schema.json Adds schema for GraphMinimalPermissionsGuidancePlugin configuration.
schemas/v2.3.2/genericrandomerrorplugin.schema.json Adds schema for GenericRandomErrorPlugin configuration.
schemas/v2.3.2/genericrandomerrorplugin.errorsfile.schema.json Adds schema for GenericRandomErrorPlugin errors file.
schemas/v2.3.2/executionsummaryplugin.schema.json Adds schema for ExecutionSummaryPlugin configuration.
schemas/v2.3.2/devtoolsplugin.schema.json Adds schema for DevToolsPlugin configuration.
schemas/v2.3.2/crudapiplugin.schema.json Adds schema for CrudApiPlugin configuration.
schemas/v2.3.2/crudapiplugin.apifile.schema.json Adds schema for the CrudApiPlugin API definition file.
schemas/v2.3.2/cachingguidanceplugin.schema.json Adds schema for CachingGuidancePlugin configuration.
schemas/v2.3.2/authplugin.schema.json Adds schema for AuthPlugin configuration.
schemas/v2.3.2/apicenterproductionversionplugin.schema.json Adds schema for ApiCenterProductionVersionPlugin configuration.
schemas/v2.3.2/apicenteronboardingplugin.schema.json Adds schema for ApiCenterOnboardingPlugin configuration.
schemas/v2.3.2/apicenterminimalpermissionsplugin.schema.json Adds schema for ApiCenterMinimalPermissionsPlugin configuration.

Comment on lines +11 to +15
"apiPort": {
"type": "number",
"minimum": 0,
"maximum": 65535,
"description": "Port for the Dev Proxy API server."
Copy link

Copilot AI Apr 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

apiPort is defined as JSON Schema type number, which allows fractional values (e.g., 8000.5) even though Dev Proxy expects an integer port (see DevProxy/Proxy/ProxyConfiguration.cs where ApiPort is int). Use type: "integer" here (and keep the existing min/max) to prevent invalid configs passing schema validation.

Copilot uses AI. Check for mistakes.
Comment on lines +42 to +46
"ipAddress": {
"type": "string",
"format": "ipv4",
"description": "IP address for Dev Proxy to listen on."
},
Copy link

Copilot AI Apr 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ipAddress is restricted to format: "ipv4", but the runtime uses IPAddress.Parse(...) and supports IPv6 addresses as well. Consider widening this schema (e.g., allow both ipv4/ipv6, or use an anyOf with patterns) so valid IPv6 configurations aren’t rejected by schema validation.

Copilot uses AI. Check for mistakes.
Comment on lines +167 to +172
"watchPids": {
"type": "array",
"description": "List of process IDs to watch for network traffic.",
"items": {
"type": "number"
}
Copy link

Copilot AI Apr 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

watchPids items are typed as number, which would allow fractional PIDs. The runtime uses IEnumerable<int> for PIDs, so schema validation should require integers (and ideally minimum: 0).

Copilot uses AI. Check for mistakes.
"description": "(Optional) A regular expression pattern to match against the stdin body (case-insensitive). You can specify bodyRegex, bodyFragment, or both; if both are specified, bodyRegex takes precedence. If neither is specified, the mock matches any stdin or is applied immediately on startup."
},
"nth": {
"type": "integer",
Copy link

Copilot AI Apr 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nth can be 0/negative per the schema, but matching is 1-based in the implementation and nth <= 0 will never match. Add minimum: 1 here to prevent invalid configurations being accepted by schema validation.

Suggested change
"type": "integer",
"type": "integer",
"minimum": 1,

Copilot uses AI. Check for mistakes.
Comment on lines +36 to +40
"includeCosts": {
"type": "boolean",
"description": "Whether to calculate and include cost information in the spans. Requires prices data.",
"default": true
},
Copy link

Copilot AI Apr 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Schema sets includeCosts default to true, but the runtime default is false (OpenAITelemetryPluginConfiguration.IncludeCosts has no initializer). This makes the schema misleading and may cause tooling to suggest a default that changes behavior. Update the schema default to false or remove the default to match runtime behavior.

Copilot uses AI. Check for mistakes.
Comment on lines +142 to +147
"port": {
"type": "number",
"minimum": 0,
"maximum": 65535,
"description": "Port for Dev Proxy to listen on."
},
Copy link

Copilot AI Apr 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

port is defined as JSON Schema type number, which allows non-integer ports. Dev Proxy treats Port as an int (see DevProxy/Proxy/ProxyConfiguration.cs). Change the schema type to integer to align validation with actual runtime behavior.

Copilot uses AI. Check for mistakes.
Comment on lines +185 to +189
"timeout": {
"type": "number",
"minimum": 1,
"description": "Timeout in seconds for requests passing through Dev Proxy."
}
Copy link

Copilot AI Apr 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

timeout is typed as number even though it represents a duration in seconds and the runtime stores it as an integer count (TimeoutSeconds). Change this to type: "integer" to avoid accepting fractional seconds that won’t map cleanly to the runtime configuration.

Copilot uses AI. Check for mistakes.
Comment on lines +36 to +37
"type": "object",
"description": "Body of the request (object or string)."
Copy link

Copilot AI Apr 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

request.body is constrained to type: "object", but the runtime model (DevProxy.Abstractions/Models/MockRequest.Body) is dynamic and can be a string/array/etc. The schema should reflect what the plugin actually supports (at least object | array | string).

Suggested change
"type": "object",
"description": "Body of the request (object or string)."
"type": [
"object",
"array",
"string"
],
"description": "Body of the request (object, array, or string)."

Copilot uses AI. Check for mistakes.
},
"nth": {
"type": "integer",
"description": "(Optional) Match the nth occurrence of the request."
Copy link

Copilot AI Apr 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nth can be set to 0 or a negative number per this schema, but the runtime matching logic treats the first occurrence as 1 and will never match nth <= 0. Add minimum: 1 (and consider documenting that it’s 1-based) to prevent configs that can never match.

Suggested change
"description": "(Optional) Match the nth occurrence of the request."
"minimum": 1,
"description": "(Optional) Match the nth occurrence of the request. This value is 1-based."

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants