我具有以下YAML架构:
Info:
type: object
properties:
"qwdqwqwwdqwdwq134241HHOIHD2134":
type: object
properties:
qwdqwqwwdqwdwq134241HHOIHD2134.a.span:
type: object
properties:
10.142.0.89:54851-54.235.235.95:54336:
type: object
properties:
state:
type: string
example: IDLE
名称:10.142.0.89:54851-54.235.235.95:54336
可以是示例正则表达式之后的任何字符串,例如:10[^_]++
。
我将如何定义它,使其仍然显示10.142.0.89:54851-54.235.235.95:54336
作为示例值,但还要提到它可以是正则表达式10[^_]++
之后的任何字符串?
因为^.*$
匹配任何内容,所以只能使用关键字additionalProperties
:
type: object
additionalProperties:
type: object
properties:
qwdqwqwwdqwdwq134241HHOIHD2134.a.span:
type: object
properties:
10.142.0.89:54851-54.235.235.95:54336:
type: object
properties:
state:
type: string
example: IDLE