Skip to content

Docs: Fix documentation error: dataKeywordArgument should be replaced by dataIndexArgument use case or removed to avoid confusion #4533

@guillemcomerma

Description

@guillemcomerma

What were you searching in the docs?

While reading the official Idempotency documentation I realised the use of dataIndexArgument. However, when navigating the codebase in my editor I encountered dataKeywordArgument being presented in this section which is not listed as an option in ItempotentFunctionOptionssource

Is this related to an existing documentation section?

* dataKeywordArgument: 'transactionId', // keyword argument to hash the payload and the result

How can we improve?

The current docs show:

dataKeywordArgument: 'transactionId', 

And this parameter does not exist.
IDE error

Argument of type '{ persistenceStore: DynamoDBPersistenceLayer; config: IdempotencyConfig; dataKeywordArgument: any; }' is not assignable to parameter of type 'ItempotentFunctionOptions<Parameters<T>>'.ts(2345)
No value exists in scope for the shorthand property 'dataKeywordArgument'. Either declare one or provide an initializer.

Also there is a left-over trace that should be removed and is currently unused

Got a suggestion in mind?

Documentation could be updated to:

dataIndexArgument: 0, // Uses first function argument

or simply removed the non-existing dataKeywordArgument reference to avoid confusion.
I believe keyword access can be achieved using eventKeyJmesPath instead.

Acknowledgment

  • I understand the final update might be different from my proposed suggestion, or refused.

Metadata

Metadata

Labels

confirmedThe scope is clear, ready for implementationdocumentationImprovements or additions to documentationgood-first-issueSomething that is suitable for those who want to start contributinghelp-wantedWe would really appreciate some support from community for this oneidempotencyThis item relates to the Idempotency Utility

Type

No type

Projects

Status

Coming soon

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions