json - 使用数组时未正确处理 Yaml
问题描述
这个 yaml 对我来说很好用
---
idp:
type: oauth
resources:
- type: api
name: my-name
external_facing: false
allowed_scopes: #These are the scopes that are available to use.
- read
- write
- reports
- admin
allowed_clients:
- artifact_guid: <senstive-info>
environment_keys:
- development
scopes:
- read
- write
- type: client
name: oauthclient
虽然我想添加另一个 idp 配置所以希望在数组中使用它,但尝试了这个
---
idp:
- type: oauth
resources:
- type: api
name: my-name
external_facing: false
allowed_scopes:
- read
- write
- reports
- admin
allowed_clients:
- artifact_guid: <sensitive-info>
environment_keys:
- development
scopes:
- read
- write
- type: client
name: oauthclient
- provider: azure
applications:
- name: my-name
home_page_url: <sensitive info>
email_address: <sensitive info>
oidc: true
reply_urls:
- <sensitive info>
- <sensitive info>
我在第二个 yaml 上遇到的错误表明 Artifact Guid 没有被正确读取,因为部署抱怨它找不到它。
谢谢
解决方案
- type: client
name: oauthclient
在以下格式中缩进不正确
推荐阅读
- r - 为什么在选项crop设置为FALSE时ggmap不居中边界框?
- mysql - 邮递员没有在其控制台中显示错误,而是在 nodejs 中停止服务器,表达
- mongodb - python 3 抓取 Facebook 和/或 Instagram 连接器
- javascript - 当我将 jQuery Accordion 居中时,它会将下一段转移到它的上侧
- restful-url - 使用 DELETE 或 PUT 删除数据库中的外键?
- python-3.x - Python3.8.5 使用 http 请求将文件从一个 docker 容器发送到另一个容器的问题
- c - VSCode 与 Prutor 中的不同输出
- r - 使用 pls 包和 selectNcomp 始终给出 0 作为选择
- latex - 使用背页中的乳胶文件出现编译错误
- pip - 无法使用 cuda 11 安装 mmcv