From fe05128bf27eba11a99a7f62d9c2ab06c4053c09 Mon Sep 17 00:00:00 2001 From: Tianxiang Chen Date: Fri, 9 Dec 2022 16:08:04 +0800 Subject: [PATCH] update api scenario schema --- .../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",