From 0accdabf2fcedc5080e78a8ada2b04cc6f39337a Mon Sep 17 00:00:00 2001 From: Tianxiang Chen <403562789@qq.com> Date: Mon, 12 Dec 2022 11:30:12 +0800 Subject: [PATCH] update api scenario schema (#21836) Co-authored-by: Tianxiang Chen --- .../api-scenario/references/v1.2/schema.json | 22 ++++++++++++------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/documentation/api-scenario/references/v1.2/schema.json b/documentation/api-scenario/references/v1.2/schema.json index da330c866c1a..cebe5d66ed3d 100644 --- a/documentation/api-scenario/references/v1.2/schema.json +++ b/documentation/api-scenario/references/v1.2/schema.json @@ -3,14 +3,7 @@ "type": "object", "properties": { "scope": { - "type": "string", - "enum": [ - "ResourceGroup", - "Subscription", - "Tenant", - "None" - ], - "default": "ResourceGroup" + "$ref": "#/definitions/Scope" }, "authentication": { "$ref": "#/definitions/Authentication" @@ -134,6 +127,19 @@ } ] }, + "Scope": { + "type": "string", + "oneOf": [ + { + "enum": ["ResourceGroup", "Subscription", "Tenant", "None"], + "default": "ResourceGroup" + }, + { + "format": "uri-reference", + "pattern": "^.+\\.(yaml|yml)$" + } + ] + }, "JsonPointer": { "type": "string", "description": "JSON Pointer described by RFC 6901, e.g. /foo/bar",