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

Change type of version parameter in AwsCognitoEvent from number to string #19

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion data/cognito_event.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": 1,
"version": "1",
"triggerSource": "CustomMessage_SignUp/CustomMessage_ResendCode/CustomMessage_ForgotPassword/CustomMessage_VerifyUserAttribute",
"region": "eu-west-1",
"userPoolId": "1234567",
Expand Down
2 changes: 1 addition & 1 deletion lib/events/cognito_event.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ part 'cognito_event.g.dart';
@JsonSerializable()
class AwsCognitoEvent {
@JsonKey()
final int version;
final String version;

@JsonKey()
final String triggerSource;
Expand Down
2 changes: 1 addition & 1 deletion lib/events/cognito_event.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion test/cognito_event_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ void main() {
test("json got parsed and creates an event", () async {
final event = AwsCognitoEvent.fromJson(json);

expect(event.version, equals(1));
expect(event.version, equals("1"));
expect(event.userPoolId, equals("1234567"));
expect(event.userName, equals("foo"));
expect(event.response.smsMessage, equals("foo"));
Expand Down