Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e0c3ccf

Browse files
committed
Parameters
1 parent 78919d9 commit e0c3ccf

File tree

8 files changed

+683
-15
lines changed

8 files changed

+683
-15
lines changed

coderd/apidoc/docs.go

Lines changed: 209 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -546,6 +546,167 @@ const docTemplate = `{
546546
}
547547
}
548548
},
549+
"/parameters/{scope}/{id}": {
550+
"get": {
551+
"security": [
552+
{
553+
"CoderSessionToken": []
554+
}
555+
],
556+
"produces": [
557+
"application/json"
558+
],
559+
"tags": [
560+
"Parameters"
561+
],
562+
"summary": "Get parameters",
563+
"operationId": "get-parameters",
564+
"parameters": [
565+
{
566+
"enum": [
567+
"template",
568+
"workspace",
569+
"import_job"
570+
],
571+
"type": "string",
572+
"description": "Scope",
573+
"name": "scope",
574+
"in": "path",
575+
"required": true
576+
},
577+
{
578+
"type": "string",
579+
"format": "uuid",
580+
"description": "ID",
581+
"name": "id",
582+
"in": "path",
583+
"required": true
584+
}
585+
],
586+
"responses": {
587+
"200": {
588+
"description": "OK",
589+
"schema": {
590+
"type": "array",
591+
"items": {
592+
"$ref": "#/definitions/codersdk.Parameter"
593+
}
594+
}
595+
}
596+
}
597+
},
598+
"post": {
599+
"security": [
600+
{
601+
"CoderSessionToken": []
602+
}
603+
],
604+
"consumes": [
605+
"application/json"
606+
],
607+
"produces": [
608+
"application/json"
609+
],
610+
"tags": [
611+
"Parameters"
612+
],
613+
"summary": "Create parameter",
614+
"operationId": "create-parameter",
615+
"parameters": [
616+
{
617+
"description": "Parameter request",
618+
"name": "request",
619+
"in": "body",
620+
"required": true,
621+
"schema": {
622+
"$ref": "#/definitions/codersdk.CreateParameterRequest"
623+
}
624+
},
625+
{
626+
"enum": [
627+
"template",
628+
"workspace",
629+
"import_job"
630+
],
631+
"type": "string",
632+
"description": "Scope",
633+
"name": "scope",
634+
"in": "path",
635+
"required": true
636+
},
637+
{
638+
"type": "string",
639+
"format": "uuid",
640+
"description": "ID",
641+
"name": "id",
642+
"in": "path",
643+
"required": true
644+
}
645+
],
646+
"responses": {
647+
"200": {
648+
"description": "OK",
649+
"schema": {
650+
"$ref": "#/definitions/codersdk.Parameter"
651+
}
652+
}
653+
}
654+
}
655+
},
656+
"/parameters/{scope}/{id}/{name}": {
657+
"delete": {
658+
"security": [
659+
{
660+
"CoderSessionToken": []
661+
}
662+
],
663+
"produces": [
664+
"application/json"
665+
],
666+
"tags": [
667+
"Parameters"
668+
],
669+
"summary": "Delete parameter",
670+
"operationId": "delete-parameter",
671+
"parameters": [
672+
{
673+
"enum": [
674+
"template",
675+
"workspace",
676+
"import_job"
677+
],
678+
"type": "string",
679+
"description": "Scope",
680+
"name": "scope",
681+
"in": "path",
682+
"required": true
683+
},
684+
{
685+
"type": "string",
686+
"format": "uuid",
687+
"description": "ID",
688+
"name": "id",
689+
"in": "path",
690+
"required": true
691+
},
692+
{
693+
"type": "string",
694+
"description": "Name",
695+
"name": "name",
696+
"in": "path",
697+
"required": true
698+
}
699+
],
700+
"responses": {
701+
"200": {
702+
"description": "OK",
703+
"schema": {
704+
"$ref": "#/definitions/codersdk.Response"
705+
}
706+
}
707+
}
708+
}
709+
},
549710
"/templates/{id}": {
550711
"get": {
551712
"security": [
@@ -1203,6 +1364,7 @@ const docTemplate = `{
12031364
"destination_scheme": {
12041365
"type": "string",
12051366
"enum": [
1367+
"none",
12061368
"environment_variable",
12071369
"provisioner_variable"
12081370
]
@@ -1213,6 +1375,7 @@ const docTemplate = `{
12131375
"source_scheme": {
12141376
"type": "string",
12151377
"enum": [
1378+
"none",
12161379
"data"
12171380
]
12181381
},
@@ -1782,6 +1945,52 @@ const docTemplate = `{
17821945
}
17831946
}
17841947
},
1948+
"codersdk.Parameter": {
1949+
"description": "Parameter represents a set value for the scope.",
1950+
"type": "object",
1951+
"properties": {
1952+
"created_at": {
1953+
"type": "string"
1954+
},
1955+
"destination_scheme": {
1956+
"type": "string",
1957+
"enum": [
1958+
"none",
1959+
"environment_variable",
1960+
"provisioner_variable"
1961+
]
1962+
},
1963+
"id": {
1964+
"type": "string",
1965+
"format": "uuid"
1966+
},
1967+
"name": {
1968+
"type": "string"
1969+
},
1970+
"scope": {
1971+
"type": "string",
1972+
"enum": [
1973+
"template",
1974+
"workspace",
1975+
"import_job"
1976+
]
1977+
},
1978+
"scope_id": {
1979+
"type": "string",
1980+
"format": "uuid"
1981+
},
1982+
"source_scheme": {
1983+
"type": "string",
1984+
"enum": [
1985+
"none",
1986+
"data"
1987+
]
1988+
},
1989+
"updated_at": {
1990+
"type": "string"
1991+
}
1992+
}
1993+
},
17851994
"codersdk.PprofConfig": {
17861995
"type": "object",
17871996
"properties": {

0 commit comments

Comments
 (0)