在下面的OpenAPI定义中,参数LayoutId会导致解析器错误“映射条目的缩进不正确”。
Yaml文件:
---
name: 1x1+1x1_1x1
LayoutId: 3A1B6753-4F92-4DCD-A1E3-6462374EC897
LayoutType: ControlRoomGrid
ConfiguredSegments:
SegmentConfiguration:
Height: 50
Id: None
Left: 0
SerializationId: true
Top: 0
Width: 50
Index: 0
SegmentConfiguration:
Height: 50
Id: None
Left: 0
SerializationId: true
Top: 50
Width: 50
Index: 0
SegmentConfiguration:
Height: 100
Id: None
Left: 50
SerializationId: true
Top: 0
Width: 50
Index: 0
IntendedResolution:
Height:
100
Width:
100
PlaneType: A
---
我已经花了将近一个小时来解决这个问题,但找不到哪里出了问题。
发布于 2021-03-15 09:32:06
你不能创建这样的对象。如果你想创建一个名为name
的对象,你应该像这样使用它:
name:
LayoutId: 3A1B6753-4F92-4DCD-A1E3-6462374EC897
LayoutType: ControlRoomGrid
ConfiguredSegments:
...
否则,如果不想创建名为name
的对象,则需要将name
字段和其他字段放在同一行中。
name: 1x1+1x1_1x1
LayoutId: 3A1B6753-4F92-4DCD-A1E3-6462374EC897
LayoutType: ControlRoomGrid
ConfiguredSegments:
...
https://stackoverflow.com/questions/66634843
复制