8000 chore: add json struct tags · coder/coder@c943a05 · GitHub
[go: up one dir, main page]

Skip to content

Commit c943a05

Browse files
committed
chore: add json struct tags
This keeps the API (http 10000 s://coder.com/docs/reference/api/schemas#codersdkpreset) consistent but fixes the generated TS Signed-off-by: Danny Kopping <dannykopping@gmail.com>
1 parent 2ab771c commit c943a05

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

codersdk/presets.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@ import (
1111
)
1212

1313
type Preset struct {
14-
ID uuid.UUID
15-
Name string
16-
Parameters []PresetParameter
17-
Default bool
14+
ID uuid.UUID `json:"id"`
15+
Name string `json:"name"`
16+
Parameters []PresetParameter `json:"parameters"`
17+
Default bool `json:"default"`
1818
}
1919

2020
type PresetParameter struct {
21-
Name string
22-
Value string
21+
Name string `json:"name"`
22+
Value string `json:"value"`
2323
}
2424

2525
// TemplateVersionPresets returns the presets associated with a template version.

site/src/api/typesGenerated.ts

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)
0