From 12bccfd022dad3faa68b93057a9394d44a356e44 Mon Sep 17 00:00:00 2001 From: Alex Ross Date: Mon, 20 Sep 2021 15:22:44 +0200 Subject: [PATCH] Update devcontainer schema (#132047) Part of microsoft/vscode-remote-release#3450 --- .../schemas/attachContainer.schema.json | 14 +++- .../devContainer.schema.generated.json | 80 ++++++++++++++----- .../schemas/devContainer.schema.src.json | 26 ++++-- 3 files changed, 92 insertions(+), 28 deletions(-) diff --git a/extensions/configuration-editing/schemas/attachContainer.schema.json b/extensions/configuration-editing/schemas/attachContainer.schema.json index 9fbc5d0fec7..48d51d78f05 100644 --- a/extensions/configuration-editing/schemas/attachContainer.schema.json +++ b/extensions/configuration-editing/schemas/attachContainer.schema.json @@ -14,9 +14,19 @@ }, "forwardPorts": { "type": "array", - "description": "Ports that are forwarded from the container to the local machine.", + "description": "Ports that are forwarded from the container to the local machine. Can be an integer port number, or a string of the format \"host:port_number\".", "items": { - "type": "integer" + "oneOf": [ + { + "type": "integer", + "maximum": 65535, + "minimum": 0 + }, + { + "type": "string", + "pattern": "^([a-z0-9\\-]+):(\\d{1,5})$" + } + ] } }, "portsAttributes": { diff --git a/extensions/configuration-editing/schemas/devContainer.schema.generated.json b/extensions/configuration-editing/schemas/devContainer.schema.generated.json index bd10964f3ef..492b21827cf 100644 --- a/extensions/configuration-editing/schemas/devContainer.schema.generated.json +++ b/extensions/configuration-editing/schemas/devContainer.schema.generated.json @@ -126,11 +126,19 @@ }, "forwardPorts": { "type": "array", - "description": "Ports that are forwarded from the container to the local machine.", + "description": "Ports that are forwarded from the container to the local machine. Can be an integer port number, or a string of the format \"host:port_number\".", "items": { - "type": "integer", - "maximum": 65535, - "minimum": 0 + "oneOf": [ + { + "type": "integer", + "maximum": 65535, + "minimum": 0 + }, + { + "type": "string", + "pattern": "^([a-z0-9\\-]+):(\\d{1,5})$" + } + ] } }, "portsAttributes": { @@ -516,11 +524,19 @@ }, "forwardPorts": { "type": "array", - "description": "Ports that are forwarded from the container to the local machine.", + "description": "Ports that are forwarded from the container to the local machine. Can be an integer port number, or a string of the format \"host:port_number\".", "items": { - "type": "integer", - "maximum": 65535, - "minimum": 0 + "oneOf": [ + { + "type": "integer", + "maximum": 65535, + "minimum": 0 + }, + { + "type": "string", + "pattern": "^([a-z0-9\\-]+):(\\d{1,5})$" + } + ] } }, "portsAttributes": { @@ -872,11 +888,19 @@ }, "forwardPorts": { "type": "array", - "description": "Ports that are forwarded from the container to the local machine.", + "description": "Ports that are forwarded from the container to the local machine. Can be an integer port number, or a string of the format \"host:port_number\".", "items": { - "type": "integer", - "maximum": 65535, - "minimum": 0 + "oneOf": [ + { + "type": "integer", + "maximum": 65535, + "minimum": 0 + }, + { + "type": "string", + "pattern": "^([a-z0-9\\-]+):(\\d{1,5})$" + } + ] } }, "portsAttributes": { @@ -1202,11 +1226,19 @@ }, "forwardPorts": { "type": "array", - "description": "Ports that are forwarded from the container to the local machine.", + "description": "Ports that are forwarded from the container to the local machine. Can be an integer port number, or a string of the format \"host:port_number\".", "items": { - "type": "integer", - "maximum": 65535, - "minimum": 0 + "oneOf": [ + { + "type": "integer", + "maximum": 65535, + "minimum": 0 + }, + { + "type": "string", + "pattern": "^([a-z0-9\\-]+):(\\d{1,5})$" + } + ] } }, "portsAttributes": { @@ -1497,11 +1529,19 @@ }, "forwardPorts": { "type": "array", - "description": "Ports that are forwarded from the container to the local machine.", + "description": "Ports that are forwarded from the container to the local machine. Can be an integer port number, or a string of the format \"host:port_number\".", "items": { - "type": "integer", - "maximum": 65535, - "minimum": 0 + "oneOf": [ + { + "type": "integer", + "maximum": 65535, + "minimum": 0 + }, + { + "type": "string", + "pattern": "^([a-z0-9\\-]+):(\\d{1,5})$" + } + ] } }, "portsAttributes": { diff --git a/extensions/configuration-editing/schemas/devContainer.schema.src.json b/extensions/configuration-editing/schemas/devContainer.schema.src.json index 9c6da0adcbe..20ef3b20dac 100644 --- a/extensions/configuration-editing/schemas/devContainer.schema.src.json +++ b/extensions/configuration-editing/schemas/devContainer.schema.src.json @@ -26,11 +26,19 @@ }, "forwardPorts": { "type": "array", - "description": "Ports that are forwarded from the container to the local machine.", + "description": "Ports that are forwarded from the container to the local machine. Can be an integer port number, or a string of the format \"host:port_number\".", "items": { - "type": "integer", - "maximum": 65535, - "minimum": 0 + "oneOf": [ + { + "type": "integer", + "maximum": 65535, + "minimum": 0 + }, + { + "type": "string", + "pattern": "^([a-z0-9\\-]+):(\\d{1,5})$" + } + ] } }, "portsAttributes": { @@ -78,7 +86,10 @@ }, "protocol": { "type": "string", - "enum": ["http", "https"], + "enum": [ + "http", + "https" + ], "description": "The protocol to use when forwarding this port." } }, @@ -140,7 +151,10 @@ }, "protocol": { "type": "string", - "enum": ["http", "https"], + "enum": [ + "http", + "https" + ], "description": "The protocol to use when forwarding this port." } },