diff --git a/packages/shorebird_code_push_protocol/lib/src/messages/create_channel/create_channel_request.dart b/packages/shorebird_code_push_protocol/lib/src/messages/create_channel/create_channel_request.dart index 1dea9e0b..52e973d9 100644 --- a/packages/shorebird_code_push_protocol/lib/src/messages/create_channel/create_channel_request.dart +++ b/packages/shorebird_code_push_protocol/lib/src/messages/create_channel/create_channel_request.dart @@ -3,12 +3,12 @@ import 'package:json_annotation/json_annotation.dart'; part 'create_channel_request.g.dart'; /// {@template create_channel_request} -/// The request body for POST /api/v1/channels +/// The request body for POST /api/v1/apps//channels /// {@endtemplate} @JsonSerializable() class CreateChannelRequest { /// {@macro create_channel_request} - const CreateChannelRequest({required this.appId, required this.channel}); + const CreateChannelRequest({required this.channel}); /// Converts a Map to a [CreateChannelRequest] factory CreateChannelRequest.fromJson(Map json) => @@ -17,9 +17,6 @@ class CreateChannelRequest { /// Converts a [CreateChannelRequest] to a Map Map toJson() => _$CreateChannelRequestToJson(this); - /// The ID of the app. - final String appId; - /// The channel name. final String channel; } diff --git a/packages/shorebird_code_push_protocol/lib/src/messages/create_channel/create_channel_request.g.dart b/packages/shorebird_code_push_protocol/lib/src/messages/create_channel/create_channel_request.g.dart index 0adfdeba..371ff5e7 100644 --- a/packages/shorebird_code_push_protocol/lib/src/messages/create_channel/create_channel_request.g.dart +++ b/packages/shorebird_code_push_protocol/lib/src/messages/create_channel/create_channel_request.g.dart @@ -15,17 +15,14 @@ CreateChannelRequest _$CreateChannelRequestFromJson( json, ($checkedConvert) { final val = CreateChannelRequest( - appId: $checkedConvert('app_id', (v) => v as String), channel: $checkedConvert('channel', (v) => v as String), ); return val; }, - fieldKeyMap: const {'appId': 'app_id'}, ); Map _$CreateChannelRequestToJson( CreateChannelRequest instance) => { - 'app_id': instance.appId, 'channel': instance.channel, }; diff --git a/packages/shorebird_code_push_protocol/test/src/messages/create_channel/create_channel_request_test.dart b/packages/shorebird_code_push_protocol/test/src/messages/create_channel/create_channel_request_test.dart index 11ff33e0..97f8d54f 100644 --- a/packages/shorebird_code_push_protocol/test/src/messages/create_channel/create_channel_request_test.dart +++ b/packages/shorebird_code_push_protocol/test/src/messages/create_channel/create_channel_request_test.dart @@ -4,10 +4,7 @@ import 'package:test/test.dart'; void main() { group(CreateChannelRequest, () { test('can be (de)serialized', () { - const request = CreateChannelRequest( - appId: 'my_app', - channel: 'my_channel', - ); + const request = CreateChannelRequest(channel: 'my_channel'); expect( CreateChannelRequest.fromJson(request.toJson()).toJson(), equals(request.toJson()),