From d1ce52703e1af2437ffaa5546c272d4475cb8d35 Mon Sep 17 00:00:00 2001 From: "Dr. Stefan Schimanski" Date: Wed, 14 Aug 2019 06:48:24 +0200 Subject: [PATCH] blog-structual-schema: fix oneOf in example spec (#15816) --- ...06-20-Future-of-CRDs-Structural-Schemas.md | 22 ++++++++++++------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/content/en/blog/_posts/2019-06-20-Future-of-CRDs-Structural-Schemas.md b/content/en/blog/_posts/2019-06-20-Future-of-CRDs-Structural-Schemas.md index 38f0e39a9e..b8eaecaf27 100644 --- a/content/en/blog/_posts/2019-06-20-Future-of-CRDs-Structural-Schemas.md +++ b/content/en/blog/_posts/2019-06-20-Future-of-CRDs-Structural-Schemas.md @@ -68,6 +68,8 @@ properties: properties command: type: string + shell: + type: string machines: type: array items: @@ -92,14 +94,14 @@ properties: shell: type: string minLength: 1 # value validation - oneOf: # value validation - - required: [“command”] # value validation - - required: [“shell”] # value validation machines: type: array items: type: string pattern: “^[a-z0-9]+(-[a-z0-9]+)*$” # value validation + oneOf: # value validation + - required: [“command”] # value validation + - required: [“shell”] # value validation required: [“spec”] # value validation ``` @@ -130,16 +132,20 @@ properties: shell: type: string minLength: 1 - oneOf: - - type: string - required: [“command”] - - type: string - required: [“shell”] machines: type: array items: type: string pattern: “^[a-z0-9]+(-[a-z0-9]+)*$” + oneOf: + - properties: + command: + type: string + required: [“command”] + - properties: + shell: + type: string + required: [“shell”] not: properties: privileged: {}