mirror of
https://github.com/coder/coder.git
synced 2026-06-02 20:48:20 +00:00
chore: switch to guts for typescript types generation (#15801)
switch to guts for typescript type generation omitempty vs null must now be explicit
This commit is contained in:
@@ -131,7 +131,7 @@ func (r *HealthcheckReport) Summarize(docsURL string) []string {
|
||||
|
||||
// BaseReport holds fields common to various health reports.
|
||||
type BaseReport struct {
|
||||
Error *string `json:"error"`
|
||||
Error *string `json:"error,omitempty"`
|
||||
Severity health.Severity `json:"severity" enums:"ok,warning,error"`
|
||||
Warnings []health.Message `json:"warnings"`
|
||||
Dismissed bool `json:"dismissed"`
|
||||
@@ -185,8 +185,8 @@ type DERPHealthReport struct {
|
||||
// Healthy is deprecated and left for backward compatibility purposes, use `Severity` instead.
|
||||
Healthy bool `json:"healthy"`
|
||||
Regions map[int]*DERPRegionReport `json:"regions"`
|
||||
Netcheck *netcheck.Report `json:"netcheck"`
|
||||
NetcheckErr *string `json:"netcheck_err"`
|
||||
Netcheck *netcheck.Report `json:"netcheck,omitempty"`
|
||||
NetcheckErr *string `json:"netcheck_err,omitempty"`
|
||||
NetcheckLogs []string `json:"netcheck_logs"`
|
||||
}
|
||||
|
||||
@@ -196,7 +196,7 @@ type DERPRegionReport struct {
|
||||
Healthy bool `json:"healthy"`
|
||||
Severity health.Severity `json:"severity" enums:"ok,warning,error"`
|
||||
Warnings []health.Message `json:"warnings"`
|
||||
Error *string `json:"error"`
|
||||
Error *string `json:"error,omitempty"`
|
||||
Region *tailcfg.DERPRegion `json:"region"`
|
||||
NodeReports []*DERPNodeReport `json:"node_reports"`
|
||||
}
|
||||
@@ -207,7 +207,7 @@ type DERPNodeReport struct {
|
||||
Healthy bool `json:"healthy"`
|
||||
Severity health.Severity `json:"severity" enums:"ok,warning,error"`
|
||||
Warnings []health.Message `json:"warnings"`
|
||||
Error *string `json:"error"`
|
||||
Error *string `json:"error,omitempty"`
|
||||
|
||||
Node *tailcfg.DERPNode `json:"node"`
|
||||
|
||||
|
||||
Reference in New Issue
Block a user