Skip to content

refactor(site): use generated Healthcheck API entities #10650

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

Merged
merged 5 commits into from
Nov 13, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Healthcheck fix
  • Loading branch information
mtojek committed Nov 13, 2023
commit a7ec151ff6af5d187d851a57cb398043b972c6ff
2 changes: 1 addition & 1 deletion coderd/healthcheck/healthcheck.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ type Checker interface {
Database(ctx context.Context, opts *DatabaseReportOptions) DatabaseReport
}

// @typescript-generate DerphealthReport
// @typescript-generate Report
type Report struct {
// Time is the time the report was generated at.
Time time.Time `json:"time"`
Expand Down
4 changes: 2 additions & 2 deletions scripts/apitypings/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ import (

var (
// baseDirs are the directories to introspect for types to generate.
baseDirs = [...]string{"./codersdk", "./coderd/healthcheck", "./coderd/healthcheck/derphealth"}
baseDirs = [...]string{"./codersdk", "./coderd/healthcheck"}
// externalTypes are types that are not in the baseDirs, but we want to
// support. These are usually types that are used in the baseDirs.
// Do not include things like "Database", as that would break the idea
// of splitting db and api types.
// Only include dirs that are client facing packages.
externalTypeDirs = [...]string{"./cli/clibase"}
externalTypeDirs = [...]string{"./cli/clibase", "./coderd/healthcheck/derphealth"}
indent = " "
)

Expand Down
94 changes: 46 additions & 48 deletions site/src/api/typesGenerated.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.