diff --git a/packages/shorebird_code_push_protocol/lib/src/messages/create_app/create_app_request.dart b/packages/shorebird_code_push_protocol/lib/src/messages/create_app/create_app_request.dart index 0dc47f03..6113a069 100644 --- a/packages/shorebird_code_push_protocol/lib/src/messages/create_app/create_app_request.dart +++ b/packages/shorebird_code_push_protocol/lib/src/messages/create_app/create_app_request.dart @@ -10,7 +10,7 @@ class CreateAppRequest { /// {@macro create_app_request} const CreateAppRequest({ required this.displayName, - this.organizationId, + required this.organizationId, }); /// Converts a Map to a [CreateAppRequest] @@ -23,7 +23,6 @@ class CreateAppRequest { /// The display name of the app. final String displayName; - /// The id of organization that this app will belong to. If no id is provided, - /// this app will belong to the user's personal organization. - final int? organizationId; + /// The id of organization that this app will belong to. + final int organizationId; } diff --git a/packages/shorebird_code_push_protocol/lib/src/messages/create_app/create_app_request.g.dart b/packages/shorebird_code_push_protocol/lib/src/messages/create_app/create_app_request.g.dart index fd91e54c..e520f302 100644 --- a/packages/shorebird_code_push_protocol/lib/src/messages/create_app/create_app_request.g.dart +++ b/packages/shorebird_code_push_protocol/lib/src/messages/create_app/create_app_request.g.dart @@ -16,7 +16,7 @@ CreateAppRequest _$CreateAppRequestFromJson(Map json) => final val = CreateAppRequest( displayName: $checkedConvert('display_name', (v) => v as String), organizationId: - $checkedConvert('organization_id', (v) => (v as num?)?.toInt()), + $checkedConvert('organization_id', (v) => (v as num).toInt()), ); return val; }, diff --git a/packages/shorebird_code_push_protocol/test/src/messages/create_app/create_app_request_test.dart b/packages/shorebird_code_push_protocol/test/src/messages/create_app/create_app_request_test.dart index 0d733de0..14826efd 100644 --- a/packages/shorebird_code_push_protocol/test/src/messages/create_app/create_app_request_test.dart +++ b/packages/shorebird_code_push_protocol/test/src/messages/create_app/create_app_request_test.dart @@ -4,7 +4,10 @@ import 'package:test/test.dart'; void main() { group(CreateAppRequest, () { test('can be (de)serialized', () { - const request = CreateAppRequest(displayName: 'display_name'); + const request = CreateAppRequest( + displayName: 'display_name', + organizationId: 123, + ); expect( CreateAppRequest.fromJson(request.toJson()).toJson(), equals(request.toJson()),