-
-
Notifications
You must be signed in to change notification settings - Fork 82
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
A bunch of dev work #920
A bunch of dev work #920
Conversation
- API and client to version 5.0.0 - Added a bunch more model validations - Added error codes - Added limits to database strings - Redid client exceptions to be more sane - Added configurable instance and user limits - Always clamp rights to their valid ranges - Add an error if the minimum password length is more than the string limit - Fixed chat bot name contraints crossing instances - Enforce that SIDs be unique globally - Normalize instance paths to forward slashes on windows. Added to sanitizer - Added migrations - Added ApiAssert for testing error codes
26ce630
to
e1a53c2
Compare
@@ -1,5 +1,7 @@ | |||
//tgstation-server DMAPI |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could convert the comments here to follow dmdoc spec
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i dont think we dmdoc tgs do we
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, it's a concrete part of the tg repo so it's subject to it like everything else.
Regardless, I think I'll exclude it, the DMAPI is meant to document itself with this file.
var attributes = (DescriptionAttribute[])typeof(ErrorCode) | ||
.GetField(errorCode.ToString()) | ||
?.GetCustomAttributes(typeof(DescriptionAttribute), false); | ||
|
||
return attributes.FirstOrDefault()?.Description; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
attributes.FirstOrDefault() will throw null reference when GetField returns null
if you're using ?. after GetField it may be worth checking for that null on the return line
'"' + assemblyPath + '"', | ||
'"' + updateDirectory + '"' | ||
'"' + updateDirectory + '"', | ||
'"' + watchdogVersion + '"' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not use string interpolation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mainly cause the Host.Watchdog component is a dirt simple shitcode hack on top of the actual server that I didn't put much effort into.
#924 and will fix this here.
Codecov Report
@@ Coverage Diff @@
## dev #920 +/- ##
==========================================
- Coverage 45.64% 45.27% -0.38%
==========================================
Files 249 258 +9
Lines 24645 26996 +2351
Branches 15805 17761 +1956
==========================================
+ Hits 11250 12222 +972
- Misses 13330 14709 +1379
Partials 65 65 |
Closes #894
Closes #913
🆑
Most failed requests now come with an error code defined in the API spec.
We now independently version several internal components such as the REST and DM APIs.
A hard limit of 1000 UTF-8 characters have been added to most strings in models.
Improved server-side validation of many models.
It's no longer possible to set rights enums to invalidly high values.
It's no longer possible to create multiple users with the same system identifier.
Fixed chat bot names conflicting with those in separate instances.
Added configurable limits for the maximum number of users and instances in the server.
/:cl: