json - 如何从 json 模式中的属性引用特定属性
问题描述
我有以下 json 属性架构:
"name": {
"$id": "#/properties/name",
"type": "string",
"title": "Name",
"description": "The name of entity within the network.",
"default": "",
"examples": [
"name-csc1"
]
},
"alias": {
"$id": "#/properties/alias",
"type": "string",
"title": "Alias",
"description": "The custom name, alias, set by the user in the network.",
"default": "",
"examples": [
"Updated-Name111"
]
我想将属性的默认字段引用到alias
属性,name
因为字段的默认值alias
是name
值。
有没有办法在 json 模式中做到这一点?
解决方案
推荐阅读
- kubernetes - Kubernetes Pod/容器网络
- php - 如何使用 cURL 下载 Facebook 图片?
- python - 是否可以获得 Dash-Cytoscape 图形工具提示?
- python - Python Selenium Chromedriver,无法检测到刷新
- reactjs - 执行多重依赖突变 - grandstack apollo graphql 3.3
- php - 多值搜索以查找多维数组中的索引号
- javascript - 模块解析失败:意外令牌 (1:68)
- laravel - GZip 在 Laravel + OpenLiteSpeed 中不起作用
- arrays - 从 ForEach 循环创建数组
- arrays - 检索和更新函数,用于在第三个数组中求和两个数组