Skip to content

refactor [Website Weblate W3C VoxelShopRatings Swagger RedditUserKarma] to use routeEnum - #12163

Closed
jNullj wants to merge 8 commits into
badges:masterfrom
jNullj:route-enum-refactor-p3
Closed

jNullj wants to merge 8 commits into
badges:masterfrom
jNullj:route-enum-refactor-p3

Conversation

@jNullj

@jNullj jNullj commented Sep 13, 2026

Copy link
Copy Markdown
Member

A follo-up of #11800 & a condition for #11371

im going to push today some groups with a few services each for easier review.

@jNullj jNullj added the core Server, BaseService, GitHub auth, Shared helpers label Sep 13, 2026
@github-actions

github-actions Bot commented Sep 13, 2026

Copy link
Copy Markdown
Contributor
Warnings
⚠️ This PR modified service code for reddit but not its test code.
That's okay so long as it's refactoring existing code.
⚠️ This PR modified service code for swagger but not its test code.
That's okay so long as it's refactoring existing code.
⚠️ This PR modified service code for voxelshop but not its test code.
That's okay so long as it's refactoring existing code.
⚠️ This PR modified service code for w3c but not its test code.
That's okay so long as it's refactoring existing code.
⚠️ This PR modified service code for weblate but not its test code.
That's okay so long as it's refactoring existing code.
⚠️ This PR modified service code for website but not its test code.
That's okay so long as it's refactoring existing code.
Messages
📖 ✨ Thanks for your contribution to Shields, @jNullj!

Generated by 🚫 dangerJS against 290fcc7

- all paths for this base route is not in use, so checking for the enum here does not help users.
- i think this is a better appraoch then adding the routeEnum param to retiredService at this
@jNullj

jNullj commented Sep 13, 2026

Copy link
Copy Markdown
Member Author

i completely removed the Enum from SwaggerRedirect here which is a retired service for the /2.0 base

  • all paths for this base route is not in use, so checking for the enum here does not help users.
  • i think this is a better approach then adding the routeEnum param to retiredService.

@jNullj

jNullj commented Sep 13, 2026

Copy link
Copy Markdown
Member Author

This one is pretty fun bug.
I'm not sure why it is allowed, but we had 2 routes conflicting until now in WeblateEntities and WeblateUserStatistic
Both services have a base route of weblate and a enum for the first param.
The enum's have collision for the languages value.

The main problem we are going to have solving this, is backwards compatibility. My guess is that one overides the other so i could make change the base for the one that was overriden then use a redirect for all enum values other then the one that was not in use....

@jNullj

jNullj commented Sep 13, 2026

Copy link
Copy Markdown
Member Author

oh, it's not a conflict, one has a user param later and the other doesnt.

@jNullj

jNullj commented Sep 14, 2026

Copy link
Copy Markdown
Member Author

migrated to #12173

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core Server, BaseService, GitHub auth, Shared helpers

Development

Successfully merging this pull request may close these issues.

1 participant