Skip to content

Commit c943a05

Browse files
committed
chore: add json struct tags
This keeps the API (https://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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy