From 57be86130fa753483369c47acc8f0f3704de3ba4 Mon Sep 17 00:00:00 2001 From: Sambhav Gupta Date: Sat, 20 Apr 2024 13:21:43 +0530 Subject: [PATCH 1/9] feat: add linkedin extension support --- definitions/3.0.0/infoExtensions.json | 3 +++ extensions/linkedin/0.1.0/schema.json | 10 ++++++++++ 2 files changed, 13 insertions(+) create mode 100644 extensions/linkedin/0.1.0/schema.json diff --git a/definitions/3.0.0/infoExtensions.json b/definitions/3.0.0/infoExtensions.json index 47e71402..0c7f505f 100644 --- a/definitions/3.0.0/infoExtensions.json +++ b/definitions/3.0.0/infoExtensions.json @@ -4,6 +4,9 @@ "properties": { "x-x":{ "$ref": "http://asyncapi.com/extensions/x/0.1.0/schema.json" + }, + "x-linkedin":{ + "$ref": "http://asyncapi.com/extensions/linkedin/0.1.0/schema.json" } }, "$schema": "http://json-schema.org/draft-07/schema#", diff --git a/extensions/linkedin/0.1.0/schema.json b/extensions/linkedin/0.1.0/schema.json new file mode 100644 index 00000000..b4ffce0d --- /dev/null +++ b/extensions/linkedin/0.1.0/schema.json @@ -0,0 +1,10 @@ +{ + "type": "string", + "description": "This extension allows you to provide the Linkedin username of the account representing the team/company of the API.", + "example": [ + "sambhavgupta0705", + "asyncapi" + ], + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/extensions/linkedin/0.1.0/schema.json" +} From 7687d5c4a403cdbd53c044436c922c23d211f4e3 Mon Sep 17 00:00:00 2001 From: Sambhav Gupta Date: Sat, 20 Apr 2024 17:32:47 +0530 Subject: [PATCH 2/9] feat: add linkedin profile URL --- extensions/linkedin/0.1.0/schema.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/extensions/linkedin/0.1.0/schema.json b/extensions/linkedin/0.1.0/schema.json index b4ffce0d..be086334 100644 --- a/extensions/linkedin/0.1.0/schema.json +++ b/extensions/linkedin/0.1.0/schema.json @@ -1,9 +1,9 @@ { "type": "string", - "description": "This extension allows you to provide the Linkedin username of the account representing the team/company of the API.", + "description": "This extension allows you to provide the Linkedin profile URL of the account representing the team/company of the API.", "example": [ - "sambhavgupta0705", - "asyncapi" + "https://www.linkedin.com/company/asyncapi/", + "https://www.linkedin.com/in/sambhavgupta0705/" ], "$schema": "http://json-schema.org/draft-07/schema#", "$id": "http://asyncapi.com/extensions/linkedin/0.1.0/schema.json" From 90c23c936fa9f3b155539a0fd209ee4d1226d0c5 Mon Sep 17 00:00:00 2001 From: Sambhav Gupta Date: Mon, 22 Apr 2024 14:56:17 +0530 Subject: [PATCH 3/9] feat: add the pattern properties --- extensions/linkedin/0.1.0/schema.json | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/extensions/linkedin/0.1.0/schema.json b/extensions/linkedin/0.1.0/schema.json index be086334..bab5d3ae 100644 --- a/extensions/linkedin/0.1.0/schema.json +++ b/extensions/linkedin/0.1.0/schema.json @@ -1,5 +1,10 @@ { "type": "string", + "patternProperties": { + "x-linkedin":{ + "$ref": "^https:\/\/(?:www\.)?linkedin\.com.*" + } + }, "description": "This extension allows you to provide the Linkedin profile URL of the account representing the team/company of the API.", "example": [ "https://www.linkedin.com/company/asyncapi/", From 1ed2fd3c85b5c9ab8b1ffd8d8855f3a7197e995b Mon Sep 17 00:00:00 2001 From: Sambhav Gupta Date: Mon, 22 Apr 2024 17:00:24 +0530 Subject: [PATCH 4/9] feat: add the pattern properties --- extensions/linkedin/0.1.0/schema.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/linkedin/0.1.0/schema.json b/extensions/linkedin/0.1.0/schema.json index bab5d3ae..72383205 100644 --- a/extensions/linkedin/0.1.0/schema.json +++ b/extensions/linkedin/0.1.0/schema.json @@ -2,7 +2,7 @@ "type": "string", "patternProperties": { "x-linkedin":{ - "$ref": "^https:\/\/(?:www\.)?linkedin\.com.*" + "$ref": "^https://(www\\.)?linkedin\\.com.*$" } }, "description": "This extension allows you to provide the Linkedin profile URL of the account representing the team/company of the API.", From d224b5243d9676d663f82d253bd31ed96c64453a Mon Sep 17 00:00:00 2001 From: Sambhav Gupta Date: Mon, 22 Apr 2024 17:02:31 +0530 Subject: [PATCH 5/9] feat: add the pattern properties --- extensions/linkedin/0.1.0/schema.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/linkedin/0.1.0/schema.json b/extensions/linkedin/0.1.0/schema.json index 72383205..331eb372 100644 --- a/extensions/linkedin/0.1.0/schema.json +++ b/extensions/linkedin/0.1.0/schema.json @@ -2,7 +2,7 @@ "type": "string", "patternProperties": { "x-linkedin":{ - "$ref": "^https://(www\\.)?linkedin\\.com.*$" + "$ref": "^https://(www\\.)?linkedin\\.com*$" } }, "description": "This extension allows you to provide the Linkedin profile URL of the account representing the team/company of the API.", From 24bc65725b12236c30dc7bc7f5196b034923c8b6 Mon Sep 17 00:00:00 2001 From: Sambhav Gupta Date: Mon, 22 Apr 2024 17:04:10 +0530 Subject: [PATCH 6/9] feat: add the pattern properties --- extensions/linkedin/0.1.0/schema.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/extensions/linkedin/0.1.0/schema.json b/extensions/linkedin/0.1.0/schema.json index 331eb372..f88fd665 100644 --- a/extensions/linkedin/0.1.0/schema.json +++ b/extensions/linkedin/0.1.0/schema.json @@ -1,8 +1,9 @@ { "type": "string", + "format": "uri", "patternProperties": { "x-linkedin":{ - "$ref": "^https://(www\\.)?linkedin\\.com*$" + "$ref": "^https://(www\\.)?linkedin\\.com.*$" } }, "description": "This extension allows you to provide the Linkedin profile URL of the account representing the team/company of the API.", From 46f33bc933aae0423913e5ff6bca406827c8b70e Mon Sep 17 00:00:00 2001 From: Sambhav Gupta Date: Mon, 22 Apr 2024 17:07:34 +0530 Subject: [PATCH 7/9] feat: add the pattern properties --- extensions/linkedin/0.1.0/schema.json | 1 - 1 file changed, 1 deletion(-) diff --git a/extensions/linkedin/0.1.0/schema.json b/extensions/linkedin/0.1.0/schema.json index f88fd665..72383205 100644 --- a/extensions/linkedin/0.1.0/schema.json +++ b/extensions/linkedin/0.1.0/schema.json @@ -1,6 +1,5 @@ { "type": "string", - "format": "uri", "patternProperties": { "x-linkedin":{ "$ref": "^https://(www\\.)?linkedin\\.com.*$" From b8388ec9c0b7ed943b2baf6df5757ff51e89f6b1 Mon Sep 17 00:00:00 2001 From: Sambhav Gupta Date: Mon, 22 Apr 2024 17:16:37 +0530 Subject: [PATCH 8/9] feat: add the pattern properties --- extensions/linkedin/0.1.0/schema.json | 6 +----- schemas/3.0.0-without-$id.json | 12 ++++++++++++ schemas/3.0.0.json | 13 +++++++++++++ 3 files changed, 26 insertions(+), 5 deletions(-) diff --git a/extensions/linkedin/0.1.0/schema.json b/extensions/linkedin/0.1.0/schema.json index 72383205..d21941a8 100644 --- a/extensions/linkedin/0.1.0/schema.json +++ b/extensions/linkedin/0.1.0/schema.json @@ -1,10 +1,6 @@ { "type": "string", - "patternProperties": { - "x-linkedin":{ - "$ref": "^https://(www\\.)?linkedin\\.com.*$" - } - }, + "pattern": "^https://(www\\.)?linkedin\\.com.*$", "description": "This extension allows you to provide the Linkedin profile URL of the account representing the team/company of the API.", "example": [ "https://www.linkedin.com/company/asyncapi/", diff --git a/schemas/3.0.0-without-$id.json b/schemas/3.0.0-without-$id.json index 2be60cbc..6cb683d5 100644 --- a/schemas/3.0.0-without-$id.json +++ b/schemas/3.0.0-without-$id.json @@ -305,6 +305,9 @@ "properties": { "x-x": { "$ref": "#/definitions/extensions-x-0.1.0-schema" + }, + "x-linkedin": { + "$ref": "#/definitions/extensions-linkedin-0.1.0-schema" } } }, @@ -316,6 +319,15 @@ "AsyncAPISpec" ] }, + "extensions-linkedin-0.1.0-schema": { + "type": "string", + "pattern": "^https://(www\\.)?linkedin\\.com.*$", + "description": "This extension allows you to provide the Linkedin profile URL of the account representing the team/company of the API.", + "example": [ + "https://www.linkedin.com/company/asyncapi/", + "https://www.linkedin.com/in/sambhavgupta0705/" + ] + }, "servers": { "description": "An object representing multiple servers.", "type": "object", diff --git a/schemas/3.0.0.json b/schemas/3.0.0.json index b100bf28..10e7e4a4 100644 --- a/schemas/3.0.0.json +++ b/schemas/3.0.0.json @@ -315,6 +315,9 @@ "properties": { "x-x": { "$ref": "http://asyncapi.com/extensions/x/0.1.0/schema.json" + }, + "x-linkedin": { + "$ref": "http://asyncapi.com/extensions/linkedin/0.1.0/schema.json" } } }, @@ -327,6 +330,16 @@ "AsyncAPISpec" ] }, + "http://asyncapi.com/extensions/linkedin/0.1.0/schema.json": { + "$id": "http://asyncapi.com/extensions/linkedin/0.1.0/schema.json", + "type": "string", + "pattern": "^https://(www\\.)?linkedin\\.com.*$", + "description": "This extension allows you to provide the Linkedin profile URL of the account representing the team/company of the API.", + "example": [ + "https://www.linkedin.com/company/asyncapi/", + "https://www.linkedin.com/in/sambhavgupta0705/" + ] + }, "http://asyncapi.com/definitions/3.0.0/servers.json": { "$id": "http://asyncapi.com/definitions/3.0.0/servers.json", "description": "An object representing multiple servers.", From f6690f40669c9ee3b8245a19875d8a7d255c7547 Mon Sep 17 00:00:00 2001 From: Sambhav Gupta <81870866+sambhavgupta0705@users.noreply.github.com> Date: Wed, 24 Apr 2024 16:32:58 +0530 Subject: [PATCH 9/9] Update extensions/linkedin/0.1.0/schema.json Co-authored-by: Sergio Moya <1083296+smoya@users.noreply.github.com> --- extensions/linkedin/0.1.0/schema.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/linkedin/0.1.0/schema.json b/extensions/linkedin/0.1.0/schema.json index d21941a8..b7a953c8 100644 --- a/extensions/linkedin/0.1.0/schema.json +++ b/extensions/linkedin/0.1.0/schema.json @@ -1,6 +1,6 @@ { "type": "string", - "pattern": "^https://(www\\.)?linkedin\\.com.*$", + "pattern": "^http(s)?://(www\\.)?linkedin\\.com.*$", "description": "This extension allows you to provide the Linkedin profile URL of the account representing the team/company of the API.", "example": [ "https://www.linkedin.com/company/asyncapi/",