From 8bf62c483933ac85bfe98b68d115f52057dcef8f Mon Sep 17 00:00:00 2001 From: Sambhav Gupta <81870866+sambhavgupta0705@users.noreply.github.com> Date: Thu, 25 Apr 2024 14:04:38 +0530 Subject: [PATCH] feat: add linkedin extension support (#528) --- definitions/3.0.0/infoExtensions.json | 3 +++ extensions/linkedin/0.1.0/schema.json | 11 +++++++++++ schemas/3.0.0-without-$id.json | 12 ++++++++++++ schemas/3.0.0.json | 13 +++++++++++++ 4 files changed, 39 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..b7a953c8 --- /dev/null +++ b/extensions/linkedin/0.1.0/schema.json @@ -0,0 +1,11 @@ +{ + "type": "string", + "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/", + "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" +} 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.",