Skip to content

Commit b6abcba

Browse files
authored
chore: correct template API docs (coder#19228)
1 parent 6553771 commit b6abcba

File tree

5 files changed

+312
-17
lines changed

5 files changed

+312
-17
lines changed

coderd/apidoc/docs.go

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

coderd/apidoc/swagger.json

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

coderd/templates.go

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ import (
3838

3939
// Returns a single template.
4040
//
41-
// @Summary Get template metadata by ID
42-
// @ID get-template-metadata-by-id
41+
// @Summary Get template settings by ID
42+
// @ID get-template-settings-by-id
4343
// @Security CoderSessionToken
4444
// @Produce json
4545
// @Tags Templates
@@ -629,12 +629,14 @@ func (api *API) templateByOrganizationAndName(rw http.ResponseWriter, r *http.Re
629629
httpapi.Write(ctx, rw, http.StatusOK, api.convertTemplate(template))
630630
}
631631

632-
// @Summary Update template metadata by ID
633-
// @ID update-template-metadata-by-id
632+
// @Summary Update template settings by ID
633+
// @ID update-template-settings-by-id
634634
// @Security CoderSessionToken
635+
// @Accept json
635636
// @Produce json
636637
// @Tags Templates
637638
// @Param template path string true "Template ID" format(uuid)
639+
// @Param request body codersdk.UpdateTemplateMeta true "Patch template settings request"
638640
// @Success 200 {object} codersdk.Template
639641
// @Router /templates/{template} [patch]
640642
func (api *API) patchTemplateMeta(rw http.ResponseWriter, r *http.Request) {

0 commit comments

Comments
 (0)