Skip to content

Commit

Permalink
refactor(code_push_protocol): upgrade analysis_options (#2718)
Browse files Browse the repository at this point in the history
  • Loading branch information
felangel authored Dec 19, 2024
1 parent 9cf0927 commit f31fdd0
Show file tree
Hide file tree
Showing 33 changed files with 75 additions and 73 deletions.
Original file line number Diff line number Diff line change
@@ -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/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
/// The Shorebird CodePush Protocol
library shorebird_code_push_protocol;

export 'src/messages/messages.dart';
export 'src/models/models.dart';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ class CreateAppRequest {
required this.organizationId,
});

/// Converts a Map<String, dynamic> to a [CreateAppRequest]
/// Converts a `Map<String, dynamic>` to a [CreateAppRequest]
factory CreateAppRequest.fromJson(Map<String, dynamic> json) =>
_$CreateAppRequestFromJson(json);

/// Converts a [CreateAppRequest] to a Map<String, dynamic>
/// Converts a [CreateAppRequest] to a `Map<String, dynamic>`
Map<String, dynamic> toJson() => _$CreateAppRequestToJson(this);

/// The display name of the app.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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/<id>/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<String, dynamic> to a [CreateAppCollaboratorRequest]
/// Converts a `Map<String, dynamic>` to a [CreateAppCollaboratorRequest]
factory CreateAppCollaboratorRequest.fromJson(Map<String, dynamic> json) =>
_$CreateAppCollaboratorRequestFromJson(json);

/// Converts a [CreateAppCollaboratorRequest] to a Map<String, dynamic>
/// Converts a [CreateAppCollaboratorRequest] to a `Map<String, dynamic>`
Map<String, dynamic> toJson() => _$CreateAppCollaboratorRequestToJson(this);

/// The email of the collaborator to add.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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/<appId>/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<String, dynamic> to a [CreateChannelRequest]
/// Converts a `Map<String, dynamic>` to a [CreateChannelRequest]
factory CreateChannelRequest.fromJson(Map<String, dynamic> json) =>
_$CreateChannelRequestFromJson(json);

/// Converts a [CreateChannelRequest] to a Map<String, dynamic>
/// Converts a [CreateChannelRequest] to a `Map<String, dynamic>`
Map<String, dynamic> toJson() => _$CreateChannelRequestToJson(this);

/// The channel name.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ class CreatePatchRequest {
required this.metadata,
});

/// Converts a Map<String, dynamic> to a [CreatePatchRequest]
/// Converts a `Map<String, dynamic>` to a [CreatePatchRequest]
factory CreatePatchRequest.fromJson(Map<String, dynamic> json) =>
_$CreatePatchRequestFromJson(json);

/// Converts a [CreatePatchRequest] to a Map<String, dynamic>
/// Converts a [CreatePatchRequest] to a `Map<String, dynamic>`
Map<String, dynamic> toJson() => _$CreatePatchRequestToJson(this);

/// The ID of the release.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ class CreatePatchResponse {
/// {@macro create_patch_response}
const CreatePatchResponse({required this.id, required this.number});

/// Converts a Map<String, dynamic> to a [CreatePatchResponse]
/// Converts a `Map<String, dynamic>` to a [CreatePatchResponse]
factory CreatePatchResponse.fromJson(Map<String, dynamic> json) =>
_$CreatePatchResponseFromJson(json);

/// Converts a [CreatePatchResponse] to a Map<String, dynamic>
/// Converts a [CreatePatchResponse] to a `Map<String, dynamic>`
Map<String, dynamic> toJson() => _$CreatePatchResponseToJson(this);

/// The unique patch identifier.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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/<id>/artifacts
/// The request body for POST /api/v1/patches/:id/artifacts
/// {@endtemplate}
@JsonSerializable()
class CreatePatchArtifactRequest {
Expand All @@ -18,11 +18,11 @@ class CreatePatchArtifactRequest {
this.podfileLockHash,
});

/// Converts a Map<String, dynamic> to a [CreatePatchArtifactRequest]
/// Converts a `Map<String, dynamic>` to a [CreatePatchArtifactRequest]
factory CreatePatchArtifactRequest.fromJson(Map<String, dynamic> json) =>
_$CreatePatchArtifactRequestFromJson(json);

/// Converts a [CreatePatchArtifactRequest] to a Map<String, dynamic>.
/// Converts a [CreatePatchArtifactRequest] to a `Map<String, dynamic>`.
Json toJson() => _$CreatePatchArtifactRequestToJson(this);

/// The arch of the artifact.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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/<id>/artifacts
/// The response body for POST /api/v1/patches/:id/artifacts
/// {@endtemplate}
@JsonSerializable()
class CreatePatchArtifactResponse {
Expand All @@ -19,11 +19,11 @@ class CreatePatchArtifactResponse {
required this.url,
});

/// Converts a Map<String, dynamic> to a [CreatePatchArtifactResponse]
/// Converts a `Map<String, dynamic>` to a [CreatePatchArtifactResponse]
factory CreatePatchArtifactResponse.fromJson(Map<String, dynamic> json) =>
_$CreatePatchArtifactResponseFromJson(json);

/// Converts a [CreatePatchArtifactResponse] to a Map<String, dynamic>.
/// Converts a [CreatePatchArtifactResponse] to a `Map<String, dynamic>`.
Json toJson() => _$CreatePatchArtifactResponseToJson(this);

/// The ID of the artifact;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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/<appId>/releases
/// The request body for POST /api/v1/apps/:appId/releases
/// {@endtemplate}
@JsonSerializable()
class CreateReleaseRequest {
Expand All @@ -15,11 +15,11 @@ class CreateReleaseRequest {
this.displayName,
});

/// Converts a Map<String, dynamic> to a [CreateReleaseRequest]
/// Converts a `Map<String, dynamic>` to a [CreateReleaseRequest]
factory CreateReleaseRequest.fromJson(Map<String, dynamic> json) =>
_$CreateReleaseRequestFromJson(json);

/// Converts a [CreateReleaseRequest] to a Map<String, dynamic>
/// Converts a [CreateReleaseRequest] to a `Map<String, dynamic>`
Map<String, dynamic> toJson() => _$CreateReleaseRequestToJson(this);

/// The release version.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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/<appId>/releases
/// The response body for POST /api/v1/apps/:appId/releases
/// {@endtemplate}
@JsonSerializable()
class CreateReleaseResponse {
Expand All @@ -13,11 +13,11 @@ class CreateReleaseResponse {
required this.release,
});

/// Converts a Map<String, dynamic> to a [CreateReleaseResponse]
/// Converts a `Map<String, dynamic>` to a [CreateReleaseResponse]
factory CreateReleaseResponse.fromJson(Map<String, dynamic> json) =>
_$CreateReleaseResponseFromJson(json);

/// Converts a [CreateReleaseResponse] to a Map<String, dynamic>
/// Converts a [CreateReleaseResponse] to a `Map<String, dynamic>`
Map<String, dynamic> toJson() => _$CreateReleaseResponseToJson(this);

/// The newly-created release.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ class CreateReleaseArtifactRequest {
required this.podfileLockHash,
});

/// Converts a Map<String, dynamic> to a [CreateReleaseArtifactRequest]
/// Converts a `Map<String, dynamic>` to a [CreateReleaseArtifactRequest]
factory CreateReleaseArtifactRequest.fromJson(Map<String, dynamic> json) =>
_$CreateReleaseArtifactRequestFromJson(json);

/// Converts a [CreateReleaseArtifactRequest] to a Map<String, dynamic>.
/// Converts a [CreateReleaseArtifactRequest] to a `Map<String, dynamic>`.
Json toJson() => _$CreateReleaseArtifactRequestToJson(this);

/// The arch of the artifact.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ class CreateReleaseArtifactResponse {
required this.url,
});

/// Converts a Map<String, dynamic> to a [CreateReleaseArtifactResponse]
/// Converts a `Map<String, dynamic>` to a [CreateReleaseArtifactResponse]
factory CreateReleaseArtifactResponse.fromJson(Map<String, dynamic> json) =>
_$CreateReleaseArtifactResponseFromJson(json);

/// Converts a [CreateReleaseArtifactResponse] to a Map<String, dynamic>.
/// Converts a [CreateReleaseArtifactResponse] to a `Map<String, dynamic>`.
Json toJson() => _$CreateReleaseArtifactResponseToJson(this);

/// The ID of the artifact;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ class GetAppsResponse {
/// {@macro get_apps_response}
const GetAppsResponse({required this.apps});

/// Converts a Map<String, dynamic> to a [GetAppsResponse].
/// Converts a `Map<String, dynamic>` to a [GetAppsResponse].
factory GetAppsResponse.fromJson(Map<String, dynamic> json) =>
_$GetAppsResponseFromJson(json);

/// Converts a [GetAppsResponse] to a Map<String, dynamic>.
/// Converts a [GetAppsResponse] to a `Map<String, dynamic>`.
Json toJson() => _$GetAppsResponseToJson(this);

/// The list of apps.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ class GetReleaseArtifactsResponse {
/// {@macro get_release_artifacts_response}
const GetReleaseArtifactsResponse({required this.artifacts});

/// Converts a Map<String, dynamic> to a [GetReleaseArtifactsResponse].
/// Converts a `Map<String, dynamic>` to a [GetReleaseArtifactsResponse].
factory GetReleaseArtifactsResponse.fromJson(Map<String, dynamic> json) =>
_$GetReleaseArtifactsResponseFromJson(json);

/// Converts a [GetReleaseArtifactsResponse] to a Map<String, dynamic>.
/// Converts a [GetReleaseArtifactsResponse] to a `Map<String, dynamic>`.
Json toJson() => _$GetReleaseArtifactsResponseToJson(this);

/// The artifacts for the release.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ class GetReleasePatchesResponse {
/// {@macro get_release_patches_response}
const GetReleasePatchesResponse({required this.patches});

/// Converts a Map<String, dynamic> to a [GetReleasePatchesResponse]
/// Converts a `Map<String, dynamic>` to a [GetReleasePatchesResponse]
factory GetReleasePatchesResponse.fromJson(Map<String, dynamic> json) =>
_$GetReleasePatchesResponseFromJson(json);

/// Converts a [GetReleasePatchesResponse] to a Map<String, dynamic>
/// Converts a [GetReleasePatchesResponse] to a `Map<String, dynamic>`
Json toJson() => _$GetReleasePatchesResponseToJson(this);

/// List of patches.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ class GetReleasesResponse {
/// {@macro get_releases_response}
const GetReleasesResponse({required this.releases});

/// Converts a Map<String, dynamic> to a [GetReleasesResponse].
/// Converts a `Map<String, dynamic>` to a [GetReleasesResponse].
factory GetReleasesResponse.fromJson(Map<String, dynamic> json) =>
_$GetReleasesResponseFromJson(json);

/// Converts a [GetReleasesResponse] to a Map<String, dynamic>.
/// Converts a [GetReleasesResponse] to a `Map<String, dynamic>`.
Json toJson() => _$GetReleasesResponseToJson(this);

/// The list of releases for the app.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ class PromotePatchRequest {
/// {@macro promote_patch_request}
const PromotePatchRequest({required this.patchId, required this.channelId});

/// Converts a Map<String, dynamic> to a [PromotePatchRequest]
/// Converts a `Map<String, dynamic>` to a [PromotePatchRequest]
factory PromotePatchRequest.fromJson(Map<String, dynamic> json) =>
_$PromotePatchRequestFromJson(json);

/// Converts a [PromotePatchRequest] to a Map<String, dynamic>
/// Converts a [PromotePatchRequest] to a `Map<String, dynamic>`
Map<String, dynamic> toJson() => _$PromotePatchRequestToJson(this);

/// The ID of the patch.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ part 'update_app_collaborator_request.g.dart';

/// {@template update_app_collaborator_request}
/// The request body for
/// PATCH /api/v1/apps/<appId>/collaborators/<collaboratorId>
/// PATCH /api/v1/apps/:appId/collaborators/:collaboratorId
/// {@endtemplate}
@JsonSerializable()
class UpdateAppCollaboratorRequest {
Expand All @@ -14,11 +14,11 @@ class UpdateAppCollaboratorRequest {
required this.role,
});

/// Converts a Map<String, dynamic> to a [UpdateAppCollaboratorRequest].
/// Converts a `Map<String, dynamic>` to a [UpdateAppCollaboratorRequest].
factory UpdateAppCollaboratorRequest.fromJson(Map<String, dynamic> json) =>
_$UpdateAppCollaboratorRequestFromJson(json);

/// Converts a [UpdateAppCollaboratorRequest] to a Map<String, dynamic>.
/// Converts a [UpdateAppCollaboratorRequest] to a `Map<String, dynamic>`.
Map<String, dynamic> toJson() => _$UpdateAppCollaboratorRequestToJson(this);

/// The new role for the collaborator.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ class UpdateReleaseRequest {
required this.metadata,
});

/// Converts a Map<String, dynamic> to a [UpdateReleaseRequest].
/// Converts a `Map<String, dynamic>` to a [UpdateReleaseRequest].
factory UpdateReleaseRequest.fromJson(Json json) =>
_$UpdateReleaseRequestFromJson(json);

/// Converts a [UpdateReleaseRequest] to a Map<String, dynamic>.
/// Converts a [UpdateReleaseRequest] to a `Map<String, dynamic>`.
Json toJson() => _$UpdateReleaseRequestToJson(this);

/// The desired status of the release.
Expand Down
4 changes: 2 additions & 2 deletions packages/shorebird_code_push_protocol/lib/src/models/app.dart
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ class App {
required this.displayName,
});

/// Converts a Map<String, dynamic> to an [App]
/// Converts a `Map<String, dynamic>` to an [App]
factory App.fromJson(Map<String, dynamic> json) => _$AppFromJson(json);

/// Converts a [App] to a Map<String, dynamic>
/// Converts a [App] to a `Map<String, dynamic>`
Map<String, dynamic> toJson() => _$AppToJson(this);

/// The ID of the app.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ class AppMetadata extends Equatable {
this.latestPatchNumber,
});

/// Converts a Map<String, dynamic> to an [AppMetadata]
/// Converts a `Map<String, dynamic>` to an [AppMetadata]
factory AppMetadata.fromJson(Map<String, dynamic> json) =>
_$AppMetadataFromJson(json);

/// Converts a [AppMetadata] to a Map<String, dynamic>
/// Converts a [AppMetadata] to a `Map<String, dynamic>`
Map<String, dynamic> toJson() => _$AppMetadataToJson(this);

/// The ID of the app.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ class Channel {
/// {@macro channel}
const Channel({required this.id, required this.appId, required this.name});

/// Converts a Map<String, dynamic> to a [Channel]
/// Converts a `Map<String, dynamic>` to a [Channel]
factory Channel.fromJson(Map<String, dynamic> json) =>
_$ChannelFromJson(json);

/// Converts a [Channel] to a Map<String, dynamic>
/// Converts a [Channel] to a `Map<String, dynamic>`
Map<String, dynamic> toJson() => _$ChannelToJson(this);

/// The ID of the channel;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ class Patch {
/// {@macro patch}
const Patch({required this.id, required this.number});

/// Converts a Map<String, dynamic> to a [Patch]
/// Converts a `Map<String, dynamic>` to a [Patch]
factory Patch.fromJson(Map<String, dynamic> json) => _$PatchFromJson(json);

/// Converts a [Patch] to a Map<String, dynamic>
/// Converts a [Patch] to a `Map<String, dynamic>`
Map<String, dynamic> toJson() => _$PatchToJson(this);

/// The unique patch identifier.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ class PatchArtifact {
required this.createdAt,
});

/// Converts a Map<String, dynamic> to a [PatchArtifact]
/// Converts a `Map<String, dynamic>` to a [PatchArtifact]
factory PatchArtifact.fromJson(Map<String, dynamic> json) =>
_$PatchArtifactFromJson(json);

/// Converts a [PatchArtifact] to a Map<String, dynamic>
/// Converts a [PatchArtifact] to a `Map<String, dynamic>`
Map<String, dynamic> toJson() => _$PatchArtifactToJson(this);

/// The ID of the artifact;
Expand Down
Loading

0 comments on commit f31fdd0

Please sign in to comment.