feat: add dynamic parameters websocket endpoint (#17165)

This commit is contained in:
ケイラ
2025-04-10 13:08:50 -07:00
committed by GitHub
parent c9682cb6cf
commit 859dd2fc3f
19 changed files with 2291 additions and 347 deletions

View File

@ -32,8 +32,10 @@ func main() {
// Serpent has some types referenced in the codersdk.
// We want the referenced types generated.
referencePackages := map[string]string{
"github.com/coder/serpent": "Serpent",
"tailscale.com/derp": "",
"github.com/coder/preview": "",
"github.com/coder/serpent": "Serpent",
"github.com/hashicorp/hcl/v2": "Hcl",
"tailscale.com/derp": "",
// Conflicting name "DERPRegion"
"tailscale.com/tailcfg": "Tail",
"tailscale.com/net/netcheck": "Netcheck",
@ -88,7 +90,8 @@ func TypeMappings(gen *guts.GoParser) error {
gen.IncludeCustomDeclaration(map[string]guts.TypeOverride{
"github.com/coder/coder/v2/codersdk.NullTime": config.OverrideNullable(config.OverrideLiteral(bindings.KeywordString)),
// opt.Bool can return 'null' if unset
"tailscale.com/types/opt.Bool": config.OverrideNullable(config.OverrideLiteral(bindings.KeywordBoolean)),
"tailscale.com/types/opt.Bool": config.OverrideNullable(config.OverrideLiteral(bindings.KeywordBoolean)),
"github.com/hashicorp/hcl/v2.Expression": config.OverrideLiteral(bindings.KeywordUnknown),
})
err := gen.IncludeCustom(map[string]string{