Skip to content

Commit 80a5d1a

Browse files
committed
Make template ID optional in create template version request
1 parent f5d1b62 commit 80a5d1a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

codersdk/organizations.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ type Organization struct {
2424
// CreateTemplateVersionRequest enables callers to create a new Template Version.
2525
type CreateTemplateVersionRequest struct {
2626
// TemplateID optionally associates a version with a template.
27-
TemplateID uuid.UUID `json:"template_id"`
27+
TemplateID uuid.UUID `json:"template_id,omitempty"`
2828

2929
StorageMethod database.ProvisionerStorageMethod `json:"storage_method" validate:"oneof=file,required"`
3030
StorageSource string `json:"storage_source" validate:"required"`

site/src/api/typesGenerated.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ export interface CreateTemplateRequest {
6868

6969
// From codersdk/organizations.go:25:6
7070
export interface CreateTemplateVersionRequest {
71-
readonly template_id: string
71+
readonly template_id?: string
7272
// This is likely an enum in an external package ("github.com/coder/coder/coderd/database.ProvisionerStorageMethod")
7373
readonly storage_method: string
7474
readonly storage_source: string

0 commit comments

Comments
 (0)