Skip to content

Commit 5c96bd5

Browse files
committed
Fix
1 parent b93398e commit 5c96bd5

File tree

4 files changed

+84
-84
lines changed

4 files changed

+84
-84
lines changed

coderd/apidoc/docs.go

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1300,7 +1300,7 @@ const docTemplate = `{
13001300
}
13011301
}
13021302
},
1303-
"/templateversions/{id}": {
1303+
"/templateversions/{templateversion}": {
13041304
"get": {
13051305
"security": [
13061306
{
@@ -1320,7 +1320,7 @@ const docTemplate = `{
13201320
"type": "string",
13211321
"format": "uuid",
13221322
"description": "Template version ID",
1323-
"name": "id",
1323+
"name": "templateversion",
13241324
"in": "path",
13251325
"required": true
13261326
}
@@ -1335,7 +1335,7 @@ const docTemplate = `{
13351335
}
13361336
}
13371337
},
1338-
"/templateversions/{id}/cancel": {
1338+
"/templateversions/{templateversion}/cancel": {
13391339
"patch": {
13401340
"security": [
13411341
{
@@ -1355,7 +1355,7 @@ const docTemplate = `{
13551355
"type": "string",
13561356
"format": "uuid",
13571357
"description": "Template version ID",
1358-
"name": "id",
1358+
"name": "templateversion",
13591359
"in": "path",
13601360
"required": true
13611361
}
@@ -1370,7 +1370,7 @@ const docTemplate = `{
13701370
}
13711371
}
13721372
},
1373-
"/templateversions/{id}/dry-run": {
1373+
"/templateversions/{templateversion}/dry-run": {
13741374
"post": {
13751375
"security": [
13761376
{
@@ -1393,7 +1393,7 @@ const docTemplate = `{
13931393
"type": "string",
13941394
"format": "uuid",
13951395
"description": "Template version ID",
1396-
"name": "id",
1396+
"name": "templateversion",
13971397
"in": "path",
13981398
"required": true
13991399
},
@@ -1417,7 +1417,7 @@ const docTemplate = `{
14171417
}
14181418
}
14191419
},
1420-
"/templateversions/{templateversionid}/dry-run/{jobid}": {
1420+
"/templateversions/{templateversion}/dry-run/{jobid}": {
14211421
"get": {
14221422
"security": [
14231423
{
@@ -1440,7 +1440,7 @@ const docTemplate = `{
14401440
"type": "string",
14411441
"format": "uuid",
14421442
"description": "Template version ID",
1443-
"name": "templateversionid",
1443+
"name": "templateversion",
14441444
"in": "path",
14451445
"required": true
14461446
},
@@ -1463,7 +1463,7 @@ const docTemplate = `{
14631463
}
14641464
}
14651465
},
1466-
"/templateversions/{templateversionid}/dry-run/{jobid}/cancel": {
1466+
"/templateversions/{templateversion}/dry-run/{jobid}/cancel": {
14671467
"patch": {
14681468
"security": [
14691469
{
@@ -1483,7 +1483,7 @@ const docTemplate = `{
14831483
"type": "string",
14841484
"format": "uuid",
14851485
"description": "Template version ID",
1486-
"name": "id",
1486+
"name": "templateversion",
14871487
"in": "path",
14881488
"required": true
14891489
}
@@ -1498,7 +1498,7 @@ const docTemplate = `{
14981498
}
14991499
}
15001500
},
1501-
"/templateversions/{templateversionid}/dry-run/{jobid}/logs": {
1501+
"/templateversions/{templateversion}/dry-run/{jobid}/logs": {
15021502
"get": {
15031503
"security": [
15041504
{
@@ -1518,7 +1518,7 @@ const docTemplate = `{
15181518
"type": "string",
15191519
"format": "uuid",
15201520
"description": "Template version ID",
1521-
"name": "templateversionid",
1521+
"name": "templateversion",
15221522
"in": "path",
15231523
"required": true
15241524
},
@@ -1562,7 +1562,7 @@ const docTemplate = `{
15621562
}
15631563
}
15641564
},
1565-
"/templateversions/{templateversionid}/dry-run/{jobid}/resources": {
1565+
"/templateversions/{templateversion}/dry-run/{jobid}/resources": {
15661566
"get": {
15671567
"security": [
15681568
{
@@ -1582,7 +1582,7 @@ const docTemplate = `{
15821582
"type": "string",
15831583
"format": "uuid",
15841584
"description": "Template version ID",
1585-
"name": "templateversionid",
1585+
"name": "templateversion",
15861586
"in": "path",
15871587
"required": true
15881588
},

coderd/apidoc/swagger.json

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1136,7 +1136,7 @@
11361136
}
11371137
}
11381138
},
1139-
"/templateversions/{id}": {
1139+
"/templateversions/{templateversion}": {
11401140
"get": {
11411141
"security": [
11421142
{
@@ -1152,7 +1152,7 @@
11521152
"type": "string",
11531153
"format": "uuid",
11541154
"description": "Template version ID",
1155-
"name": "id",
1155+
"name": "templateversion",
11561156
"in": "path",
11571157
"required": true
11581158
}
@@ -1167,7 +1167,7 @@
11671167
}
11681168
}
11691169
},
1170-
"/templateversions/{id}/cancel": {
1170+
"/templateversions/{templateversion}/cancel": {
11711171
"patch": {
11721172
"security": [
11731173
{
@@ -1183,7 +1183,7 @@
11831183
"type": "string",
11841184
"format": "uuid",
11851185
"description": "Template version ID",
1186-
"name": "id",
1186+
"name": "templateversion",
11871187
"in": "path",
11881188
"required": true
11891189
}
@@ -1198,7 +1198,7 @@
11981198
}
11991199
}
12001200
},
1201-
"/templateversions/{id}/dry-run": {
1201+
"/templateversions/{templateversion}/dry-run": {
12021202
"post": {
12031203
"security": [
12041204
{
@@ -1215,7 +1215,7 @@
12151215
"type": "string",
12161216
"format": "uuid",
12171217
"description": "Template version ID",
1218-
"name": "id",
1218+
"name": "templateversion",
12191219
"in": "path",
12201220
"required": true
12211221
},
@@ -1239,7 +1239,7 @@
12391239
}
12401240
}
12411241
},
1242-
"/templateversions/{templateversionid}/dry-run/{jobid}": {
1242+
"/templateversions/{templateversion}/dry-run/{jobid}": {
12431243
"get": {
12441244
"security": [
12451245
{
@@ -1256,7 +1256,7 @@
12561256
"type": "string",
12571257
"format": "uuid",
12581258
"description": "Template version ID",
1259-
"name": "templateversionid",
1259+
"name": "templateversion",
12601260
"in": "path",
12611261
"required": true
12621262
},
@@ -1279,7 +1279,7 @@
12791279
}
12801280
}
12811281
},
1282-
"/templateversions/{templateversionid}/dry-run/{jobid}/cancel": {
1282+
"/templateversions/{templateversion}/dry-run/{jobid}/cancel": {
12831283
"patch": {
12841284
"security": [
12851285
{
@@ -1295,7 +1295,7 @@
12951295
"type": "string",
12961296
"format": "uuid",
12971297
"description": "Template version ID",
1298-
"name": "id",
1298+
"name": "templateversion",
12991299
"in": "path",
13001300
"required": true
13011301
}
@@ -1310,7 +1310,7 @@
13101310
}
13111311
}
13121312
},
1313-
"/templateversions/{templateversionid}/dry-run/{jobid}/logs": {
1313+
"/templateversions/{templateversion}/dry-run/{jobid}/logs": {
13141314
"get": {
13151315
"security": [
13161316
{
@@ -1326,7 +1326,7 @@
13261326
"type": "string",
13271327
"format": "uuid",
13281328
"description": "Template version ID",
1329-
"name": "templateversionid",
1329+
"name": "templateversion",
13301330
"in": "path",
13311331
"required": true
13321332
},
@@ -1370,7 +1370,7 @@
13701370
}
13711371
}
13721372
},
1373-
"/templateversions/{templateversionid}/dry-run/{jobid}/resources": {
1373+
"/templateversions/{templateversion}/dry-run/{jobid}/resources": {
13741374
"get": {
13751375
"security": [
13761376
{
@@ -1386,7 +1386,7 @@
13861386
"type": "string",
13871387
"format": "uuid",
13881388
"description": "Template version ID",
1389-
"name": "templateversionid",
1389+
"name": "templateversion",
13901390
"in": "path",
13911391
"required": true
13921392
},

coderd/templateversions.go

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ import (
3333
// @Security CoderSessionToken
3434
// @Produce json
3535
// @Tags Templates
36-
// @Param id path string true "Template version ID" format(uuid)
36+
// @Param templateversion path string true "Template version ID" format(uuid)
3737
// @Success 200 {object} codersdk.TemplateVersion
38-
// @Router /templateversions/{id} [get]
38+
// @Router /templateversions/{templateversion} [get]
3939
func (api *API) templateVersion(rw http.ResponseWriter, r *http.Request) {
4040
ctx := r.Context()
4141
var (
@@ -74,9 +74,9 @@ func (api *API) templateVersion(rw http.ResponseWriter, r *http.Request) {
7474
// @Security CoderSessionToken
7575
// @Produce json
7676
// @Tags Templates
77-
// @Param id path string true "Template version ID" format(uuid)
77+
// @Param templateversion path string true "Template version ID" format(uuid)
7878
// @Success 200 {object} codersdk.Response
79-
// @Router /templateversions/{id}/cancel [patch]
79+
// @Router /templateversions/{templateversion}/cancel [patch]
8080
func (api *API) patchCancelTemplateVersion(rw http.ResponseWriter, r *http.Request) {
8181
ctx := r.Context()
8282
var (
@@ -251,10 +251,10 @@ func (api *API) templateVersionParameters(rw http.ResponseWriter, r *http.Reques
251251
// @Accept json
252252
// @Produce json
253253
// @Tags Templates
254-
// @Param id path string true "Template version ID" format(uuid)
254+
// @Param templateversion path string true "Template version ID" format(uuid)
255255
// @Param request body codersdk.CreateTemplateVersionDryRunRequest true "Dry-run request"
256256
// @Success 201 {object} codersdk.ProvisionerJob
257-
// @Router /templateversions/{id}/dry-run [post]
257+
// @Router /templateversions/{templateversion}/dry-run [post]
258258
func (api *API) postTemplateVersionDryRun(rw http.ResponseWriter, r *http.Request) {
259259
ctx := r.Context()
260260
var (
@@ -356,10 +356,10 @@ func (api *API) postTemplateVersionDryRun(rw http.ResponseWriter, r *http.Reques
356356
// @Accept json
357357
// @Produce json
358358
// @Tags Templates
359-
// @Param templateversionid path string true "Template version ID" format(uuid)
359+
// @Param templateversion path string true "Template version ID" format(uuid)
360360
// @Param jobid path string true "Job ID" format(uuid)
361361
// @Success 200 {object} codersdk.ProvisionerJob
362-
// @Router /templateversions/{templateversionid}/dry-run/{jobid} [get]
362+
// @Router /templateversions/{templateversion}/dry-run/{jobid} [get]
363363
func (api *API) templateVersionDryRun(rw http.ResponseWriter, r *http.Request) {
364364
ctx := r.Context()
365365
job, ok := api.fetchTemplateVersionDryRunJob(rw, r)
@@ -375,10 +375,10 @@ func (api *API) templateVersionDryRun(rw http.ResponseWriter, r *http.Request) {
375375
// @Security CoderSessionToken
376376
// @Produce json
377377
// @Tags Templates
378-
// @Param templateversionid path string true "Template version ID" format(uuid)
378+
// @Param templateversion path string true "Template version ID" format(uuid)
379379
// @Param jobid path string true "Job ID" format(uuid)
380380
// @Success 200 {array} codersdk.WorkspaceResource
381-
// @Router /templateversions/{templateversionid}/dry-run/{jobid}/resources [get]
381+
// @Router /templateversions/{templateversion}/dry-run/{jobid}/resources [get]
382382
func (api *API) templateVersionDryRunResources(rw http.ResponseWriter, r *http.Request) {
383383
job, ok := api.fetchTemplateVersionDryRunJob(rw, r)
384384
if !ok {
@@ -393,13 +393,13 @@ func (api *API) templateVersionDryRunResources(rw http.ResponseWriter, r *http.R
393393
// @Security CoderSessionToken
394394
// @Produce json
395395
// @Tags Templates
396-
// @Param templateversionid path string true "Template version ID" format(uuid)
396+
// @Param templateversion path string true "Template version ID" format(uuid)
397397
// @Param jobid path string true "Job ID" format(uuid)
398398
// @Param before query int false "Before Unix timestamp"
399399
// @Param after query int false "After Unix timestamp"
400400
// @Param follow query bool false "Follow log stream"
401401
// @Success 200 {array} codersdk.ProvisionerJobLog
402-
// @Router /templateversions/{templateversionid}/dry-run/{jobid}/logs [get]
402+
// @Router /templateversions/{templateversion}/dry-run/{jobid}/logs [get]
403403
func (api *API) templateVersionDryRunLogs(rw http.ResponseWriter, r *http.Request) {
404404
job, ok := api.fetchTemplateVersionDryRunJob(rw, r)
405405
if !ok {
@@ -414,9 +414,9 @@ func (api *API) templateVersionDryRunLogs(rw http.ResponseWriter, r *http.Reques
414414
// @Security CoderSessionToken
415415
// @Produce json
416416
// @Tags Templates
417-
// @Param id path string true "Template version ID" format(uuid)
417+
// @Param templateversion path string true "Template version ID" format(uuid)
418418
// @Success 200 {object} codersdk.Response
419-
// @Router /templateversions/{templateversionid}/dry-run/{jobid}/cancel [patch]
419+
// @Router /templateversions/{templateversion}/dry-run/{jobid}/cancel [patch]
420420
func (api *API) patchTemplateVersionDryRunCancel(rw http.ResponseWriter, r *http.Request) {
421421
ctx := r.Context()
422422
templateVersion := httpmw.TemplateVersionParam(r)

0 commit comments

Comments
 (0)