Skip to content

chore: Cleanup Access Layer #448

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

Merged
merged 1 commit into from
Apr 2, 2025
Merged

Conversation

Soap-141
Copy link
Contributor

@Soap-141 Soap-141 commented Mar 27, 2025

GitHub Issue: #

Proposed Changes

  • Bug fix
  • Feature
  • Code style update (formatting)
  • Refactoring (no functional changes, no api changes)
  • Build or CI related changes
  • Documentation content changes
  • Other, please describe:

Description

Clean up the access layer by sealing classes and removing unused imports. I also made the authentication data classes as before (and adjusted places where needed based on those changes).

Impact on version

  • Major
    • The template structure was changed.
  • Minor
    • New functionalities were added.
  • Patch
    • A bug in behavior was fixed.
    • Documentation was changed.

PR Checklist

Always applicable

No matter your changes, these checks always apply.

  • Your conventional commits are aligned with the Impact on version section.
  • Updated CHANGELOG.md.
    • Use the latest Major.Minor.X header if you do a Patch change.
    • Create a new Major.Minor.X header if you do a Minor or Major change.
    • If you create a new header, it aligns with the Impact on version section and matches what is generated in the build pipeline.
  • Documentation files were updated according with the changes.
    • Update README.md and TemplateConfig.md if you made changes to templating.
    • Update AzurePipelines.md and APP_README.md if you made changes to pipelines.
    • Update Diagnostics.md if you made changes to diagnostic tools.
    • Update Architecture.md and its diagrams if you made architecture decisions or if you introduced new recipes.
    • ...and so forth: Make sure you update the documentation files associated to the recipes you changed. Review the topics by looking at the content of the doc/ folder.
  • Images about the template are referenced from the wiki and added as images in this git.
  • TODO comments are hints for next steps for users of the template and not planned work.

Contextual

Based on your changes these checks may not apply.

  • Automated tests for the changes have been added/updated.
  • Tested on all relevant platforms

Other information

Internal Issue (If applicable):

@Soap-141 Soap-141 force-pushed the dev/thla/chore-cleanup-access-layer branch 3 times, most recently from 01958a0 to 6a17814 Compare March 28, 2025 13:31
@Soap-141 Soap-141 marked this pull request as ready for review March 28, 2025 13:35
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR cleans up the Access Layer by renaming repository classes to API clients, sealing classes, removing unused namespaces, and refactoring authentication data classes for improved consistency.

  • Renames repositories to API clients (UserProfile, Posts) and seals classes.
  • Removes unused import directives across several files.
  • Refactors authentication token/data classes and adjusts related tests/code paths.

Reviewed Changes

Copilot reviewed 24 out of 25 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/app/ApplicationTemplate.Access/ApiClients/UserProfile/UserProfileApiClientMock.cs Renamed and sealed UserProfile API client; adjusted constructor signature.
src/app/ApplicationTemplate.Access/ApiClients/UserProfile/IUserProfileApiClient.cs Renamed interface and removed unused namespaces.
src/app/ApplicationTemplate.Access/ApiClients/Posts/PostsApiClientMock.cs Renamed and sealed Posts API client; streamlined using directives.
src/app/ApplicationTemplate.Access/ApiClients/Posts/PostsApiClientException.cs Added a new exception type for the posts API client.
src/app/ApplicationTemplate.Access/ApiClients/Posts/PostRepositoryException.cs and PostErrorResponse.cs Removed legacy classes no longer needed after refactoring.
src/app/ApplicationTemplate.Access/ApiClients/Posts/IPostsApiClient.cs Renamed interface and removed unused using directives.
src/app/ApplicationTemplate.Access/ApiClients/Posts/Data/PostData.cs Sealed the record type for post data.
src/app/ApplicationTemplate.Access/ApiClients/Authentication/* Refactored and relocated AuthenticationToken and AuthenticationData classes, updating to init-only properties and sealing classes.
CHANGELOG.md Updated changelog to reflect the cleanup and renaming changes.
Files not reviewed (1)
  • src/app/ApplicationTemplate.Access/ApplicationTemplate.Access.csproj: Language not supported

@Soap-141 Soap-141 force-pushed the dev/thla/chore-cleanup-access-layer branch from 9a16e4a to 1fbc9a4 Compare March 28, 2025 14:36
@Soap-141 Soap-141 force-pushed the dev/thla/chore-cleanup-access-layer branch from e0ea356 to 2b36b10 Compare April 1, 2025 14:44
@Soap-141 Soap-141 requested a review from jeanplevesque April 1, 2025 14:45
@Soap-141 Soap-141 force-pushed the dev/thla/chore-cleanup-access-layer branch 2 times, most recently from 9955e9d to 38a3627 Compare April 1, 2025 14:49
@Soap-141 Soap-141 requested a review from jeanplevesque April 1, 2025 22:16
@Soap-141 Soap-141 force-pushed the dev/thla/chore-cleanup-access-layer branch from add66f1 to 3e03ac6 Compare April 1, 2025 22:17
@Soap-141 Soap-141 merged commit 40611c7 into main Apr 2, 2025
14 checks passed
@Soap-141 Soap-141 deleted the dev/thla/chore-cleanup-access-layer branch April 2, 2025 13:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants