diff --git a/packages/shorebird_code_push_protocol/analysis_options.yaml b/packages/shorebird_code_push_protocol/analysis_options.yaml index 9491cf35..9493204b 100644 --- a/packages/shorebird_code_push_protocol/analysis_options.yaml +++ b/packages/shorebird_code_push_protocol/analysis_options.yaml @@ -1,4 +1,4 @@ -include: package:very_good_analysis/analysis_options.5.1.0.yaml +include: package:very_good_analysis/analysis_options.7.0.0.yaml analyzer: exclude: - build/** diff --git a/packages/shorebird_code_push_protocol/lib/shorebird_code_push_protocol.dart b/packages/shorebird_code_push_protocol/lib/shorebird_code_push_protocol.dart index 25b78206..4a6d7934 100644 --- a/packages/shorebird_code_push_protocol/lib/shorebird_code_push_protocol.dart +++ b/packages/shorebird_code_push_protocol/lib/shorebird_code_push_protocol.dart @@ -1,6 +1,3 @@ -/// The Shorebird CodePush Protocol -library shorebird_code_push_protocol; - export 'src/messages/messages.dart'; export 'src/models/models.dart'; 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 6113a069..96ea66aa 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 @@ -13,11 +13,11 @@ class CreateAppRequest { required this.organizationId, }); - /// Converts a Map to a [CreateAppRequest] + /// Converts a `Map` to a [CreateAppRequest] factory CreateAppRequest.fromJson(Map json) => _$CreateAppRequestFromJson(json); - /// Converts a [CreateAppRequest] to a Map + /// Converts a [CreateAppRequest] to a `Map` Map toJson() => _$CreateAppRequestToJson(this); /// The display name of the app. diff --git a/packages/shorebird_code_push_protocol/lib/src/messages/create_app_collaborator/create_app_collaborator_request.dart b/packages/shorebird_code_push_protocol/lib/src/messages/create_app_collaborator/create_app_collaborator_request.dart index adc67ae4..5c3ab75e 100644 --- a/packages/shorebird_code_push_protocol/lib/src/messages/create_app_collaborator/create_app_collaborator_request.dart +++ b/packages/shorebird_code_push_protocol/lib/src/messages/create_app_collaborator/create_app_collaborator_request.dart @@ -3,18 +3,18 @@ import 'package:json_annotation/json_annotation.dart'; part 'create_app_collaborator_request.g.dart'; /// {@template create_app_collaborator_request} -/// The request body for POST /api/v1/apps//collaborators +/// The request body for POST /api/v1/apps/:id/collaborators /// {@endtemplate} @JsonSerializable() class CreateAppCollaboratorRequest { /// {@macro create_app_collaborator_request} const CreateAppCollaboratorRequest({required this.email}); - /// Converts a Map to a [CreateAppCollaboratorRequest] + /// Converts a `Map` to a [CreateAppCollaboratorRequest] factory CreateAppCollaboratorRequest.fromJson(Map json) => _$CreateAppCollaboratorRequestFromJson(json); - /// Converts a [CreateAppCollaboratorRequest] to a Map + /// Converts a [CreateAppCollaboratorRequest] to a `Map` Map toJson() => _$CreateAppCollaboratorRequestToJson(this); /// The email of the collaborator to add. 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 52e973d9..8924b2c8 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,18 +3,18 @@ import 'package:json_annotation/json_annotation.dart'; part 'create_channel_request.g.dart'; /// {@template create_channel_request} -/// The request body for POST /api/v1/apps//channels +/// The request body for POST /api/v1/apps/:appId/channels /// {@endtemplate} @JsonSerializable() class CreateChannelRequest { /// {@macro create_channel_request} const CreateChannelRequest({required this.channel}); - /// Converts a Map to a [CreateChannelRequest] + /// Converts a `Map` to a [CreateChannelRequest] factory CreateChannelRequest.fromJson(Map json) => _$CreateChannelRequestFromJson(json); - /// Converts a [CreateChannelRequest] to a Map + /// Converts a [CreateChannelRequest] to a `Map` Map toJson() => _$CreateChannelRequestToJson(this); /// The channel name. diff --git a/packages/shorebird_code_push_protocol/lib/src/messages/create_patch/create_patch_request.dart b/packages/shorebird_code_push_protocol/lib/src/messages/create_patch/create_patch_request.dart index e48eeeed..22921bcd 100644 --- a/packages/shorebird_code_push_protocol/lib/src/messages/create_patch/create_patch_request.dart +++ b/packages/shorebird_code_push_protocol/lib/src/messages/create_patch/create_patch_request.dart @@ -14,11 +14,11 @@ class CreatePatchRequest { required this.metadata, }); - /// Converts a Map to a [CreatePatchRequest] + /// Converts a `Map` to a [CreatePatchRequest] factory CreatePatchRequest.fromJson(Map json) => _$CreatePatchRequestFromJson(json); - /// Converts a [CreatePatchRequest] to a Map + /// Converts a [CreatePatchRequest] to a `Map` Map toJson() => _$CreatePatchRequestToJson(this); /// The ID of the release. diff --git a/packages/shorebird_code_push_protocol/lib/src/messages/create_patch/create_patch_response.dart b/packages/shorebird_code_push_protocol/lib/src/messages/create_patch/create_patch_response.dart index f8bab873..2dbf374d 100644 --- a/packages/shorebird_code_push_protocol/lib/src/messages/create_patch/create_patch_response.dart +++ b/packages/shorebird_code_push_protocol/lib/src/messages/create_patch/create_patch_response.dart @@ -10,11 +10,11 @@ class CreatePatchResponse { /// {@macro create_patch_response} const CreatePatchResponse({required this.id, required this.number}); - /// Converts a Map to a [CreatePatchResponse] + /// Converts a `Map` to a [CreatePatchResponse] factory CreatePatchResponse.fromJson(Map json) => _$CreatePatchResponseFromJson(json); - /// Converts a [CreatePatchResponse] to a Map + /// Converts a [CreatePatchResponse] to a `Map` Map toJson() => _$CreatePatchResponseToJson(this); /// The unique patch identifier. diff --git a/packages/shorebird_code_push_protocol/lib/src/messages/create_patch_artifact/create_patch_artifact_request.dart b/packages/shorebird_code_push_protocol/lib/src/messages/create_patch_artifact/create_patch_artifact_request.dart index b94480e4..cfb9b59c 100644 --- a/packages/shorebird_code_push_protocol/lib/src/messages/create_patch_artifact/create_patch_artifact_request.dart +++ b/packages/shorebird_code_push_protocol/lib/src/messages/create_patch_artifact/create_patch_artifact_request.dart @@ -4,7 +4,7 @@ import 'package:shorebird_code_push_protocol/shorebird_code_push_protocol.dart'; part 'create_patch_artifact_request.g.dart'; /// {@template create_patch_artifact_request} -/// The request body for POST /api/v1/patches//artifacts +/// The request body for POST /api/v1/patches/:id/artifacts /// {@endtemplate} @JsonSerializable() class CreatePatchArtifactRequest { @@ -18,11 +18,11 @@ class CreatePatchArtifactRequest { this.podfileLockHash, }); - /// Converts a Map to a [CreatePatchArtifactRequest] + /// Converts a `Map` to a [CreatePatchArtifactRequest] factory CreatePatchArtifactRequest.fromJson(Map json) => _$CreatePatchArtifactRequestFromJson(json); - /// Converts a [CreatePatchArtifactRequest] to a Map. + /// Converts a [CreatePatchArtifactRequest] to a `Map`. Json toJson() => _$CreatePatchArtifactRequestToJson(this); /// The arch of the artifact. diff --git a/packages/shorebird_code_push_protocol/lib/src/messages/create_patch_artifact/create_patch_artifact_response.dart b/packages/shorebird_code_push_protocol/lib/src/messages/create_patch_artifact/create_patch_artifact_response.dart index ccf665aa..a2ae8194 100644 --- a/packages/shorebird_code_push_protocol/lib/src/messages/create_patch_artifact/create_patch_artifact_response.dart +++ b/packages/shorebird_code_push_protocol/lib/src/messages/create_patch_artifact/create_patch_artifact_response.dart @@ -4,7 +4,7 @@ import 'package:shorebird_code_push_protocol/shorebird_code_push_protocol.dart'; part 'create_patch_artifact_response.g.dart'; /// {@template create_patch_artifact_response} -/// The response body for POST /api/v1/patches//artifacts +/// The response body for POST /api/v1/patches/:id/artifacts /// {@endtemplate} @JsonSerializable() class CreatePatchArtifactResponse { @@ -19,11 +19,11 @@ class CreatePatchArtifactResponse { required this.url, }); - /// Converts a Map to a [CreatePatchArtifactResponse] + /// Converts a `Map` to a [CreatePatchArtifactResponse] factory CreatePatchArtifactResponse.fromJson(Map json) => _$CreatePatchArtifactResponseFromJson(json); - /// Converts a [CreatePatchArtifactResponse] to a Map. + /// Converts a [CreatePatchArtifactResponse] to a `Map`. Json toJson() => _$CreatePatchArtifactResponseToJson(this); /// The ID of the artifact; diff --git a/packages/shorebird_code_push_protocol/lib/src/messages/create_release/create_release_request.dart b/packages/shorebird_code_push_protocol/lib/src/messages/create_release/create_release_request.dart index c55cb162..5ce72217 100644 --- a/packages/shorebird_code_push_protocol/lib/src/messages/create_release/create_release_request.dart +++ b/packages/shorebird_code_push_protocol/lib/src/messages/create_release/create_release_request.dart @@ -3,7 +3,7 @@ import 'package:json_annotation/json_annotation.dart'; part 'create_release_request.g.dart'; /// {@template create_release_request} -/// The request body for POST /api/v1/apps//releases +/// The request body for POST /api/v1/apps/:appId/releases /// {@endtemplate} @JsonSerializable() class CreateReleaseRequest { @@ -15,11 +15,11 @@ class CreateReleaseRequest { this.displayName, }); - /// Converts a Map to a [CreateReleaseRequest] + /// Converts a `Map` to a [CreateReleaseRequest] factory CreateReleaseRequest.fromJson(Map json) => _$CreateReleaseRequestFromJson(json); - /// Converts a [CreateReleaseRequest] to a Map + /// Converts a [CreateReleaseRequest] to a `Map` Map toJson() => _$CreateReleaseRequestToJson(this); /// The release version. diff --git a/packages/shorebird_code_push_protocol/lib/src/messages/create_release/create_release_response.dart b/packages/shorebird_code_push_protocol/lib/src/messages/create_release/create_release_response.dart index e21dcdc1..632bcd44 100644 --- a/packages/shorebird_code_push_protocol/lib/src/messages/create_release/create_release_response.dart +++ b/packages/shorebird_code_push_protocol/lib/src/messages/create_release/create_release_response.dart @@ -4,7 +4,7 @@ import 'package:shorebird_code_push_protocol/shorebird_code_push_protocol.dart'; part 'create_release_response.g.dart'; /// {@template create_release_response} -/// The response body for POST /api/v1/apps//releases +/// The response body for POST /api/v1/apps/:appId/releases /// {@endtemplate} @JsonSerializable() class CreateReleaseResponse { @@ -13,11 +13,11 @@ class CreateReleaseResponse { required this.release, }); - /// Converts a Map to a [CreateReleaseResponse] + /// Converts a `Map` to a [CreateReleaseResponse] factory CreateReleaseResponse.fromJson(Map json) => _$CreateReleaseResponseFromJson(json); - /// Converts a [CreateReleaseResponse] to a Map + /// Converts a [CreateReleaseResponse] to a `Map` Map toJson() => _$CreateReleaseResponseToJson(this); /// The newly-created release. diff --git a/packages/shorebird_code_push_protocol/lib/src/messages/create_release_artifact/create_release_artifact_request.dart b/packages/shorebird_code_push_protocol/lib/src/messages/create_release_artifact/create_release_artifact_request.dart index 7fddb2d3..9dda5f6e 100644 --- a/packages/shorebird_code_push_protocol/lib/src/messages/create_release_artifact/create_release_artifact_request.dart +++ b/packages/shorebird_code_push_protocol/lib/src/messages/create_release_artifact/create_release_artifact_request.dart @@ -22,11 +22,11 @@ class CreateReleaseArtifactRequest { required this.podfileLockHash, }); - /// Converts a Map to a [CreateReleaseArtifactRequest] + /// Converts a `Map` to a [CreateReleaseArtifactRequest] factory CreateReleaseArtifactRequest.fromJson(Map json) => _$CreateReleaseArtifactRequestFromJson(json); - /// Converts a [CreateReleaseArtifactRequest] to a Map. + /// Converts a [CreateReleaseArtifactRequest] to a `Map`. Json toJson() => _$CreateReleaseArtifactRequestToJson(this); /// The arch of the artifact. diff --git a/packages/shorebird_code_push_protocol/lib/src/messages/create_release_artifact/create_release_artifact_response.dart b/packages/shorebird_code_push_protocol/lib/src/messages/create_release_artifact/create_release_artifact_response.dart index 70f2ea89..8dd9dfc0 100644 --- a/packages/shorebird_code_push_protocol/lib/src/messages/create_release_artifact/create_release_artifact_response.dart +++ b/packages/shorebird_code_push_protocol/lib/src/messages/create_release_artifact/create_release_artifact_response.dart @@ -19,11 +19,11 @@ class CreateReleaseArtifactResponse { required this.url, }); - /// Converts a Map to a [CreateReleaseArtifactResponse] + /// Converts a `Map` to a [CreateReleaseArtifactResponse] factory CreateReleaseArtifactResponse.fromJson(Map json) => _$CreateReleaseArtifactResponseFromJson(json); - /// Converts a [CreateReleaseArtifactResponse] to a Map. + /// Converts a [CreateReleaseArtifactResponse] to a `Map`. Json toJson() => _$CreateReleaseArtifactResponseToJson(this); /// The ID of the artifact; diff --git a/packages/shorebird_code_push_protocol/lib/src/messages/get_apps/get_apps_response.dart b/packages/shorebird_code_push_protocol/lib/src/messages/get_apps/get_apps_response.dart index aca7bc8e..84dd7a4a 100644 --- a/packages/shorebird_code_push_protocol/lib/src/messages/get_apps/get_apps_response.dart +++ b/packages/shorebird_code_push_protocol/lib/src/messages/get_apps/get_apps_response.dart @@ -11,11 +11,11 @@ class GetAppsResponse { /// {@macro get_apps_response} const GetAppsResponse({required this.apps}); - /// Converts a Map to a [GetAppsResponse]. + /// Converts a `Map` to a [GetAppsResponse]. factory GetAppsResponse.fromJson(Map json) => _$GetAppsResponseFromJson(json); - /// Converts a [GetAppsResponse] to a Map. + /// Converts a [GetAppsResponse] to a `Map`. Json toJson() => _$GetAppsResponseToJson(this); /// The list of apps. diff --git a/packages/shorebird_code_push_protocol/lib/src/messages/get_release_artifacts/get_release_artifacts_response.dart b/packages/shorebird_code_push_protocol/lib/src/messages/get_release_artifacts/get_release_artifacts_response.dart index ae84a441..0718e8d9 100644 --- a/packages/shorebird_code_push_protocol/lib/src/messages/get_release_artifacts/get_release_artifacts_response.dart +++ b/packages/shorebird_code_push_protocol/lib/src/messages/get_release_artifacts/get_release_artifacts_response.dart @@ -11,11 +11,11 @@ class GetReleaseArtifactsResponse { /// {@macro get_release_artifacts_response} const GetReleaseArtifactsResponse({required this.artifacts}); - /// Converts a Map to a [GetReleaseArtifactsResponse]. + /// Converts a `Map` to a [GetReleaseArtifactsResponse]. factory GetReleaseArtifactsResponse.fromJson(Map json) => _$GetReleaseArtifactsResponseFromJson(json); - /// Converts a [GetReleaseArtifactsResponse] to a Map. + /// Converts a [GetReleaseArtifactsResponse] to a `Map`. Json toJson() => _$GetReleaseArtifactsResponseToJson(this); /// The artifacts for the release. diff --git a/packages/shorebird_code_push_protocol/lib/src/messages/get_release_patches/get_release_patches_response.dart b/packages/shorebird_code_push_protocol/lib/src/messages/get_release_patches/get_release_patches_response.dart index 549d2f24..267dfc79 100644 --- a/packages/shorebird_code_push_protocol/lib/src/messages/get_release_patches/get_release_patches_response.dart +++ b/packages/shorebird_code_push_protocol/lib/src/messages/get_release_patches/get_release_patches_response.dart @@ -11,11 +11,11 @@ class GetReleasePatchesResponse { /// {@macro get_release_patches_response} const GetReleasePatchesResponse({required this.patches}); - /// Converts a Map to a [GetReleasePatchesResponse] + /// Converts a `Map` to a [GetReleasePatchesResponse] factory GetReleasePatchesResponse.fromJson(Map json) => _$GetReleasePatchesResponseFromJson(json); - /// Converts a [GetReleasePatchesResponse] to a Map + /// Converts a [GetReleasePatchesResponse] to a `Map` Json toJson() => _$GetReleasePatchesResponseToJson(this); /// List of patches. diff --git a/packages/shorebird_code_push_protocol/lib/src/messages/get_releases/get_releases_response.dart b/packages/shorebird_code_push_protocol/lib/src/messages/get_releases/get_releases_response.dart index 58f028c3..12366b77 100644 --- a/packages/shorebird_code_push_protocol/lib/src/messages/get_releases/get_releases_response.dart +++ b/packages/shorebird_code_push_protocol/lib/src/messages/get_releases/get_releases_response.dart @@ -11,11 +11,11 @@ class GetReleasesResponse { /// {@macro get_releases_response} const GetReleasesResponse({required this.releases}); - /// Converts a Map to a [GetReleasesResponse]. + /// Converts a `Map` to a [GetReleasesResponse]. factory GetReleasesResponse.fromJson(Map json) => _$GetReleasesResponseFromJson(json); - /// Converts a [GetReleasesResponse] to a Map. + /// Converts a [GetReleasesResponse] to a `Map`. Json toJson() => _$GetReleasesResponseToJson(this); /// The list of releases for the app. diff --git a/packages/shorebird_code_push_protocol/lib/src/messages/promote_patch/promote_patch_request.dart b/packages/shorebird_code_push_protocol/lib/src/messages/promote_patch/promote_patch_request.dart index 975f6aa0..d6f6cb85 100644 --- a/packages/shorebird_code_push_protocol/lib/src/messages/promote_patch/promote_patch_request.dart +++ b/packages/shorebird_code_push_protocol/lib/src/messages/promote_patch/promote_patch_request.dart @@ -10,11 +10,11 @@ class PromotePatchRequest { /// {@macro promote_patch_request} const PromotePatchRequest({required this.patchId, required this.channelId}); - /// Converts a Map to a [PromotePatchRequest] + /// Converts a `Map` to a [PromotePatchRequest] factory PromotePatchRequest.fromJson(Map json) => _$PromotePatchRequestFromJson(json); - /// Converts a [PromotePatchRequest] to a Map + /// Converts a [PromotePatchRequest] to a `Map` Map toJson() => _$PromotePatchRequestToJson(this); /// The ID of the patch. diff --git a/packages/shorebird_code_push_protocol/lib/src/messages/update_app_collaborator/update_app_collaborator_request.dart b/packages/shorebird_code_push_protocol/lib/src/messages/update_app_collaborator/update_app_collaborator_request.dart index abafa7ea..30e9a8af 100644 --- a/packages/shorebird_code_push_protocol/lib/src/messages/update_app_collaborator/update_app_collaborator_request.dart +++ b/packages/shorebird_code_push_protocol/lib/src/messages/update_app_collaborator/update_app_collaborator_request.dart @@ -5,7 +5,7 @@ part 'update_app_collaborator_request.g.dart'; /// {@template update_app_collaborator_request} /// The request body for -/// PATCH /api/v1/apps//collaborators/ +/// PATCH /api/v1/apps/:appId/collaborators/:collaboratorId /// {@endtemplate} @JsonSerializable() class UpdateAppCollaboratorRequest { @@ -14,11 +14,11 @@ class UpdateAppCollaboratorRequest { required this.role, }); - /// Converts a Map to a [UpdateAppCollaboratorRequest]. + /// Converts a `Map` to a [UpdateAppCollaboratorRequest]. factory UpdateAppCollaboratorRequest.fromJson(Map json) => _$UpdateAppCollaboratorRequestFromJson(json); - /// Converts a [UpdateAppCollaboratorRequest] to a Map. + /// Converts a [UpdateAppCollaboratorRequest] to a `Map`. Map toJson() => _$UpdateAppCollaboratorRequestToJson(this); /// The new role for the collaborator. diff --git a/packages/shorebird_code_push_protocol/lib/src/messages/update_release/update_release_request.dart b/packages/shorebird_code_push_protocol/lib/src/messages/update_release/update_release_request.dart index 18c44d42..b54aa5b8 100644 --- a/packages/shorebird_code_push_protocol/lib/src/messages/update_release/update_release_request.dart +++ b/packages/shorebird_code_push_protocol/lib/src/messages/update_release/update_release_request.dart @@ -15,11 +15,11 @@ class UpdateReleaseRequest { required this.metadata, }); - /// Converts a Map to a [UpdateReleaseRequest]. + /// Converts a `Map` to a [UpdateReleaseRequest]. factory UpdateReleaseRequest.fromJson(Json json) => _$UpdateReleaseRequestFromJson(json); - /// Converts a [UpdateReleaseRequest] to a Map. + /// Converts a [UpdateReleaseRequest] to a `Map`. Json toJson() => _$UpdateReleaseRequestToJson(this); /// The desired status of the release. diff --git a/packages/shorebird_code_push_protocol/lib/src/models/app.dart b/packages/shorebird_code_push_protocol/lib/src/models/app.dart index f4cd792a..a74311b9 100644 --- a/packages/shorebird_code_push_protocol/lib/src/models/app.dart +++ b/packages/shorebird_code_push_protocol/lib/src/models/app.dart @@ -13,10 +13,10 @@ class App { required this.displayName, }); - /// Converts a Map to an [App] + /// Converts a `Map` to an [App] factory App.fromJson(Map json) => _$AppFromJson(json); - /// Converts a [App] to a Map + /// Converts a [App] to a `Map` Map toJson() => _$AppToJson(this); /// The ID of the app. diff --git a/packages/shorebird_code_push_protocol/lib/src/models/app_metadata.dart b/packages/shorebird_code_push_protocol/lib/src/models/app_metadata.dart index 543cf951..8dc91a29 100644 --- a/packages/shorebird_code_push_protocol/lib/src/models/app_metadata.dart +++ b/packages/shorebird_code_push_protocol/lib/src/models/app_metadata.dart @@ -18,11 +18,11 @@ class AppMetadata extends Equatable { this.latestPatchNumber, }); - /// Converts a Map to an [AppMetadata] + /// Converts a `Map` to an [AppMetadata] factory AppMetadata.fromJson(Map json) => _$AppMetadataFromJson(json); - /// Converts a [AppMetadata] to a Map + /// Converts a [AppMetadata] to a `Map` Map toJson() => _$AppMetadataToJson(this); /// The ID of the app. diff --git a/packages/shorebird_code_push_protocol/lib/src/models/channel.dart b/packages/shorebird_code_push_protocol/lib/src/models/channel.dart index c9442dbc..eabafbda 100644 --- a/packages/shorebird_code_push_protocol/lib/src/models/channel.dart +++ b/packages/shorebird_code_push_protocol/lib/src/models/channel.dart @@ -12,11 +12,11 @@ class Channel { /// {@macro channel} const Channel({required this.id, required this.appId, required this.name}); - /// Converts a Map to a [Channel] + /// Converts a `Map` to a [Channel] factory Channel.fromJson(Map json) => _$ChannelFromJson(json); - /// Converts a [Channel] to a Map + /// Converts a [Channel] to a `Map` Map toJson() => _$ChannelToJson(this); /// The ID of the channel; diff --git a/packages/shorebird_code_push_protocol/lib/src/models/patch.dart b/packages/shorebird_code_push_protocol/lib/src/models/patch.dart index b91b09db..20819d9d 100644 --- a/packages/shorebird_code_push_protocol/lib/src/models/patch.dart +++ b/packages/shorebird_code_push_protocol/lib/src/models/patch.dart @@ -12,10 +12,10 @@ class Patch { /// {@macro patch} const Patch({required this.id, required this.number}); - /// Converts a Map to a [Patch] + /// Converts a `Map` to a [Patch] factory Patch.fromJson(Map json) => _$PatchFromJson(json); - /// Converts a [Patch] to a Map + /// Converts a [Patch] to a `Map` Map toJson() => _$PatchToJson(this); /// The unique patch identifier. diff --git a/packages/shorebird_code_push_protocol/lib/src/models/patch_artifact.dart b/packages/shorebird_code_push_protocol/lib/src/models/patch_artifact.dart index c3c7db47..6c5e0356 100644 --- a/packages/shorebird_code_push_protocol/lib/src/models/patch_artifact.dart +++ b/packages/shorebird_code_push_protocol/lib/src/models/patch_artifact.dart @@ -20,11 +20,11 @@ class PatchArtifact { required this.createdAt, }); - /// Converts a Map to a [PatchArtifact] + /// Converts a `Map` to a [PatchArtifact] factory PatchArtifact.fromJson(Map json) => _$PatchArtifactFromJson(json); - /// Converts a [PatchArtifact] to a Map + /// Converts a [PatchArtifact] to a `Map` Map toJson() => _$PatchArtifactToJson(this); /// The ID of the artifact; diff --git a/packages/shorebird_code_push_protocol/lib/src/models/private_user.dart b/packages/shorebird_code_push_protocol/lib/src/models/private_user.dart index 51e306a6..c42d34a8 100644 --- a/packages/shorebird_code_push_protocol/lib/src/models/private_user.dart +++ b/packages/shorebird_code_push_protocol/lib/src/models/private_user.dart @@ -22,7 +22,7 @@ class PrivateUser { this.patchOverageLimit, }); - /// Converts a Map to a [PrivateUser] + /// Converts a `Map` to a [PrivateUser] factory PrivateUser.fromJson(Map json) => _$PrivateUserFromJson(json); @@ -49,7 +49,7 @@ class PrivateUser { ); // coverage:ignore-end - /// Converts a [PrivateUser] to a Map + /// Converts a [PrivateUser] to a `Map` Map toJson() => _$PrivateUserToJson(this); /// The unique user identifier. diff --git a/packages/shorebird_code_push_protocol/lib/src/models/public_user.dart b/packages/shorebird_code_push_protocol/lib/src/models/public_user.dart index 8d6b2a9f..1f9cb32d 100644 --- a/packages/shorebird_code_push_protocol/lib/src/models/public_user.dart +++ b/packages/shorebird_code_push_protocol/lib/src/models/public_user.dart @@ -15,7 +15,7 @@ class PublicUser { required this.displayName, }); - /// Converts a Map to a [PublicUser] + /// Converts a `Map` to a [PublicUser] factory PublicUser.fromJson(Map json) => _$PublicUserFromJson(json); diff --git a/packages/shorebird_code_push_protocol/lib/src/models/release.dart b/packages/shorebird_code_push_protocol/lib/src/models/release.dart index bde674cf..c17ad017 100644 --- a/packages/shorebird_code_push_protocol/lib/src/models/release.dart +++ b/packages/shorebird_code_push_protocol/lib/src/models/release.dart @@ -22,11 +22,11 @@ class Release { required this.updatedAt, }); - /// Converts a Map to a [Release] + /// Converts a `Map` to a [Release] factory Release.fromJson(Map json) => _$ReleaseFromJson(json); - /// Converts a [Release] to a Map + /// Converts a [Release] to a `Map` Map toJson() => _$ReleaseToJson(this); /// The ID of the release; diff --git a/packages/shorebird_code_push_protocol/lib/src/models/release_artifact.dart b/packages/shorebird_code_push_protocol/lib/src/models/release_artifact.dart index 2f0f5fa3..7bc17e53 100644 --- a/packages/shorebird_code_push_protocol/lib/src/models/release_artifact.dart +++ b/packages/shorebird_code_push_protocol/lib/src/models/release_artifact.dart @@ -22,11 +22,11 @@ class ReleaseArtifact { required this.canSideload, }); - /// Converts a Map to a [ReleaseArtifact] + /// Converts a `Map` to a [ReleaseArtifact] factory ReleaseArtifact.fromJson(Map json) => _$ReleaseArtifactFromJson(json); - /// Converts a [ReleaseArtifact] to a Map + /// Converts a [ReleaseArtifact] to a `Map` Map toJson() => _$ReleaseArtifactToJson(this); /// The ID of the artifact; diff --git a/packages/shorebird_code_push_protocol/lib/src/models/release_patch.dart b/packages/shorebird_code_push_protocol/lib/src/models/release_patch.dart index 28f1f8c7..aa5a25a1 100644 --- a/packages/shorebird_code_push_protocol/lib/src/models/release_patch.dart +++ b/packages/shorebird_code_push_protocol/lib/src/models/release_patch.dart @@ -19,11 +19,11 @@ class ReleasePatch extends Equatable { required this.isRolledBack, }); - /// Converts a Map to a [ReleasePatch] + /// Converts a `Map` to a [ReleasePatch] factory ReleasePatch.fromJson(Map json) => _$ReleasePatchFromJson(json); - /// Converts a [ReleasePatch] to a Map + /// Converts a [ReleasePatch] to a `Map` Json toJson() => _$ReleasePatchToJson(this); /// The patch id. diff --git a/packages/shorebird_code_push_protocol/lib/src/models/release_platform.dart b/packages/shorebird_code_push_protocol/lib/src/models/release_platform.dart index 0c7a6f66..12451cbd 100644 --- a/packages/shorebird_code_push_protocol/lib/src/models/release_platform.dart +++ b/packages/shorebird_code_push_protocol/lib/src/models/release_platform.dart @@ -1,12 +1,15 @@ /// A platform to which a Shorebird release can be deployed. enum ReleasePlatform { - // ignore: public_member_api_docs + /// Android android('Android'), - // ignore: public_member_api_docs + + /// macOS macos('macOS'), - // ignore: public_member_api_docs + + /// iOS ios('iOS'), - // ignore: public_member_api_docs + + /// Windows windows('Windows'); const ReleasePlatform(this.displayName); diff --git a/packages/shorebird_code_push_protocol/pubspec.yaml b/packages/shorebird_code_push_protocol/pubspec.yaml index ab081f5b..3063be2d 100644 --- a/packages/shorebird_code_push_protocol/pubspec.yaml +++ b/packages/shorebird_code_push_protocol/pubspec.yaml @@ -19,4 +19,4 @@ dev_dependencies: json_serializable: ^6.6.1 mocktail: ^1.0.0 test: ^1.19.2 - very_good_analysis: ^6.0.0 + very_good_analysis: ^7.0.0 diff --git a/packages/shorebird_code_push_protocol/test/src/models/release_patch_test.dart b/packages/shorebird_code_push_protocol/test/src/models/release_patch_test.dart index 3102dbce..d3825e57 100644 --- a/packages/shorebird_code_push_protocol/test/src/models/release_patch_test.dart +++ b/packages/shorebird_code_push_protocol/test/src/models/release_patch_test.dart @@ -1,5 +1,3 @@ -// ignore_for_file: prefer_const_constructors - import 'package:shorebird_code_push_protocol/shorebird_code_push_protocol.dart'; import 'package:test/test.dart'; @@ -7,6 +5,8 @@ void main() { group(ReleasePatch, () { test('is equatable', () { expect( + // Ignoring const constructor for equality comparison. + // ignore: prefer_const_constructors ReleasePatch( id: 0, number: 1, @@ -15,6 +15,8 @@ void main() { artifacts: const [], ), equals( + // Ignoring const constructor for equality comparison. + // ignore: prefer_const_constructors ReleasePatch( id: 0, number: 1,