aws-cli
aws-cli copied to clipboard
Replace Argument string with Enum.
Initially, we were using string literals to represent different argument types such as 'JSON', 'document', 'streaming blob', and 'tagged union structure'. This approach can lead to potential issues such as typos and inconsistencies, and it makes code harder to maintain. To improve this, I replaced these string literals with an Enum class, providing a single source of truth for the argument types, reducing the chance of errors and making code more maintainable. If we need to add, remove, or change argument types in the future, we can do it in one place, and the changes will propagate throughout the code.