Try to use an object (dictionary), not an array. In Swagger/OpenAPI, dynamic key-value input is modeled with type: object + additionalProperties. Your current OtherFields uses array, and additionalProperties is ignored on arrays.
Fix
{
"swagger": "2.0",
"info": { "title": "Custom Connector", "version": "1.0.0" },
"host": "yourhost.com",
"basePath": "/api",
"schemes": ["https"],
"consumes": ["application/json"],
"produces": ["application/json"],
"paths": {
"/createworkitem": {
"post": {
"summary": "Create Work Item",
"operationId": "CreateWorkItem",
"description": "Create a new work item with optional other fields",
"parameters": [{
"name": "body",
"in": "body",
"required": true,
"schema": { "$ref": "#/definitions/CreateWorkItemRequest" }
}],
"responses": { "200": { "description": "OK", "schema": { "type": "object" } } },
"x-ms-parameters-location": "body"
}
}
},
"definitions": {
"CreateWorkItemRequest": {
"type": "object",
"required": ["Title"],
"properties": {
"Title": { "type": "string", "description": "Title of the work item" },
"Description": { "type": "string", "description": "Description of the work item" },
"OtherFields": {
"type": "object",
"description": "Any additional key-value pairs",
"additionalProperties": { "type": "string" },
"x-ms-summary": "Other Fields",
"x-ms-visibility": "advanced"
}
}
}
}
}
This renders in the custom connector designer as an expandable key-value editor where users can add arbitrary keys.
If your backend expects an array of {key,value} objects
Model it as:
"OtherFields": {
"type": "array",
"items": {
"type": "object",
"required": ["key","value"],
"properties": {
"key": { "type": "string" },
"value": { "type": "string" }
}
},
"x-ms-summary": "Other Fields",
"x-ms-visibility": "advanced"
}
Pick one pattern that matches your API contract:
Object + additionalProperties -> JSON like "OtherFields": { "Priority":"High", "Owner":"Sam" }
Array of pairs -> JSON like "OtherFields":[{"key":"Priority","value":"High"}]