Files
awesome-reviewers/_reviewers/aws-sdk-js-document-apis-thoroughly.json
2025-07-03 10:48:16 +03:00

134 lines
12 KiB
JSON

[
{
"discussion_id": "42285305",
"pr_number": 707,
"pr_file": "lib/config.js",
"created_at": "2015-10-16T20:17:20+00:00",
"commented_code": "convertResponseTypes: true,\n dynamoDbCrc32: true,\n systemClockOffset: 0,\n signatureVersion: null\n signatureVersion: null,\n signatureCache: true",
"repo_full_name": "aws/aws-sdk-js",
"discussion_comments": [
{
"comment_id": "42285305",
"repo_full_name": "aws/aws-sdk-js",
"pr_number": 707,
"pr_file": "lib/config.js",
"discussion_id": "42285305",
"commented_code": "@@ -390,7 +390,8 @@ AWS.Config = AWS.util.inherit({\n convertResponseTypes: true,\n dynamoDbCrc32: true,\n systemClockOffset: 0,\n- signatureVersion: null\n+ signatureVersion: null,\n+ signatureCache: true",
"comment_created_at": "2015-10-16T20:17:20+00:00",
"comment_author": "chrisradek",
"comment_body": "Would you mind adding some docs around this new config parameter?\nSomething like this at line 98:\n\n```\n * @!attribute signatureCache\n * @return [Boolean] whether the signature to sign requests with (overriding\n * the API configuration) is cached. Only applies to the signature version 'v4'.\n * Defaults to `true`.\n```\n\nand something like this at line 185:\n\n```\n * @option options signatureCache [Boolean] whether the signature to sign\n * requests with (overriding the API configuration) is cached. Only applies\n * to the signature version 'v4'. Defaults to `true`.\n```\n",
"pr_file_module": null
}
]
},
{
"discussion_id": "107561314",
"pr_number": 1425,
"pr_file": "lib/s3/managed_upload.js",
"created_at": "2017-03-22T23:56:11+00:00",
"commented_code": "* failures manually.\n * @option options service [AWS.S3] an optional S3 service object to use for\n * requests. This object might have bound parameters used by the uploader.\n * @option options tags [Array<map>] The tags to apply to the uploaded object.\n * Each tag should have a `Key` and `Value` keys.",
"repo_full_name": "aws/aws-sdk-js",
"discussion_comments": [
{
"comment_id": "107561314",
"repo_full_name": "aws/aws-sdk-js",
"pr_number": 1425,
"pr_file": "lib/s3/managed_upload.js",
"discussion_id": "107561314",
"commented_code": "@@ -60,6 +60,8 @@ AWS.S3.ManagedUpload = AWS.util.inherit({\n * failures manually.\n * @option options service [AWS.S3] an optional S3 service object to use for\n * requests. This object might have bound parameters used by the uploader.\n+ * @option options tags [Array<map>] The tags to apply to the uploaded object.\n+ * Each tag should have a `Key` and `Value` keys.",
"comment_created_at": "2017-03-22T23:56:11+00:00",
"comment_author": "chrisradek",
"comment_body": "Minor: Might be worth adding an example that uses tags.",
"pr_file_module": null
}
]
},
{
"discussion_id": "229467137",
"pr_number": 2253,
"pr_file": "lib/discover_endpoint.js",
"created_at": "2018-10-30T20:10:18+00:00",
"commented_code": "var AWS = require('./core');\nvar util = require('./util');\nvar ENDPOINT_OPERATION_MAX_RETRIES = 60;\nvar endpointDiscoveryEnabledEnv = 'AWS_ENABLE_ENDPOINT_DISCOVERY';\n\n/**\n * Generate key to index the endpoints in the cache\n * @return [map<String,String>] object with keys to index endpoints.\n * @api private\n */\nfunction getCacheKey(request) {\n var service = request.service;\n var api = service.api || {};\n var operations = api.operations;\n var identifiers = {};\n if (operations[request.operation] && operations[request.operation].name) {\n identifiers.operation = operations[request.operation].name;\n }\n if (service.config.region) {\n identifiers.region = service.config.region;\n }\n if (api.serviceId) {\n identifiers.serviceId = api.serviceId\n }\n if (service.config.credentials.accessKeyId) {\n identifiers.accessKeyId = service.config.credentials.accessKeyId\n }\n return identifiers;\n}\n\n/**\n * @api private",
"repo_full_name": "aws/aws-sdk-js",
"discussion_comments": [
{
"comment_id": "229467137",
"repo_full_name": "aws/aws-sdk-js",
"pr_number": 2253,
"pr_file": "lib/discover_endpoint.js",
"discussion_id": "229467137",
"commented_code": "@@ -0,0 +1,340 @@\n+var AWS = require('./core');\n+var util = require('./util');\n+var ENDPOINT_OPERATION_MAX_RETRIES = 60;\n+var endpointDiscoveryEnabledEnv = 'AWS_ENABLE_ENDPOINT_DISCOVERY';\n+\n+/**\n+ * Generate key to index the endpoints in the cache\n+ * @return [map<String,String>] object with keys to index endpoints.\n+ * @api private\n+ */\n+function getCacheKey(request) {\n+ var service = request.service;\n+ var api = service.api || {};\n+ var operations = api.operations;\n+ var identifiers = {};\n+ if (operations[request.operation] && operations[request.operation].name) {\n+ identifiers.operation = operations[request.operation].name;\n+ }\n+ if (service.config.region) {\n+ identifiers.region = service.config.region;\n+ }\n+ if (api.serviceId) {\n+ identifiers.serviceId = api.serviceId\n+ }\n+ if (service.config.credentials.accessKeyId) {\n+ identifiers.accessKeyId = service.config.credentials.accessKeyId\n+ }\n+ return identifiers;\n+}\n+\n+/**\n+ * @api private",
"comment_created_at": "2018-10-30T20:10:18+00:00",
"comment_author": "chrisradek",
"comment_body": "Can you add a comment that explains what this function is supposed to do? It looks like you're populating an object with identifiers and customer-provided values, but it took me a while to grok that and the function name isn't clear. ",
"pr_file_module": null
}
]
},
{
"discussion_id": "229470362",
"pr_number": 2253,
"pr_file": "lib/discover_endpoint.js",
"created_at": "2018-10-30T20:19:55+00:00",
"commented_code": "var AWS = require('./core');\nvar util = require('./util');\nvar ENDPOINT_OPERATION_MAX_RETRIES = 60;\nvar endpointDiscoveryEnabledEnv = 'AWS_ENABLE_ENDPOINT_DISCOVERY';\n\n/**\n * Generate key to index the endpoints in the cache\n * @return [map<String,String>] object with keys to index endpoints.\n * @api private\n */\nfunction getCacheKey(request) {\n var service = request.service;\n var api = service.api || {};\n var operations = api.operations;\n var identifiers = {};\n if (operations[request.operation] && operations[request.operation].name) {\n identifiers.operation = operations[request.operation].name;\n }\n if (service.config.region) {\n identifiers.region = service.config.region;\n }\n if (api.serviceId) {\n identifiers.serviceId = api.serviceId\n }\n if (service.config.credentials.accessKeyId) {\n identifiers.accessKeyId = service.config.credentials.accessKeyId\n }\n return identifiers;\n}\n\n/**\n * @api private\n */\nfunction marshallCustomIdentifiersHelper(result, params, shape) {\n if (!shape || params === undefined || params === null) return;\n if (shape.type === 'structure' && shape.required && shape.required.length > 0) {\n util.arrayEach(shape.required, function(name) {\n var memberShape = shape.members[name];\n if (memberShape.endpointDiscoveryId === true) {\n var locationName = memberShape.isLocationName ? memberShape.name : name;\n result[locationName] = String(params[name]);\n } else {\n marshallCustomIdentifiersHelper(result, params[name], memberShape);\n }\n });\n }\n}\n\n/**\n * Get customized cache key according to the 'endpointDiscoveryId' trait.",
"repo_full_name": "aws/aws-sdk-js",
"discussion_comments": [
{
"comment_id": "229470362",
"repo_full_name": "aws/aws-sdk-js",
"pr_number": 2253,
"pr_file": "lib/discover_endpoint.js",
"discussion_id": "229470362",
"commented_code": "@@ -0,0 +1,340 @@\n+var AWS = require('./core');\n+var util = require('./util');\n+var ENDPOINT_OPERATION_MAX_RETRIES = 60;\n+var endpointDiscoveryEnabledEnv = 'AWS_ENABLE_ENDPOINT_DISCOVERY';\n+\n+/**\n+ * Generate key to index the endpoints in the cache\n+ * @return [map<String,String>] object with keys to index endpoints.\n+ * @api private\n+ */\n+function getCacheKey(request) {\n+ var service = request.service;\n+ var api = service.api || {};\n+ var operations = api.operations;\n+ var identifiers = {};\n+ if (operations[request.operation] && operations[request.operation].name) {\n+ identifiers.operation = operations[request.operation].name;\n+ }\n+ if (service.config.region) {\n+ identifiers.region = service.config.region;\n+ }\n+ if (api.serviceId) {\n+ identifiers.serviceId = api.serviceId\n+ }\n+ if (service.config.credentials.accessKeyId) {\n+ identifiers.accessKeyId = service.config.credentials.accessKeyId\n+ }\n+ return identifiers;\n+}\n+\n+/**\n+ * @api private\n+ */\n+function marshallCustomIdentifiersHelper(result, params, shape) {\n+ if (!shape || params === undefined || params === null) return;\n+ if (shape.type === 'structure' && shape.required && shape.required.length > 0) {\n+ util.arrayEach(shape.required, function(name) {\n+ var memberShape = shape.members[name];\n+ if (memberShape.endpointDiscoveryId === true) {\n+ var locationName = memberShape.isLocationName ? memberShape.name : name;\n+ result[locationName] = String(params[name]);\n+ } else {\n+ marshallCustomIdentifiersHelper(result, params[name], memberShape);\n+ }\n+ });\n+ }\n+}\n+\n+/**\n+ * Get customized cache key according to the 'endpointDiscoveryId' trait.",
"comment_created_at": "2018-10-30T20:19:55+00:00",
"comment_author": "chrisradek",
"comment_body": "I think this comment is a bit misleading, as is the one for `getCacheKey`. Both imply that you're going to get a single `key` (presumably a string), but you're returning a map. I think something like the following is more clear: \r\n```javascript\r\n/**\r\n * Get custom identifiers for cache key.\r\n * Identifies custom identifiers by checking each shape's `endpointDiscoveryId` trait.\r\n */\r\n```\r\nThis would at least help me, because I kept expecting `cacheKey` later on to be a string you pass to `endpointCache.get`, but it turns out you pass in a map of elements.",
"pr_file_module": null
}
]
},
{
"discussion_id": "223489992",
"pr_number": 2283,
"pr_file": "lib/shared-ini/ini-loader.js",
"created_at": "2018-10-08T20:37:17+00:00",
"commented_code": "var AWS = require('../core');\nvar os = require('os');\nvar path = require('path');\n\nmodule.exports = AWS.util.inherit({",
"repo_full_name": "aws/aws-sdk-js",
"discussion_comments": [
{
"comment_id": "223489992",
"repo_full_name": "aws/aws-sdk-js",
"pr_number": 2283,
"pr_file": "lib/shared-ini/ini-loader.js",
"discussion_id": "223489992",
"commented_code": "@@ -0,0 +1,70 @@\n+var AWS = require('../core');\n+var os = require('os');\n+var path = require('path');\n+\n+module.exports = AWS.util.inherit({",
"comment_created_at": "2018-10-08T20:37:17+00:00",
"comment_author": "chrisradek",
"comment_body": "If you want this to appear in documentation, you also need to attach IniLoader to the AWS namespace:\r\n```javascript\r\nAWS.IniLoader = AWS.util.inherit/* ... */\r\n\r\n// optionally also export it:\r\nmodule.exports = AWS.IniLoader;\r\n```\r\n\r\nYou'll also want to add doc strings to the public methods.",
"pr_file_module": null
}
]
},
{
"discussion_id": "138403541",
"pr_number": 1711,
"pr_file": "lib/services/s3.js",
"created_at": "2017-09-12T16:40:41+00:00",
"commented_code": "}\n },\n\n /**\n * @!method getSignedUrlPromise()\n * Returns a 'thenable' promise.",
"repo_full_name": "aws/aws-sdk-js",
"discussion_comments": [
{
"comment_id": "138403541",
"repo_full_name": "aws/aws-sdk-js",
"pr_number": 1711,
"pr_file": "lib/services/s3.js",
"discussion_id": "138403541",
"commented_code": "@@ -782,6 +782,52 @@ AWS.util.update(AWS.S3.prototype, {\n }\n },\n \n+ /**\n+ * @!method getSignedUrlPromise()\n+ * Returns a 'thenable' promise.",
"comment_created_at": "2017-09-12T16:40:41+00:00",
"comment_author": "chrisradek",
"comment_body": "Can you amend this to state a URL will be returned?\r\n\r\nSomething like:\r\n\r\n> Returns a 'thenable' promise that will be resolved with a pre-signed URL.",
"pr_file_module": null
}
]
}
]