Skip to content
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

Clean up endpoint definitions in methods classes #410

Merged
merged 8 commits into from
Dec 30, 2023

Conversation

PattaFeuFeu
Copy link
Collaborator

Description

In this PR, I cleaned up how we refer to endpoints:

  1. Ensure that all endpoints start without a leading slash (api/v1/…, not /api/v1/…)
  2. Ensure that all endpoints defined as a class-level val are named endpoint (or endpointV1 and endpointV2 if we have multiple) so that all method classes follow mostly the same structure
  3. Ensure that all methods define their endpoints as class-level vals

Relates to #396

Type of Change

  • Refactoring and cleanup

Breaking Changes

  • None

How Has This Been Tested?

I ran existing unit tests through gradle check

Mandatory Checklist

  • I ran gradle check and there were no errors reported
  • I have performed a self-review of my code
  • I have added tests that prove my fix is effective or that my feature works
  • All tests pass locally with my changes
  • I have added KDoc documentation to all public methods

@PattaFeuFeu PattaFeuFeu added the code quality Everything related to code quality label Dec 27, 2023
@PattaFeuFeu PattaFeuFeu self-assigned this Dec 27, 2023
Copy link

codecov bot commented Dec 27, 2023

Codecov Report

Attention: 8 lines in your changes are missing coverage. Please review.

Comparison is base (198690f) 49.25% compared to head (a9773c1) 49.43%.

Additional details and impacted files
@@             Coverage Diff              @@
##             master     #410      +/-   ##
============================================
+ Coverage     49.25%   49.43%   +0.18%     
  Complexity      714      714              
============================================
  Files           169      169              
  Lines          4769     4790      +21     
  Branches        312      312              
============================================
+ Hits           2349     2368      +19     
- Misses         2157     2159       +2     
  Partials        263      263              
Files Coverage Δ
...kotlin/social/bigbone/api/method/AccountMethods.kt 87.50% <100.00%> (+0.08%) ⬆️
...n/social/bigbone/api/method/AnnouncementMethods.kt 90.47% <100.00%> (ø)
...ain/kotlin/social/bigbone/api/method/AppMethods.kt 75.00% <100.00%> (+1.31%) ⬆️
...n/kotlin/social/bigbone/api/method/BlockMethods.kt 100.00% <100.00%> (ø)
...otlin/social/bigbone/api/method/BookmarkMethods.kt 100.00% <100.00%> (ø)
...n/social/bigbone/api/method/ConversationMethods.kt 92.85% <100.00%> (+0.54%) ⬆️
...in/social/bigbone/api/method/CustomEmojiMethods.kt 100.00% <100.00%> (ø)
...tlin/social/bigbone/api/method/DirectoryMethods.kt 84.21% <100.00%> (+0.87%) ⬆️
...in/social/bigbone/api/method/DomainBlockMethods.kt 100.00% <100.00%> (ø)
...n/kotlin/social/bigbone/api/method/EmailMethods.kt 100.00% <100.00%> (ø)
... and 31 more

@PattaFeuFeu PattaFeuFeu mentioned this pull request Dec 29, 2023
5 tasks
Copy link
Owner

@andregasser andregasser left a comment

Choose a reason for hiding this comment

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

Thanks for the cleanup 👍 . I had only one comment regarding test classes.

Copy link
Owner

@andregasser andregasser left a comment

Choose a reason for hiding this comment

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

All good.

@PattaFeuFeu PattaFeuFeu merged commit e2704bf into master Dec 30, 2023
5 checks passed
@PattaFeuFeu PattaFeuFeu deleted the 396/leading-slash-api-endpoints branch December 30, 2023 21:38
@andregasser andregasser mentioned this pull request Jan 1, 2024
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code quality Everything related to code quality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants