代码拉取完成,页面将自动刷新
From d47d27c70b7bdb4f2d63d260daa05b20c85c4117 Mon Sep 17 00:00:00 2001
From: xuxuepeng <xuxuepeng1@huawei.com>
Date: Thu, 7 Nov 2024 14:46:01 +0800
Subject: [PATCH 24/25] Use any type instead of bytearray
Signed-off-by: xuxuepeng <xuxuepeng1@huawei.com>
---
src/json/schema/defs.json | 35 +++++++++----------
src/json/schema/sandbox/create-request.json | 5 +--
src/json/schema/sandbox/metrics-response.json | 5 +--
src/json/schema/sandbox/sandbox.json | 12 ++-----
src/json/schema/sandbox/status-response.json | 5 +--
5 files changed, 22 insertions(+), 40 deletions(-)
diff --git a/src/json/schema/defs.json b/src/json/schema/defs.json
index 854a816..b313103 100644
--- a/src/json/schema/defs.json
+++ b/src/json/schema/defs.json
@@ -226,6 +226,20 @@
"type": "string"
}
},
+ "any": {
+ "type": "object",
+ "properties": {
+ "type_url": {
+ "type": "string"
+ },
+ "value": {
+ "type": "array",
+ "items": {
+ "type": "byte"
+ }
+ }
+ }
+ },
"mapStringString": {
"type": "object",
"patternProperties": {
@@ -406,17 +420,14 @@
}
}
},
- "mapStringObjectByteArray": {
+ "mapStringObjectAny": {
"type": "object",
"patternProperties": {
".{1,}": {
"type": "object",
"properties": {
"Element": {
- "type": "array",
- "items": {
- "type": "byte"
- }
+ "$ref": "#/definitions/any"
}
}
}
@@ -498,20 +509,6 @@
}
}
},
- "any": {
- "type": "object",
- "properties": {
- "type_url": {
- "type": "string"
- },
- "value": {
- "type": "array",
- "items": {
- "type": "byte"
- }
- }
- }
- },
"zone": {
"type": "object",
"properties": {
diff --git a/src/json/schema/sandbox/create-request.json b/src/json/schema/sandbox/create-request.json
index 2e5a06d..27accf6 100644
--- a/src/json/schema/sandbox/create-request.json
+++ b/src/json/schema/sandbox/create-request.json
@@ -12,10 +12,7 @@
}
},
"options": {
- "type": "array",
- "items": {
- "type": "byte"
- }
+ "$ref": "../defs.json#/definitions/any"
},
"netns_path": {
"type": "string"
diff --git a/src/json/schema/sandbox/metrics-response.json b/src/json/schema/sandbox/metrics-response.json
index b0a255d..53afd1f 100644
--- a/src/json/schema/sandbox/metrics-response.json
+++ b/src/json/schema/sandbox/metrics-response.json
@@ -9,10 +9,7 @@
"type": "string"
},
"data": {
- "type": "array",
- "items": {
- "type": "byte"
- }
+ "$ref": "../defs.json#/definitions/any"
}
}
}
diff --git a/src/json/schema/sandbox/sandbox.json b/src/json/schema/sandbox/sandbox.json
index 786ac1f..9725a30 100644
--- a/src/json/schema/sandbox/sandbox.json
+++ b/src/json/schema/sandbox/sandbox.json
@@ -12,18 +12,12 @@
"type": "string"
},
"options": {
- "type": "array",
- "items": {
- "type": "byte"
- }
+ "$ref": "../defs.json#/definitions/any"
}
}
},
"spec": {
- "type": "array",
- "items": {
- "type": "byte"
- }
+ "$ref": "../defs.json#/definitions/any"
},
"labels": {
"$ref": "../defs.json#/definitions/mapStringString"
@@ -35,7 +29,7 @@
"type": "uint64"
},
"extensions": {
- "$ref": "../defs.json#/definitions/mapStringObjectByteArray"
+ "$ref": "../defs.json#/definitions/mapStringObjectAny"
},
"sandboxer": {
"type": "string"
diff --git a/src/json/schema/sandbox/status-response.json b/src/json/schema/sandbox/status-response.json
index 779a35d..efac831 100644
--- a/src/json/schema/sandbox/status-response.json
+++ b/src/json/schema/sandbox/status-response.json
@@ -21,10 +21,7 @@
"type": "uint64"
},
"extra": {
- "type": "array",
- "items": {
- "type": "byte"
- }
+ "$ref": "../defs.json#/definitions/any"
},
"address": {
"type": "string"
--
2.34.1
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。