feat: Add API versioning support for v2 APIs#510
feat: Add API versioning support for v2 APIs#510KapiWilq wants to merge 2 commits intotosuapp:masterfrom
Conversation
|
Could you share more information on this view? Having API breaking changes on a different API version is fine at first glance but the idea of versioning each architectural change from now on is just giving awful DX. I know osu!api does have some sort of versioning, but I do not think it is feasable for tosu as it's not publicly used, but locally used. I do not have the word on this though, so: cc @KotRikD @cyperdark |
|
i dont think this kind of versioning in buildv2 is good, since it's doesnt have types check for each version |
| if (value === undefined || value === null || value.trim() === '') | ||
| return fallbackValue; | ||
| const num = Number(value); | ||
| if (!Number.isFinite(num)) return fallbackValue; |
There was a problem hiding this comment.
isRealNumber exists in manipulation.ts
Overlay-side PR: tosuapp/counters#64
This PR introduces API versioning for overlays using v2 and Precise APIs by processing the
vquery parameter. If the overlay doesn't specify the version it wants to use (or the value is invalid), tosu will send the first version of an API, ensuring backwards compatibility. You can also get JSON response previews by adding thevparameter to the URL, if omitted or invalid - tosu will send the latest version of an APII also wanted to document this in the wiki, but I guess it's not possible to PR wikis, so if you want to add it, then here:
The wiki article