Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add structural hint to command examples #723

Merged
merged 4 commits into from
Mar 24, 2023

Conversation

kuhe
Copy link
Contributor

@kuhe kuhe commented Mar 24, 2023

Generate a structural hint instead of only

const command = new StartQueryExecutionCommand(input);

for commands.

Example:

/**
 * const client = new AthenaClient(config);
 * const input = {
 *   QueryString: "STRING_VALUE", // required
 *   ClientRequestToken: "STRING_VALUE",
 *   QueryExecutionContext: {
 *     Database: "STRING_VALUE",
 *     Catalog: "STRING_VALUE",
 *   },
 *   ResultConfiguration: {
 *     OutputLocation: "STRING_VALUE",
 *     EncryptionConfiguration: {
 *       EncryptionOption: "SSE_S3" || "SSE_KMS" || "CSE_KMS", // required
 *       KmsKey: "STRING_VALUE",
 *     },
 *     ExpectedBucketOwner: "STRING_VALUE",
 *     AclConfiguration: {
 *       S3AclOption: "BUCKET_OWNER_FULL_CONTROL", // required
 *     },
 *   },
 *   WorkGroup: "STRING_VALUE",
 *   ExecutionParameters: [
 *     "STRING_VALUE",
 *   ],
 *   ResultReuseConfiguration: {
 *     ResultReuseByAgeConfiguration: {
 *       Enabled: true || false, // required
 *       MaxAgeInMinutes: Number('int'),
 *     },
 *   },
 * };
 * const command = new StartQueryExecutionCommand(input);
 * const response = await client.send(command);
 */

Additional examples diffing the protocol tests for JSv3 can be found in the first commit of aws/aws-sdk-js-v3#4573

@kuhe kuhe force-pushed the feat/structural_hints branch 4 times, most recently from e77c271 to dc78570 Compare March 24, 2023 16:04
@kuhe kuhe force-pushed the feat/structural_hints branch from dc78570 to e591af1 Compare March 24, 2023 16:11
@kuhe kuhe force-pushed the feat/structural_hints branch from e591af1 to 0ac2c72 Compare March 24, 2023 16:57
@kuhe kuhe marked this pull request as ready for review March 24, 2023 16:58
@kuhe kuhe requested review from a team as code owners March 24, 2023 16:58
@syall
Copy link
Contributor

syall commented Mar 24, 2023

From the example in the PR description, it looks like commas are missing.

@kuhe kuhe force-pushed the feat/structural_hints branch 3 times, most recently from d931f0e to 22033c1 Compare March 24, 2023 17:26
@kuhe kuhe force-pushed the feat/structural_hints branch from 22033c1 to aff5e13 Compare March 24, 2023 17:35
Copy link
Contributor

@syall syall left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great!

Could be refactored to use SimpleCodeWriter for templating and indenting, but not a blocker for this PR.

@kuhe kuhe merged commit 02ceef1 into smithy-lang:main Mar 24, 2023
@kuhe kuhe deleted the feat/structural_hints branch March 24, 2023 20:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants