Skip to content

Commit

Permalink
Resolved errors for sqs and sns
Browse files Browse the repository at this point in the history
  • Loading branch information
akshatnema committed Aug 18, 2024
1 parent 2bdfa16 commit 0459e30
Show file tree
Hide file tree
Showing 8 changed files with 53 additions and 16 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/update-docs-in-website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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(/<img\s+src="(?!http)(.*?)"/g, (match, src) => {
// Remove './' prefix from src path and prepend '/img/docs/'
Expand All @@ -84,7 +84,7 @@ jobs:
});
const updatedContent = newData + existingFileData;
await fs.writeFile(newFullPath, updatedContent);
fs.writeFileSync(newFullPath, updatedContent);
itemIndex++;
}
}
Expand Down
8 changes: 8 additions & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions .idea/bindings.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions sns/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,12 +134,12 @@ We support an array of consumers via the **consumers** field. This allows you to
| <a name="channelBindingDeliveryPolicyObjectMaxReceivesPerSecond"></a>`maxReceivesPerSecond` | integer | **Optional.** The maximum number of deliveries per second, per subscription |

#### Identifier
|Field Name | Type | Description|
|---|:---:|---|
|<a name="identifierObjectUrl"></a>`url` |string| **Optional.** The endpoint is a URL |
|<a name="identifierObjectEmail"></a>`email` |string| **Optional.** The endpoint is an email address |
|<a name="identifierObjectPhone"></a>`phone` |string| **Optional.** The endpoint is a phone number|
|<a name="identifierObjectArn"></a>`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 |
|---|:---:|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|<a name="identifierObjectUrl"></a>`url` |string| **Optional.** The endpoint is a URL |
|<a name="identifierObjectEmail"></a>`email` |string| **Optional.** The endpoint is an email address |
|<a name="identifierObjectPhone"></a>`phone` |string| **Optional.** The endpoint is a phone number |
|<a name="identifierObjectArn"></a>`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) |
|<a name="identifierObjectName"></a>`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).
Expand Down
8 changes: 4 additions & 4 deletions sqs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,10 @@ An SQS queue can set up a Dead Letter Queue as part of a Redelivery Policy. To s
| <a name="queueObjectTags"></a>`tags` |Object | **Optional.** Key-value pairs that represent AWS tags on the queue. |

#### Identifier
|Field Name | Type | Description|
|---|:---:|---|
|<a name="identifierObjectArn"></a>`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)|
|<a name="identifierObjectName"></a>`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 |
|---|:---:|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|<a name="identifierObjectArn"></a>`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) |
|<a name="identifierObjectName"></a>`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|
Expand Down

0 comments on commit 0459e30

Please sign in to comment.