From 2390128f8dec2464ea10970d60ec86f18806538f Mon Sep 17 00:00:00 2001 From: Anastasia Dusak <61540676+k-a-il@users.noreply.github.com> Date: Wed, 16 Apr 2025 18:11:51 +0200 Subject: [PATCH 1/6] Added AWS provider to features file schema and regex patterns to check formatting of fields --- .github/features_schema.json | 46 ++++++++++++++++++++++++++---------- 1 file changed, 33 insertions(+), 13 deletions(-) diff --git a/.github/features_schema.json b/.github/features_schema.json index b5f030a..baf1dfb 100644 --- a/.github/features_schema.json +++ b/.github/features_schema.json @@ -1,45 +1,63 @@ { "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", - "required": ["service", "name", "features"], + "required": ["service", "name", "aws_provider","features", "emulation_level"], "properties": { "service": { "type": "string", - "description": "Service's abbreviation in AWS" + "pattern": "^[A-Za-z0-9]+$", + "description": "Short service name" }, "name": { "type": "string", + "pattern": "^[A-Z][^.\n]*$", "description": "The display name of the service from AWS" }, + "aws_provider": { + "type": "object", + "required": ["api"], + "properties": { + "api": { + "type": "string", + "pattern": "^[a-z0-9-_]+$", + "description": "Name of AWS API provider or method name" + }, + "name": { + "type": "string", + "default": "default", + "pattern": "^[a-z0-9-_]+$", + "description": "Name of AWS provider" + } + }, + "additionalProperties": false + }, "emulation_level": { "type": "string", "enum": ["CRUD", "emulated"], "description": "The level of emulation support on the service level" }, - "localstack_page": { - "type": "string", - "format": "uri", - "description": "URL to the LocalStack user guide documentation" - }, "features": { "type": "array", "description": "List of features supported by the service", "items": { "type": "object", - "required": ["name", "description", "documentation_page", "status"], + "required": ["name", "description", "aws_documentation_url", "status"], "properties": { "name": { "type": "string", - "description": "Name of the feature" + "pattern": "^[A-Z][^.\n]*$", + "description": "Short name of the feature" }, "description": { "type": "string", + "pattern": "^[A-Z][^.\n]*$", "description": "Description of the feature" }, - "documentation_page": { + "aws_documentation_url": { "type": "string", "format": "uri", - "description": "URL to the AWS feature's documentation" + "pattern": "^https:\/\/([^\/\\s]+\/)(\\S*)$", + "description": "Link to the AWS feature documentation" }, "status": { "type": "string", @@ -49,14 +67,16 @@ "api_methods": { "type": "array", "items": { - "type": "string" + "type": "string", + "pattern": "^([A-Z][a-z0-9]*)+$" }, "description": "List of API methods associated with the feature" }, "limitations": { "type": "array", "items": { - "type": "string" + "type": "string", + "pattern": "^[A-Z][^.\n]*$" }, "description": "List of known limitations for the feature" }, From b45f0fcb616febd77ab804047f9866e4105a53a9 Mon Sep 17 00:00:00 2001 From: Anastasia Dusak <61540676+k-a-il@users.noreply.github.com> Date: Thu, 17 Apr 2025 10:49:05 +0200 Subject: [PATCH 2/6] Added aws domains to aws documentation url --- .github/features_schema.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/features_schema.json b/.github/features_schema.json index baf1dfb..723499e 100644 --- a/.github/features_schema.json +++ b/.github/features_schema.json @@ -1,7 +1,7 @@ { "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", - "required": ["service", "name", "aws_provider","features", "emulation_level"], + "required": ["service", "name", "aws_provider", "features", "emulation_level"], "properties": { "service": { "type": "string", @@ -56,7 +56,7 @@ "aws_documentation_url": { "type": "string", "format": "uri", - "pattern": "^https:\/\/([^\/\\s]+\/)(\\S*)$", + "pattern": "^https:\/\/[\\w-]+\\.(amazon\\.com|amazonaws\\.com)(\/\\S*)?$", "description": "Link to the AWS feature documentation" }, "status": { From 9f65d5e7d602d8f35258770a326d89a79ed743a0 Mon Sep 17 00:00:00 2001 From: Anastasia Dusak <61540676+k-a-il@users.noreply.github.com> Date: Thu, 17 Apr 2025 10:49:21 +0200 Subject: [PATCH 3/6] Update .github/features_schema.json Co-authored-by: Silvio Vasiljevic --- .github/features_schema.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/features_schema.json b/.github/features_schema.json index 723499e..d3b578c 100644 --- a/.github/features_schema.json +++ b/.github/features_schema.json @@ -26,7 +26,7 @@ "type": "string", "default": "default", "pattern": "^[a-z0-9-_]+$", - "description": "Name of AWS provider" + "description": "Name of AWS provider implementation" } }, "additionalProperties": false From 181d9cfa11e1bc017c8f3e5af28177e18bd734be Mon Sep 17 00:00:00 2001 From: Anastasia Dusak <61540676+k-a-il@users.noreply.github.com> Date: Thu, 17 Apr 2025 11:05:42 +0200 Subject: [PATCH 4/6] Removed format from aws_documentation_url field --- .github/features_schema.json | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/features_schema.json b/.github/features_schema.json index d3b578c..7ec97dd 100644 --- a/.github/features_schema.json +++ b/.github/features_schema.json @@ -55,7 +55,6 @@ }, "aws_documentation_url": { "type": "string", - "format": "uri", "pattern": "^https:\/\/[\\w-]+\\.(amazon\\.com|amazonaws\\.com)(\/\\S*)?$", "description": "Link to the AWS feature documentation" }, From d173f53bf87c73dc9a3dc1949c865b452f8bd99b Mon Sep 17 00:00:00 2001 From: Anastasia Dusak <61540676+k-a-il@users.noreply.github.com> Date: Thu, 17 Apr 2025 11:27:34 +0200 Subject: [PATCH 5/6] Change regex pattern to accept only urls with amazon.com domain --- .github/features_schema.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/features_schema.json b/.github/features_schema.json index 7ec97dd..3ac9106 100644 --- a/.github/features_schema.json +++ b/.github/features_schema.json @@ -55,7 +55,7 @@ }, "aws_documentation_url": { "type": "string", - "pattern": "^https:\/\/[\\w-]+\\.(amazon\\.com|amazonaws\\.com)(\/\\S*)?$", + "pattern": "^https:\/\/([^\/\\s]+\\.)*amazon\\.com(\/[^\\s]*)?$", "description": "Link to the AWS feature documentation" }, "status": { From b45ab75ff9a007fd540fc3cee0294d51242ee535 Mon Sep 17 00:00:00 2001 From: Anastasia Dusak <61540676+k-a-il@users.noreply.github.com> Date: Thu, 17 Apr 2025 11:31:41 +0200 Subject: [PATCH 6/6] Changed domain to aws.amazn.com --- .github/features_schema.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/features_schema.json b/.github/features_schema.json index 3ac9106..c8474c4 100644 --- a/.github/features_schema.json +++ b/.github/features_schema.json @@ -55,7 +55,7 @@ }, "aws_documentation_url": { "type": "string", - "pattern": "^https:\/\/([^\/\\s]+\\.)*amazon\\.com(\/[^\\s]*)?$", + "pattern": "^https://(docs\\.)?aws\\.amazon\\.com(/[^\\s]*)?$", "description": "Link to the AWS feature documentation" }, "status": {