From dca902215c26eee322f65b3e014180a49dd5b62f Mon Sep 17 00:00:00 2001 From: akshatnema Date: Sat, 22 Jun 2024 13:09:53 +0530 Subject: [PATCH 01/14] Added workflow file for updating docs in website --- .github/workflows/update-docs-in-website.yml | 110 +++++++++++++++++++ 1 file changed, 110 insertions(+) create mode 100644 .github/workflows/update-docs-in-website.yml diff --git a/.github/workflows/update-docs-in-website.yml b/.github/workflows/update-docs-in-website.yml new file mode 100644 index 00000000..48319d46 --- /dev/null +++ b/.github/workflows/update-docs-in-website.yml @@ -0,0 +1,110 @@ +name: Update latest Bindings documentation in the website + +on: + push: + branches: + - "master" + paths: + - "./*.md" + + +jobs: + Make-PR: + name: Make PR on website repository with updated latest Bindings documentation + runs-on: ubuntu-latest + env: + GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} + steps: + - name: Checkout Current repository + uses: actions/checkout@v3 + with: + path: extensions-catalog + - name: Checkout Another repository + uses: actions/checkout@v3 + with: + repository: asyncapi/website + path: website + token: ${{ env.GITHUB_TOKEN }} + - name: Config git + run: | + git config --global user.name asyncapi-bot + git config --global user.email info@asyncapi.io + - name: Create branch + working-directory: ./website + run: | + git checkout -b update-extensions-docs-${{ github.sha }} + - name: Update edit-page-config.json + uses: actions/github-script@v4 + with: + script: | + const { writeFile } = require('fs').promises; + const configPath = './website/config/edit-page-config.json'; + const checkSlug = 'reference/bindings/'; + const slug = { + "value": checkSlug, + "href": "https://github.com/asyncapi/bindings/tree/master/" + }; + + const configData = require(configPath); + const entryExists = configData.some(entry => entry.value === checkSlug); + if (!entryExists) { + configData.push(slug); + await writeFile(configPath, JSON.stringify(configData, null, 2)) + } + - name: Update title and weight of the markdown files + uses: actions/github-script@v4 + with: + script: | + const fs = require('fs').promises; + const path = require('path'); + const rootPath = './bindings/'; + + async function processMarkdownFiles(folderPath, isRoot = true) { + const items = await fs.readdir(folderPath, { withFileTypes: true }); + for (const item of items) { + const fullPath = path.join(folderPath, item.name); + if (item.isDirectory()) { + // Always process subdirectories, mark isRoot as false for recursive calls + await processMarkdownFiles(fullPath, false); + } else if (item.name.endsWith('.md') && !isRoot) { // Skip root level .md files + const baseName = path.basename(fullPath, '.md'); + const newData = `---\ntitle: '${baseName}'\nweight: 10\n---\n\n`; + let existingFileData = await fs.readFile(fullPath, 'utf8'); + + existingFileData = existingFileData.replace(/!\[([^\]]*)\]\((?!http)(.*?)\)/g, (match, alt, src) => { + // Remove './' prefix from src path and prepend '/img/diagrams/' + const updatedSrc = src.replace(/^\.\//, ''); + return `![${alt}](/img/diagrams/${updatedSrc})`; + }); + + const updatedContent = newData + existingFileData; + await fs.writeFile(fullPath, updatedContent); + } + } + } + + await processMarkdownFiles(rootPath); + - name: Copy bindings folder from Current Repo to Another + working-directory: ./website + run: | + mkdir -p ./markdown/docs/reference/bindings + printf "%s\ntitle: Bindings\nweight: 11\n%s" "---" "---"> ../extensions-catalog/extensions/_section.md + mv ../bindings/**/*.md ./markdown/docs/reference/bindings + + - name: Copy images to website + run: | + # Assuming the workflow runs on Linux/macOS + # Create the target directory if it doesn't exist + mkdir -p ./website/public/img/docs/ + # Find and copy all image files from the source directory to the target directory + find ./bindings/ -type f \( -iname "*.png" -o -iname "*.jpg" -o -iname "*.jpeg" -o -iname "*.gif" -iname "*.webp" \) -exec cp {} ./website/public/img/docs/ \; + - name: Commit and push + working-directory: ./website + run: | + git add . + git commit -m "docs(extension): update latest bindings docs" + git push https://${{ env.GITHUB_TOKEN }}@github.com/asyncapi/website + - name: Create PR + working-directory: ./website + run: | + gh pr create --title "docs(bindings): update latest bindings documentation" --body "Updated bindings documentation is available and this PR introduces update to bindings folder on the website" --head "update-bindings-docs-${{ github.sha }}" \ No newline at end of file From d4719631184e5a0753dc34e578e7ee817462d723 Mon Sep 17 00:00:00 2001 From: akshatnema Date: Fri, 28 Jun 2024 16:31:08 +0530 Subject: [PATCH 02/14] updated workflow --- .github/workflows/update-docs-in-website.yml | 69 ++++++++++---------- 1 file changed, 36 insertions(+), 33 deletions(-) diff --git a/.github/workflows/update-docs-in-website.yml b/.github/workflows/update-docs-in-website.yml index 48319d46..a3990d03 100644 --- a/.github/workflows/update-docs-in-website.yml +++ b/.github/workflows/update-docs-in-website.yml @@ -7,7 +7,6 @@ on: paths: - "./*.md" - jobs: Make-PR: name: Make PR on website repository with updated latest Bindings documentation @@ -51,39 +50,41 @@ jobs: configData.push(slug); await writeFile(configPath, JSON.stringify(configData, null, 2)) } - - name: Update title and weight of the markdown files - uses: actions/github-script@v4 - with: - script: | - const fs = require('fs').promises; - const path = require('path'); - const rootPath = './bindings/'; - - async function processMarkdownFiles(folderPath, isRoot = true) { - const items = await fs.readdir(folderPath, { withFileTypes: true }); - for (const item of items) { - const fullPath = path.join(folderPath, item.name); - if (item.isDirectory()) { - // Always process subdirectories, mark isRoot as false for recursive calls - await processMarkdownFiles(fullPath, false); - } else if (item.name.endsWith('.md') && !isRoot) { // Skip root level .md files - const baseName = path.basename(fullPath, '.md'); - const newData = `---\ntitle: '${baseName}'\nweight: 10\n---\n\n`; - let existingFileData = await fs.readFile(fullPath, 'utf8'); - - existingFileData = existingFileData.replace(/!\[([^\]]*)\]\((?!http)(.*?)\)/g, (match, alt, src) => { - // Remove './' prefix from src path and prepend '/img/diagrams/' - const updatedSrc = src.replace(/^\.\//, ''); - return `![${alt}](/img/diagrams/${updatedSrc})`; - }); - - const updatedContent = newData + existingFileData; - await fs.writeFile(fullPath, updatedContent); - } - } + + - name: Update title and weight of the markdown files + uses: actions/github-script@v4 + with: + script: | + const fs = require('fs').promises; + const path = require('path'); + const rootPath = './bindings/'; + + async function processMarkdownFiles(folderPath, isRoot = true) { + const items = await fs.readdir(folderPath, { withFileTypes: true }); + for (const item of items) { + const fullPath = path.join(folderPath, item.name); + if (item.isDirectory()) { + // Always process subdirectories, mark isRoot as false for recursive calls + await processMarkdownFiles(fullPath, false); + } else if (item.name.endsWith('.md') && !isRoot) { // Skip root level .md files + const baseName = path.basename(fullPath, '.md'); + const newData = `---\ntitle: '${baseName}'\nweight: 10\n---\n\n`; + let existingFileData = await fs.readFile(fullPath, 'utf8'); + + existingFileData = existingFileData.replace(/!\[([^\]]*)\]\((?!http)(.*?)\)/g, (match, alt, src) => { + // Remove './' prefix from src path and prepend '/img/diagrams/' + const updatedSrc = src.replace(/^\.\//, ''); + return `![${alt}](/img/diagrams/${updatedSrc})`; + }); + + const updatedContent = newData + existingFileData; + await fs.writeFile(fullPath, updatedContent); } - - await processMarkdownFiles(rootPath); + } + } + + await processMarkdownFiles(rootPath); + - name: Copy bindings folder from Current Repo to Another working-directory: ./website run: | @@ -98,12 +99,14 @@ jobs: mkdir -p ./website/public/img/docs/ # Find and copy all image files from the source directory to the target directory find ./bindings/ -type f \( -iname "*.png" -o -iname "*.jpg" -o -iname "*.jpeg" -o -iname "*.gif" -iname "*.webp" \) -exec cp {} ./website/public/img/docs/ \; + - name: Commit and push working-directory: ./website run: | git add . git commit -m "docs(extension): update latest bindings docs" git push https://${{ env.GITHUB_TOKEN }}@github.com/asyncapi/website + - name: Create PR working-directory: ./website run: | From 88566f275d525ff992d4c599b9fc515a5cbdaa75 Mon Sep 17 00:00:00 2001 From: akshatnema Date: Sun, 28 Jul 2024 22:34:44 +0530 Subject: [PATCH 03/14] Added new flows inside update-website-docs gh action --- .github/workflows/update-docs-in-website.yml | 57 +++++++++++--------- 1 file changed, 32 insertions(+), 25 deletions(-) diff --git a/.github/workflows/update-docs-in-website.yml b/.github/workflows/update-docs-in-website.yml index a3990d03..419cd571 100644 --- a/.github/workflows/update-docs-in-website.yml +++ b/.github/workflows/update-docs-in-website.yml @@ -3,9 +3,9 @@ name: Update latest Bindings documentation in the website on: push: branches: - - "master" + - master paths: - - "./*.md" + - "**/*.md" jobs: Make-PR: @@ -17,21 +17,21 @@ jobs: - name: Checkout Current repository uses: actions/checkout@v3 with: - path: extensions-catalog + path: bindings - name: Checkout Another repository uses: actions/checkout@v3 with: - repository: asyncapi/website + repository: akshatnema/website path: website token: ${{ env.GITHUB_TOKEN }} - name: Config git run: | - git config --global user.name asyncapi-bot - git config --global user.email info@asyncapi.io + git config --global user.name akshatnema + git config --global user.email akshatnema.school@gmail.com - name: Create branch working-directory: ./website run: | - git checkout -b update-extensions-docs-${{ github.sha }} + git checkout -b update-bindings-docs-${{ github.sha }} - name: Update edit-page-config.json uses: actions/github-script@v4 with: @@ -41,15 +41,15 @@ jobs: const checkSlug = 'reference/bindings/'; const slug = { "value": checkSlug, - "href": "https://github.com/asyncapi/bindings/tree/master/" + "href": "https://github.com/asyncapi/bindings/tree/master" }; - + const configData = require(configPath); const entryExists = configData.some(entry => entry.value === checkSlug); if (!entryExists) { - configData.push(slug); + configData.unshift(slug); await writeFile(configPath, JSON.stringify(configData, null, 2)) - } + } - name: Update title and weight of the markdown files uses: actions/github-script@v4 @@ -58,7 +58,8 @@ jobs: const fs = require('fs').promises; const path = require('path'); const rootPath = './bindings/'; - + let itemIndex = 10; + async function processMarkdownFiles(folderPath, isRoot = true) { const items = await fs.readdir(folderPath, { withFileTypes: true }); for (const item of items) { @@ -68,30 +69,36 @@ jobs: await processMarkdownFiles(fullPath, false); } else if (item.name.endsWith('.md') && !isRoot) { // Skip root level .md files const baseName = path.basename(fullPath, '.md'); - const newData = `---\ntitle: '${baseName}'\nweight: 10\n---\n\n`; - let existingFileData = await fs.readFile(fullPath, 'utf8'); + const parentDirName = path.basename(folderPath); + const newFileName = `${parentDirName}.md`; + const newFullPath = path.join(folderPath, newFileName); + await fs.rename(fullPath, newFullPath); + + const newData = `---\ntitle: '${parentDirName}'\nweight: ${itemIndex}\n---\n\n`; + let existingFileData = await fs.readFile(newFullPath, 'utf8'); - existingFileData = existingFileData.replace(/!\[([^\]]*)\]\((?!http)(.*?)\)/g, (match, alt, src) => { - // Remove './' prefix from src path and prepend '/img/diagrams/' + existingFileData = existingFileData.replace(/ { + // Remove './' prefix from src path and prepend '/img/docs/' const updatedSrc = src.replace(/^\.\//, ''); - return `![${alt}](/img/diagrams/${updatedSrc})`; - }); - + return ` ../extensions-catalog/extensions/_section.md - mv ../bindings/**/*.md ./markdown/docs/reference/bindings - + printf "%s\ntitle: Bindings\nweight: 11\n%s" "---" "---"> ../bindings/_section.md + find ../bindings -type f -name '*.md' ! -name 'CONTRIBUTING.md' ! -name 'README.md' ! -name 'CODE_OF_CONDUCT.md' -exec mv {} ./markdown/docs/reference/bindings/ \; + - name: Copy images to website run: | # Assuming the workflow runs on Linux/macOS @@ -110,4 +117,4 @@ jobs: - name: Create PR working-directory: ./website run: | - gh pr create --title "docs(bindings): update latest bindings documentation" --body "Updated bindings documentation is available and this PR introduces update to bindings folder on the website" --head "update-bindings-docs-${{ github.sha }}" \ No newline at end of file + gh pr create --title "docs(bindings): update latest bindings documentation" --body "Updated bindings documentation is available and this PR introduces update to bindings folder on the website" --head "update-bindings-docs-${{ github.sha }}" From c9f3ad9978921291951aabef91569d3c6bb59afe Mon Sep 17 00:00:00 2001 From: akshatnema Date: Mon, 29 Jul 2024 20:53:59 +0530 Subject: [PATCH 04/14] updated ibmmq README --- ibmmq/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ibmmq/README.md b/ibmmq/README.md index f3496f7e..f79a6b88 100644 --- a/ibmmq/README.md +++ b/ibmmq/README.md @@ -226,7 +226,7 @@ Field Name | Type | Description | Applicability [default] | Constraints ---|:---:|---|:---|:--- `type` | string | The type of the message. | OPTIONAL [`string`] | MUST be either `string`, `jms` or `binary` `headers` | string | Defines the IBM MQ message headers to include with this message. More than one header can be specified as a comma separated list. Supporting information on IBM MQ message formats can be found on this [page](https://www.ibm.com/support/knowledgecenter/SSFKSJ_latest/com.ibm.mq.ref.dev.doc/q097520_.html) in the IBM MQ Knowledge Center. | OPTIONAL if `type` = `binary` | `headers` MUST NOT be specified if `type` = `string` or `jms` -`description` | string1 | Provides additional information for application developers: describes the message type or format. | OPTIONAL | - +`description` | string1 | Provides additional information for application developers: describes the message type or format. | OPTIONAL | - `expiry` | integer | The recommended setting the client should use for the TTL (Time-To-Live) of the message. This is a period of time expressed in milliseconds and set by the application that puts the message. `expiry` values are API dependant e.g., MQI and JMS use different units of time and default values for *`unlimited`*. General information on IBM MQ message expiry can be found on this [page](https://www.ibm.com/support/knowledgecenter/en/SSFKSJ_latest/com.ibm.mq.ref.dev.doc/q097490_.html) in the IBM MQ Knowledge Center. | OPTIONAL [*`unlimited`*] | `expiry` value MUST be either `zero` (*`unlimited`*) or greater than zero. `bindingVersion` | string | The version of this binding. | OPTIONAL [`latest`] | - From b182f5f85bc1e21f90c3a06008ff280bcb0c3286 Mon Sep 17 00:00:00 2001 From: akshatnema Date: Mon, 29 Jul 2024 22:47:02 +0530 Subject: [PATCH 05/14] minor tweaks for workflow --- .github/workflows/update-docs-in-website.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/update-docs-in-website.yml b/.github/workflows/update-docs-in-website.yml index 419cd571..da247b86 100644 --- a/.github/workflows/update-docs-in-website.yml +++ b/.github/workflows/update-docs-in-website.yml @@ -21,13 +21,13 @@ jobs: - name: Checkout Another repository uses: actions/checkout@v3 with: - repository: akshatnema/website + repository: asyncapi/website path: website token: ${{ env.GITHUB_TOKEN }} - name: Config git run: | - git config --global user.name akshatnema - git config --global user.email akshatnema.school@gmail.com + git config --global user.name asyncapi-bot + git config --global user.email info@asyncapi.io - name: Create branch working-directory: ./website run: | @@ -74,7 +74,7 @@ jobs: const newFullPath = path.join(folderPath, newFileName); await fs.rename(fullPath, newFullPath); - const newData = `---\ntitle: '${parentDirName}'\nweight: ${itemIndex}\n---\n\n`; + const newData = `---\ntitle: '${parentDirName.charAt(0).toUpperCase() + parentDirName.slice(1)}'\nweight: ${itemIndex}\n---\n\n`; let existingFileData = await fs.readFile(newFullPath, 'utf8'); existingFileData = existingFileData.replace(/ { From 2bdfa16ef3a6f711c7e753b4f5ad295ee652c87c Mon Sep 17 00:00:00 2001 From: akshatnema Date: Mon, 29 Jul 2024 22:50:43 +0530 Subject: [PATCH 06/14] updated br tag in docs --- ibmmq/README.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/ibmmq/README.md b/ibmmq/README.md index f79a6b88..2c538533 100644 --- a/ibmmq/README.md +++ b/ibmmq/README.md @@ -156,14 +156,14 @@ Field Name | Type | Description | Applicability [default] | Constraints ---|:---:|---|:---|:--- `destinationType` | string | Defines the type of AsyncAPI channel. | OPTIONAL [`topic`] | MUST be either `topic` or `queue`. For type `topic`, the AsyncAPI channel name MUST be assumed for the IBM MQ topic string unless overridden. `queue` | Map[string, any] | Defines the properties of a queue. | REQUIRED if `destinationType` = `queue` | `queue` and `topic` fields MUST NOT coexist within a channel binding -`queue.`
`objectName`
| string | Defines the name of the IBM MQ queue associated with the channel. | REQUIRED | A value MUST be specified. MUST NOT exceed 48 characters in length. MUST be a valid IBM MQ queue name -`queue.`
`isPartitioned`
| boolean | Defines if the queue is a cluster queue and therefore partitioned. If `true`, a binding option MAY be specified when accessing the queue. More information on binding options can be found on this [page](https://www.ibm.com/support/knowledgecenter/SSFKSJ_latest/com.ibm.mq.ref.dev.doc/q101870_.html#q101870___BIND_ON_OPEN) in the IBM MQ Knowledge Center. | OPTIONAL [`false`] | If `false`, binding options SHOULD NOT be specified when accessing the queue. -`queue.`
`exclusive`
| boolean | Specifies if it is recommended to open the queue exclusively. | OPTIONAL [`false`] | - +`queue.`
`objectName` | string | Defines the name of the IBM MQ queue associated with the channel. | REQUIRED | A value MUST be specified. MUST NOT exceed 48 characters in length. MUST be a valid IBM MQ queue name +`queue.`
`isPartitioned` | boolean | Defines if the queue is a cluster queue and therefore partitioned. If `true`, a binding option MAY be specified when accessing the queue. More information on binding options can be found on this [page](https://www.ibm.com/support/knowledgecenter/SSFKSJ_latest/com.ibm.mq.ref.dev.doc/q101870_.html#q101870___BIND_ON_OPEN) in the IBM MQ Knowledge Center. | OPTIONAL [`false`] | If `false`, binding options SHOULD NOT be specified when accessing the queue. +`queue.`
`exclusive` | boolean | Specifies if it is recommended to open the queue exclusively. | OPTIONAL [`false`] | - `topic` | Map[string, any] | Defines the properties of a topic. | OPTIONAL if `destinationType` = `topic` | `queue` and `topic` fields MUST NOT coexist within a channel binding. -`topic.`
`string`
| string | The value of the IBM MQ topic string to be used. | OPTIONAL *
Note: if specified, SHALL override AsyncAPI channel name.
* | MUST NOT exceed 10240 characters in length. MAY coexist with `topic.objectName` -`topic.`
`objectName`
| string | The name of the IBM MQ topic object. | OPTIONAL *
Note: if specified, SHALL override AsyncAPI channel name.
*| MUST NOT exceed 48 characters in length. MAY coexist with `topic.string` -`topic.`
`durablePermitted`
| boolean | Defines if the subscription may be durable. | OPTIONAL [`true`] | - -`topic.`
`lastMsgRetained`
| boolean | Defines if the last message published will be made available to new subscriptions. | OPTIONAL [`false`] | - +`topic.`
`string` | string | The value of the IBM MQ topic string to be used. | OPTIONAL *
Note: if specified, SHALL override AsyncAPI channel name.* | MUST NOT exceed 10240 characters in length. MAY coexist with `topic.objectName` +`topic.`
`objectName` | string | The name of the IBM MQ topic object. | OPTIONAL *
Note: if specified, SHALL override AsyncAPI channel name.*| MUST NOT exceed 48 characters in length. MAY coexist with `topic.string` +`topic.`
`durablePermitted` | boolean | Defines if the subscription may be durable. | OPTIONAL [`true`] | - +`topic.`
`lastMsgRetained` | boolean | Defines if the last message published will be made available to new subscriptions. | OPTIONAL [`false`] | - `maxMsgLength` | integer | The maximum length of the physical message (in bytes) accepted by the Topic or Queue. Messages produced that are greater in size than this value may fail to be delivered. More information on the maximum message length can be found on this [page](https://www.ibm.com/support/knowledgecenter/SSFKSJ_latest/com.ibm.mq.ref.adm.doc/q085520_.html#q085520___maxmsgl) in the IBM MQ Knowledge Center. | OPTIONAL [negotiated on IBM MQ channel]| MUST be `0-104,857,600` bytes (100 MB). `bindingVersion` | string | The version of this binding. | OPTIONAL [`latest`] | - From 0459e30fd39cb47c1278c984cf3614ec4d9d8005 Mon Sep 17 00:00:00 2001 From: akshatnema Date: Sun, 18 Aug 2024 20:21:36 +0530 Subject: [PATCH 07/14] Resolved errors for sqs and sns --- .github/workflows/update-docs-in-website.yml | 12 ++++++------ .idea/.gitignore | 8 ++++++++ .idea/bindings.iml | 9 +++++++++ .idea/misc.xml | 6 ++++++ .idea/modules.xml | 8 ++++++++ .idea/vcs.xml | 6 ++++++ sns/README.md | 12 ++++++------ sqs/README.md | 8 ++++---- 8 files changed, 53 insertions(+), 16 deletions(-) create mode 100644 .idea/.gitignore create mode 100644 .idea/bindings.iml create mode 100644 .idea/misc.xml create mode 100644 .idea/modules.xml create mode 100644 .idea/vcs.xml diff --git a/.github/workflows/update-docs-in-website.yml b/.github/workflows/update-docs-in-website.yml index da247b86..f2497af5 100644 --- a/.github/workflows/update-docs-in-website.yml +++ b/.github/workflows/update-docs-in-website.yml @@ -60,22 +60,22 @@ jobs: const rootPath = './bindings/'; let itemIndex = 10; - async function processMarkdownFiles(folderPath, isRoot = true) { - const items = await fs.readdir(folderPath, { withFileTypes: true }); + function processMarkdownFiles(folderPath, isRoot = true) { + const items = fs.readdirSync(folderPath, { withFileTypes: true }); for (const item of items) { const fullPath = path.join(folderPath, item.name); if (item.isDirectory()) { // Always process subdirectories, mark isRoot as false for recursive calls - await processMarkdownFiles(fullPath, false); + processMarkdownFiles(fullPath, false); } else if (item.name.endsWith('.md') && !isRoot) { // Skip root level .md files const baseName = path.basename(fullPath, '.md'); const parentDirName = path.basename(folderPath); const newFileName = `${parentDirName}.md`; const newFullPath = path.join(folderPath, newFileName); - await fs.rename(fullPath, newFullPath); + fs.renameSync(fullPath, newFullPath); const newData = `---\ntitle: '${parentDirName.charAt(0).toUpperCase() + parentDirName.slice(1)}'\nweight: ${itemIndex}\n---\n\n`; - let existingFileData = await fs.readFile(newFullPath, 'utf8'); + let existingFileData = fs.readFileSync(newFullPath, 'utf8'); existingFileData = existingFileData.replace(/ { // Remove './' prefix from src path and prepend '/img/docs/' @@ -84,7 +84,7 @@ jobs: }); const updatedContent = newData + existingFileData; - await fs.writeFile(newFullPath, updatedContent); + fs.writeFileSync(newFullPath, updatedContent); itemIndex++; } } diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 00000000..13566b81 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,8 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Editor-based HTTP Client requests +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git a/.idea/bindings.iml b/.idea/bindings.iml new file mode 100644 index 00000000..d6ebd480 --- /dev/null +++ b/.idea/bindings.iml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 00000000..639900d1 --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 00000000..94feaf5a --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 00000000..35eb1ddf --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/sns/README.md b/sns/README.md index 4ef43ec5..66146370 100644 --- a/sns/README.md +++ b/sns/README.md @@ -134,12 +134,12 @@ We support an array of consumers via the **consumers** field. This allows you to | `maxReceivesPerSecond` | integer | **Optional.** The maximum number of deliveries per second, per subscription | #### Identifier -|Field Name | Type | Description| -|---|:---:|---| -|`url` |string| **Optional.** The endpoint is a URL | -|`email` |string| **Optional.** The endpoint is an email address | -|`phone` |string| **Optional.** The endpoint is a phone number| -|`arn` |string| **Optional.** The target is an [ARN](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html). For example, for SQS, the identifier may be an ARN, which will be of the form: ["arn:aws:sqs:{region}:{account-id}:{queueName}"](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html)| +|Field Name | Type | Description | +|---|:---:|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +|`url` |string| **Optional.** The endpoint is a URL | +|`email` |string| **Optional.** The endpoint is an email address | +|`phone` |string| **Optional.** The endpoint is a phone number | +|`arn` |string| **Optional.** The target is an [ARN](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html). For example, for SQS, the identifier may be an ARN, which will be of the form: ["arn:aws:sqs:\{region}:\{account-id}:\{queueName}"](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) | |`name` |string| **Optional.** The endpoint is identified by a name, which corresponds to an identifying field called 'name' of a binding for that protocol on this **publish** Operation Object. For example, if the protocol is 'sqs' then the name refers to the name field **sqs** binding. We don't use $ref because we are referring, not including. | We provide an Identifer Object to support providing the identifier of an externally defined endpoint for this SNS *publication* to target, or an endpoint on another binding against this Operation Object (via the name field). diff --git a/sqs/README.md b/sqs/README.md index 5f8281ed..28bf1b18 100644 --- a/sqs/README.md +++ b/sqs/README.md @@ -59,10 +59,10 @@ An SQS queue can set up a Dead Letter Queue as part of a Redelivery Policy. To s | `tags` |Object | **Optional.** Key-value pairs that represent AWS tags on the queue. | #### Identifier -|Field Name | Type | Description| -|---|:---:|---| -|`arn` |string| **Optional.** The target is an [ARN](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html). For example, for SQS, the identifier may be an ARN, which will be of the form: ["arn:aws:sqs:{region}:{account-id}:{queueName}"](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html)| -|`name` |string| **Optional.** The endpoint is identified by a name, which corresponds to an identifying field called 'name' of a binding for that protocol on this **publish** Operation Object. For example, if the protocol is 'sqs' then the name refers to the name field **sqs** binding| +|Field Name | Type | Description | +|---|:---:|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +|`arn` |string| **Optional.** The target is an [ARN](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html). For example, for SQS, the identifier may be an ARN, which will be of the form: ["arn:aws:sqs:\{region}:\{account-id}:\{queueName}"](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) | +|`name` |string| **Optional.** The endpoint is identified by a name, which corresponds to an identifying field called 'name' of a binding for that protocol on this **publish** Operation Object. For example, if the protocol is 'sqs' then the name refers to the name field **sqs** binding | #### Policy |Field Name | Type | Description| From 4a066f64d1a2a1b5b5da3bc6f987c73fe426b135 Mon Sep 17 00:00:00 2001 From: akshatnema Date: Sun, 18 Aug 2024 20:23:04 +0530 Subject: [PATCH 08/14] removed .idea folder --- .idea/.gitignore | 8 -------- .idea/bindings.iml | 9 --------- .idea/misc.xml | 6 ------ .idea/modules.xml | 8 -------- .idea/vcs.xml | 6 ------ 5 files changed, 37 deletions(-) delete mode 100644 .idea/.gitignore delete mode 100644 .idea/bindings.iml delete mode 100644 .idea/misc.xml delete mode 100644 .idea/modules.xml delete mode 100644 .idea/vcs.xml diff --git a/.idea/.gitignore b/.idea/.gitignore deleted file mode 100644 index 13566b81..00000000 --- a/.idea/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -# Default ignored files -/shelf/ -/workspace.xml -# Editor-based HTTP Client requests -/httpRequests/ -# Datasource local storage ignored files -/dataSources/ -/dataSources.local.xml diff --git a/.idea/bindings.iml b/.idea/bindings.iml deleted file mode 100644 index d6ebd480..00000000 --- a/.idea/bindings.iml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml deleted file mode 100644 index 639900d1..00000000 --- a/.idea/misc.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml deleted file mode 100644 index 94feaf5a..00000000 --- a/.idea/modules.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml deleted file mode 100644 index 35eb1ddf..00000000 --- a/.idea/vcs.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file From b60de0709129bf73f761ab2d732803a46275161f Mon Sep 17 00:00:00 2001 From: akshatnema Date: Sun, 1 Sep 2024 00:25:31 +0530 Subject: [PATCH 09/14] updated workflow --- .github/workflows/update-docs-in-website.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/update-docs-in-website.yml b/.github/workflows/update-docs-in-website.yml index f2497af5..ecf3cf42 100644 --- a/.github/workflows/update-docs-in-website.yml +++ b/.github/workflows/update-docs-in-website.yml @@ -6,6 +6,7 @@ on: - master paths: - "**/*.md" + workflow_dispatch: jobs: Make-PR: @@ -55,7 +56,7 @@ jobs: uses: actions/github-script@v4 with: script: | - const fs = require('fs').promises; + const fs = require('fs'); const path = require('path'); const rootPath = './bindings/'; let itemIndex = 10; From 3b773a954512b40019a4f9e1c89d66d5570830b7 Mon Sep 17 00:00:00 2001 From: akshatnema Date: Sun, 1 Sep 2024 00:44:10 +0530 Subject: [PATCH 10/14] updated workflow --- .github/workflows/update-docs-in-website.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/update-docs-in-website.yml b/.github/workflows/update-docs-in-website.yml index ecf3cf42..0c930fbb 100644 --- a/.github/workflows/update-docs-in-website.yml +++ b/.github/workflows/update-docs-in-website.yml @@ -37,7 +37,7 @@ jobs: uses: actions/github-script@v4 with: script: | - const { writeFile } = require('fs').promises; + const { writeFile } = require('fs'); const configPath = './website/config/edit-page-config.json'; const checkSlug = 'reference/bindings/'; const slug = { From fc0ec93028773bd39e0afec72f74eb1555f63960 Mon Sep 17 00:00:00 2001 From: akshatnema Date: Sun, 1 Sep 2024 00:48:49 +0530 Subject: [PATCH 11/14] reverted previous change --- .github/workflows/update-docs-in-website.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/update-docs-in-website.yml b/.github/workflows/update-docs-in-website.yml index 0c930fbb..ecf3cf42 100644 --- a/.github/workflows/update-docs-in-website.yml +++ b/.github/workflows/update-docs-in-website.yml @@ -37,7 +37,7 @@ jobs: uses: actions/github-script@v4 with: script: | - const { writeFile } = require('fs'); + const { writeFile } = require('fs').promises; const configPath = './website/config/edit-page-config.json'; const checkSlug = 'reference/bindings/'; const slug = { From 02d730f5ce50c517d13eb5aed47f223f38835cb0 Mon Sep 17 00:00:00 2001 From: akshatnema Date: Mon, 9 Sep 2024 23:30:52 +0530 Subject: [PATCH 12/14] Added changes according to review --- .github/workflows/update-docs-in-website.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/update-docs-in-website.yml b/.github/workflows/update-docs-in-website.yml index ecf3cf42..c579f712 100644 --- a/.github/workflows/update-docs-in-website.yml +++ b/.github/workflows/update-docs-in-website.yml @@ -16,11 +16,11 @@ jobs: GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} steps: - name: Checkout Current repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: path: bindings - name: Checkout Another repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: repository: asyncapi/website path: website @@ -37,7 +37,7 @@ jobs: uses: actions/github-script@v4 with: script: | - const { writeFile } = require('fs').promises; + const { writeFile } = require('fs').promis; const configPath = './website/config/edit-page-config.json'; const checkSlug = 'reference/bindings/'; const slug = { @@ -75,7 +75,7 @@ jobs: const newFullPath = path.join(folderPath, newFileName); fs.renameSync(fullPath, newFullPath); - const newData = `---\ntitle: '${parentDirName.charAt(0).toUpperCase() + parentDirName.slice(1)}'\nweight: ${itemIndex}\n---\n\n`; + const newData = `---\ntitle: '${parentDirName}'\nweight: ${itemIndex}\n---\n\n`; let existingFileData = fs.readFileSync(newFullPath, 'utf8'); existingFileData = existingFileData.replace(/ { From 46060fa2172265919eb2ac9811b78f20dcd2e207 Mon Sep 17 00:00:00 2001 From: akshatnema Date: Thu, 12 Sep 2024 19:24:31 +0530 Subject: [PATCH 13/14] minor fixes --- .github/workflows/update-docs-in-website.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/update-docs-in-website.yml b/.github/workflows/update-docs-in-website.yml index c579f712..785ea943 100644 --- a/.github/workflows/update-docs-in-website.yml +++ b/.github/workflows/update-docs-in-website.yml @@ -37,7 +37,7 @@ jobs: uses: actions/github-script@v4 with: script: | - const { writeFile } = require('fs').promis; + const { writeFile } = require('fs').promises; const configPath = './website/config/edit-page-config.json'; const checkSlug = 'reference/bindings/'; const slug = { From e950b15798e46d6e29a2a63f21e26b11455a67ba Mon Sep 17 00:00:00 2001 From: Lukasz Gornicki Date: Mon, 16 Sep 2024 10:18:52 +0200 Subject: [PATCH 14/14] Update update-docs-in-website.yml --- .github/workflows/update-docs-in-website.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/update-docs-in-website.yml b/.github/workflows/update-docs-in-website.yml index 785ea943..43cd1fac 100644 --- a/.github/workflows/update-docs-in-website.yml +++ b/.github/workflows/update-docs-in-website.yml @@ -6,6 +6,7 @@ on: - master paths: - "**/*.md" + - ".github/workflows/update-docs-in-website.yml" workflow_dispatch: jobs: