From abb886a4fd321fe6d62f892a625197e110e68fbd Mon Sep 17 00:00:00 2001 From: "Jonathan Thorpe (Sony)" Date: Fri, 26 Apr 2024 14:56:56 +0100 Subject: [PATCH] Add regular expression patterns to method and property identifiers --- APIs/ConfigurationAPI.raml | 10 ++++++++-- APIs/schemas/methods-base.json | 3 ++- APIs/schemas/properties-base.json | 3 ++- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/APIs/ConfigurationAPI.raml b/APIs/ConfigurationAPI.raml index 2b9b8e2..4049e7e 100644 --- a/APIs/ConfigurationAPI.raml +++ b/APIs/ConfigurationAPI.raml @@ -102,7 +102,10 @@ documentation: example: !include ../examples/methods-base-get-200.json type: !include schemas/methods-base.json /{methodId}: - displayName: 'Invoke Method.' + uriParameters: + methodId: + type: string + pattern: "^[0-9]+m[0-9]+$" patch: description: 'Invoke method.' body: @@ -135,7 +138,10 @@ documentation: example: !include ../examples/properties-base-get-200.json type: !include schemas/properties-base.json /{propertyId}: - displayName: 'Attributes of a Property' + uriParameters: + methodId: + type: string + pattern: "^[0-9]+p[0-9]+$" get: description: 'Get attributes of a Property' responses: diff --git a/APIs/schemas/methods-base.json b/APIs/schemas/methods-base.json index dd30ab1..b7ce812 100644 --- a/APIs/schemas/methods-base.json +++ b/APIs/schemas/methods-base.json @@ -4,7 +4,8 @@ "description": "Describes the Configuration API /rolePaths/{rolePath}/methods base", "title": "Configuration API /rolePaths/{rolePath}/methods base", "items": { - "type": "string" + "type": "string", + "pattern": "^[0-9]+m[0-9]+$" }, "uniqueItems": true } diff --git a/APIs/schemas/properties-base.json b/APIs/schemas/properties-base.json index ae1a931..ce090c0 100644 --- a/APIs/schemas/properties-base.json +++ b/APIs/schemas/properties-base.json @@ -4,7 +4,8 @@ "description": "Describes the Configuration API /rolePaths/{rolePath}/properties base", "title": "Configuration API /rolePaths/{rolePath}/properties base", "items": { - "type": "string" + "type": "string", + "pattern": "^[0-9]+p[0-9]+$" }, "uniqueItems": true }