Skip to content
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

[FEATURE] configuration 对象配置支持 additionalProperties #4283

Open
winjo opened this issue Dec 30, 2024 · 0 comments
Open

[FEATURE] configuration 对象配置支持 additionalProperties #4283

winjo opened this issue Dec 30, 2024 · 0 comments
Assignees
Labels
🎨 feature feature required

Comments

@winjo
Copy link
Contributor

winjo commented Dec 30, 2024

如果你的需求与问题相关,请在下面描述一下(Is your feature request related to a problem? Please describe.)
vscode configuration type 为 object,如果 additionalProperties 为 false,会渲染对象的属性
如下图示例
截屏2024-12-30 10 25 56
目前 opensumi 不支持渲染对象属性,而是在 settings.json 配置
截屏2024-12-30 10 31 14
配置:

      {
        "title": "配置示例",
        "properties": {
          "object-config1": {
            "type": "object",
            "default": {
							"key1": true,
							"key2": true,
							"key3": false
						},
						"additionalProperties": false,
            "description": "对象配置",
						"properties": {
							"key1": {
								"type": "boolean",
								"description": "key1"
							},
							"key2": {
								"type": "boolean",
								"description": "key2"
							},
              "key3": {
                "type": "boolean",
                "description": "key3"
							}
						}
          },
					"object-config2": {
            "type": "object",
            "default": {
							"key1": "value1",
							"key2": true,
							"key3": "中文"
						},
						"additionalProperties": false,
            "description": "对象配置2",
						"properties": {
							"key1": {
								"type": "string",
								"description": "字符串属性"
							},
							"key2": {
								"type": "boolean",
								"description": "布尔属性"
							},
              "key3": {
                "type": "string",
                "description": "枚举属性",
                "enum": [
                  "中文",
                  "English"
              	]
							}
						}
          }
        }
      }

描述你预期的功能表现(Describe the solution you'd like)
additionalProperties 配置为 false,同 vscode 渲染对象属性

描述你考虑过的替代方案(Describe alternatives you've considered)

补充信息(Additional context)

@winjo winjo added the 🎨 feature feature required label Dec 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🎨 feature feature required
Projects
None yet
Development

No branches or pull requests

2 participants