-
Notifications
You must be signed in to change notification settings - Fork 583
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
feat(clients): codegen for structural hint documentation in commands #4573
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kuhe
force-pushed
the
feat/structural_hints
branch
2 times, most recently
from
March 24, 2023 16:22
52171f7
to
017dcfb
Compare
Edge case example DynamoDB: /**
* const input = {
* TransactItems: [ // required
* {
* ConditionCheck: {
* Key: { // required
* "<keys>": { // Union: only one key present
* S: "STRING_VALUE",
* N: "STRING_VALUE",
* B: "BLOB_VALUE",
* SS: [
* "STRING_VALUE",
* ],
* NS: [
* "STRING_VALUE",
* ],
* BS: [
* "BLOB_VALUE",
* ],
* M: {
* "<keys>": { // Union: only one key present
* S: "STRING_VALUE",
* N: "STRING_VALUE",
* B: "BLOB_VALUE",
* SS: [
* "STRING_VALUE",
* ],
* NS: [
* "STRING_VALUE",
* ],
* BS: [
* "BLOB_VALUE",
* ],
* M: {
* "<keys>": "<AttributeValue>"
* },
* L: [
* { // Union: only one key present
* S: "<AttributeValue>"
* N: "<AttributeValue>"
* B: "<AttributeValue>"
* SS: "<AttributeValue>"
* NS: "<AttributeValue>"
* BS: "<AttributeValue>"
* M: "<AttributeValue>"
* L: [
* { // Union: only one key present
* S: "<AttributeValue>"
* N: "<AttributeValue>"
* B: "<AttributeValue>"
* SS: "<AttributeValue>"
* NS: "<AttributeValue>"
* BS: "<AttributeValue>"
* M: "<AttributeValue>"
* L: "<AttributeValue>"
* NULL: true || false,
* BOOL: true || false,
* }
* ],
* NULL: true || false,
* BOOL: true || false,
* }
* ],
* NULL: "<AttributeValue>"
* BOOL: "<AttributeValue>"
* }
* },
* L: "<AttributeValue>"
* NULL: "<AttributeValue>"
* BOOL: "<AttributeValue>"
* }
* },
* TableName: "STRING_VALUE", // required
* ConditionExpression: "STRING_VALUE", // required
* ExpressionAttributeNames: {
* "<keys>": "STRING_VALUE",
* },
* ExpressionAttributeValues: {
* "<keys>": "<AttributeValue>"
* },
* ReturnValuesOnConditionCheckFailure: "ALL_OLD" || "NONE"
* }
* Put: {
* Item: { // required
* "<keys>": "<AttributeValue>"
* },
* TableName: "STRING_VALUE", // required
* ConditionExpression: "STRING_VALUE",
* ExpressionAttributeNames: {
* "<keys>": "STRING_VALUE",
* },
* ExpressionAttributeValues: {
* "<keys>": "<AttributeValue>"
* },
* ReturnValuesOnConditionCheckFailure: "ALL_OLD" || "NONE"
* }
* Delete: {
* Key: { // required
* "<keys>": "<AttributeValue>"
* },
* TableName: "STRING_VALUE", // required
* ConditionExpression: "STRING_VALUE",
* ExpressionAttributeNames: {
* "<keys>": "STRING_VALUE",
* },
* ExpressionAttributeValues: {
* "<keys>": "<AttributeValue>"
* },
* ReturnValuesOnConditionCheckFailure: "ALL_OLD" || "NONE"
* }
* Update: {
* Key: { // required
* "<keys>": "<AttributeValue>"
* },
* UpdateExpression: "STRING_VALUE", // required
* TableName: "STRING_VALUE", // required
* ConditionExpression: "STRING_VALUE",
* ExpressionAttributeNames: {
* "<keys>": "STRING_VALUE",
* },
* ExpressionAttributeValues: {
* "<keys>": "<AttributeValue>"
* },
* ReturnValuesOnConditionCheckFailure: "ALL_OLD" || "NONE"
* }
* }
* ],
* ReturnConsumedCapacity: "INDEXES" || "TOTAL" || "NONE"
* ReturnItemCollectionMetrics: "SIZE" || "NONE"
* ClientRequestToken: "STRING_VALUE",
* }
* */ |
kuhe
force-pushed
the
feat/structural_hints
branch
4 times, most recently
from
March 24, 2023 17:56
b6fc4c9
to
6d14f81
Compare
kuhe
force-pushed
the
feat/structural_hints
branch
from
March 24, 2023 19:52
6d14f81
to
145df02
Compare
MYoung25
approved these changes
Mar 24, 2023
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in this thread. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue
smithy-lang/smithy-typescript#723
Description
This adds structural hints to the input types of each command in the form of JSDoc.
Testing
code generation