From 24405feaf84d94a9c7bef2eb43a1a3f1dd5880c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cintia=20S=C3=A1nchez=20Garc=C3=ADa?= Date: Thu, 16 Jan 2025 11:38:31 +0100 Subject: [PATCH] Fix some patterns on JSON schemas (#786) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Cintia Sánchez García --- docs/config/schema/data.schema.json | 19 ++++++++++--------- docs/config/schema/guide.schema.json | 2 +- docs/config/schema/settings.schema.json | 24 ++++++++++++------------ 3 files changed, 23 insertions(+), 22 deletions(-) diff --git a/docs/config/schema/data.schema.json b/docs/config/schema/data.schema.json index b61da666..22aa2c6b 100644 --- a/docs/config/schema/data.schema.json +++ b/docs/config/schema/data.schema.json @@ -116,13 +116,13 @@ "title": "Crunchbase URL of the organization this item belongs to", "type": "string", "format": "uri", - "pattern": "^https://(www\\.)?crunchbase.com/organization/.*", + "pattern": "^https?://(www\\.)?crunchbase.com/organization/.*", "examples": ["https://www.crunchbase.com/organization/org-name"] }, "twitter": { "title": "Twitter URL", "type": "string", - "pattern": "^https://(twitter|x).com/.*", + "pattern": "^https?://(twitter|x).com/.*", "examples": ["https://twitter.com/org-name", "https://x.com/org-name"] }, "url_for_bestpractices": { @@ -256,7 +256,7 @@ "title": "Facebook URL", "type": "string", "format": "uri", - "pattern": "^https://(www\\.)?facebook.com/.*" + "pattern": "^https?://(www\\.)?facebook.com/.*" }, "github_discussions_url": { "title": "GitHub discussions URL", @@ -288,7 +288,7 @@ "title": "LinkedIn URL", "type": "string", "format": "uri", - "pattern": "^https://(www\\.)?linkedin.com/.*", + "pattern": "^https?://(www\\.)?linkedin.com/.*", "examples": ["https://www.linkedin.com/url"] }, "mailing_list_url": { @@ -323,7 +323,7 @@ "description": "Link to the package manager where the item is available", "type": "string", "format": "uri", - "pattern": "https?://.*" + "pattern": "^https?://.*" }, "parent_project": { "title": "Name of the parent project", @@ -335,20 +335,21 @@ "title": "Pinterest URL", "type": "string", "format": "uri", - "pattern": "^https://(www\\.)?pinterest.com/.*", + "pattern": "^https?://(www\\.)?pinterest.com/.*", "examples": ["https://www.pinterest.com/url"] }, "reddit_url": { "title": "Reddit URL", "type": "string", "format": "uri", - "pattern": "^https://(www\\.)?reddit.com/.*", + "pattern": "^https?://(www\\.)?reddit.com/.*", "examples": ["https://www.reddit.com/url"] }, "slack_url": { "title": "Slack URL", "type": "string", "format": "uri", + "pattern": "^https?://.*", "examples": ["https://slack.url"] }, "specification": { @@ -359,7 +360,7 @@ "title": "Stack Overflow URL", "type": "string", "format": "uri", - "pattern": "^https://stackoverflow.com/.*" + "pattern": "^https?://stackoverflow.com/.*" }, "summary_business_use_case": { "title": "Description of the business use case", @@ -422,7 +423,7 @@ "title": "YouTube URL", "type": "string", "format": "uri", - "pattern": "^https://(www\\.)?youtube.com/.*", + "pattern": "^https?://(www\\.)?youtube.com/.*", "examples": ["https://www.youtube.com/url"] } } diff --git a/docs/config/schema/guide.schema.json b/docs/config/schema/guide.schema.json index bdff523c..2412c263 100644 --- a/docs/config/schema/guide.schema.json +++ b/docs/config/schema/guide.schema.json @@ -41,7 +41,7 @@ } } }, - "required": ["category", "content"] + "required": ["category"] } } }, diff --git a/docs/config/schema/settings.schema.json b/docs/config/schema/settings.schema.json index 11ec44b3..e15edfc6 100644 --- a/docs/config/schema/settings.schema.json +++ b/docs/config/schema/settings.schema.json @@ -28,7 +28,7 @@ "container_id": { "title": "Landscape web application container ID", "type": "string", - "pattern": "GTM-[A-Z0-9]{6,7}", + "pattern": "^GTM-.*", "examples": ["GTM-XXXXX"] } } @@ -209,21 +209,21 @@ "title": "Facebook URL", "type": "string", "format": "uri", - "pattern": "^https://(www\\.)?facebook.com/.*", + "pattern": "^https?://(www\\.)?facebook.com/.*", "examples": ["https://www.facebook.com/url"] }, "flickr": { "title": "Flickr URL", "type": "string", "format": "uri", - "pattern": "^https://(www\\.)?flickr.com/.*", + "pattern": "^https?://(www\\.)?flickr.com/.*", "examples": ["https://www.flickr.com/url"] }, "github": { "title": "GitHub URL", "type": "string", "format": "uri", - "pattern": "^https://(www\\.)?github.com/.*", + "pattern": "^https?://(www\\.)?github.com/.*", "examples": ["https://github.com/owner/repo"] }, "homepage": { @@ -237,49 +237,49 @@ "title": "Instagram URL", "type": "string", "format": "uri", - "pattern": "^https://(www\\.)?instagram.com/.*", + "pattern": "^https?://(www\\.)?instagram.com/.*", "examples": ["https://www.instagram.com/url"] }, "linkedin": { "title": "LinkedIn URL", "type": "string", "format": "uri", - "pattern": "^https://(www\\.)?linkedin.com/.*", + "pattern": "^https?://(www\\.)?linkedin.com/.*", "examples": ["https://www.linkedin.com/url"] }, "slack": { "title": "Slack URL", "type": "string", "format": "uri", - "pattern": "^https://.*", + "pattern": "^https?://.*", "examples": ["https://example.slack.com"] }, "twitch": { "title": "Twitch URL", "type": "string", "format": "uri", - "pattern": "^https://(www\\.)?twitch.tv/.*", + "pattern": "^https?://(www\\.)?twitch.tv/.*", "examples": ["https://www.twitch.tv/url"] }, "twitter": { "title": "Twitter URL", "type": "string", "format": "uri", - "pattern": "^https://(www\\.)?(twitter|x).com/.*", + "pattern": "^https?://(www\\.)?(twitter|x).com/.*", "examples": ["https://www.twitter.com/url", "https://x.com/url"] }, "wechat": { "title": "WeChat URL", "type": "string", "format": "uri", - "pattern": "^https://.*", + "pattern": "^https?://.*", "examples": ["https://example.com"] }, "youtube": { "title": "YouTube URL", "type": "string", "format": "uri", - "pattern": "^https://(www\\.)?youtube.com/.*", + "pattern": "^https?://(www\\.)?youtube.com/.*", "examples": ["https://www.youtube.com/url"] } } @@ -343,7 +343,7 @@ "title": "GitHub URL", "type": "string", "format": "uri", - "pattern": "^https://(www\\.)?github.com/.*", + "pattern": "^https?://(www\\.)?github.com/.*", "examples": ["https://github.com/owner/repo"] } }