Skip to content

Commit fbe1d70

Browse files
committed
Swagger comments in workspacebuilds.go
1 parent a3fbe72 commit fbe1d70

File tree

5 files changed

+1046
-0
lines changed

5 files changed

+1046
-0
lines changed

coderd/apidoc/docs.go

Lines changed: 217 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -875,6 +875,200 @@ const docTemplate = `{
875875
}
876876
}
877877
},
878+
"/workspacebuilds/{workspacebuild}": {
879+
"get": {
880+
"security": [
881+
{
882+
"CoderSessionToken": []
883+
}
884+
],
885+
"produces": [
886+
"application/json"
887+
],
888+
"tags": [
889+
"Workspaces"
890+
],
891+
"summary": "Get workspace build",
892+
"operationId": "get-workspace-build",
893+
"parameters": [
894+
{
895+
"type": "string",
896+
"description": "Workspace build ID",
897+
"name": "workspacebuild",
898+
"in": "path",
899+
"required": true
900+
}
901+
],
902+
"responses": {
903+
"200": {
904+
"description": "OK",
905+
"schema": {
906+
"$ref": "#/definitions/codersdk.WorkspaceBuild"
907+
}
908+
}
909+
}
910+
}
911+
},
912+
"/workspacebuilds/{workspacebuild}/cancel": {
913+
"patch": {
914+
"security": [
915+
{
916+
"CoderSessionToken": []
917+
}
918+
],
919+
"produces": [
920+
"application/json"
921+
],
922+
"tags": [
923+
"Workspaces"
924+
],
925+
"summary": "Cancel workspace build",
926+
"operationId": "cancel-workspace-build",
927+
"parameters": [
928+
{
929+
"type": "string",
930+
"description": "Workspace build ID",
931+
"name": "workspacebuild",
932+
"in": "path",
933+
"required": true
934+
}
935+
],
936+
"responses": {
937+
"200": {
938+
"description": "OK",
939+
"schema": {
940+
"$ref": "#/definitions/codersdk.Response"
941+
}
942+
}
943+
}
944+
}
945+
},
946+
"/workspacebuilds/{workspacebuild}/logs": {
947+
"get": {
948+
"security": [
949+
{
950+
"CoderSessionToken": []
951+
}
952+
],
953+
"produces": [
954+
"application/json"
955+
],
956+
"tags": [
957+
"Workspaces"
958+
],
959+
"summary": "Get workspace build logs",
960+
"operationId": "get-workspace-build-logs",
961+
"parameters": [
962+
{
963+
"type": "string",
964+
"description": "Workspace build ID",
965+
"name": "workspacebuild",
966+
"in": "path",
967+
"required": true
968+
},
969+
{
970+
"type": "integer",
971+
"description": "Before Unix timestamp",
972+
"name": "before",
973+
"in": "query"
974+
},
975+
{
976+
"type": "integer",
977+
"description": "After Unix timestamp",
978+
"name": "after",
979+
"in": "query"
980+
},
981+
{
982+
"type": "boolean",
983+
"description": "Follow log stream",
984+
"name": "follow",
985+
"in": "query"
986+
}
987+
],
988+
"responses": {
989+
"200": {
990+
"description": "OK",
991+
"schema": {
992+
"type": "array",
993+
"items": {
994+
"$ref": "#/definitions/codersdk.ProvisionerJobLog"
995+
}
996+
}
997+
}
998+
}
999+
}
1000+
},
1001+
"/workspacebuilds/{workspacebuild}/resources": {
1002+
"get": {
1003+
"security": [
1004+
{
1005+
"CoderSessionToken": []
1006+
}
1007+
],
1008+
"produces": [
1009+
"application/json"
1010+
],
1011+
"tags": [
1012+
"Workspaces"
1013+
],
1014+
"summary": "Get workspace resources for workspace build",
1015+
"operationId": "get-workspace-resources-for-workspace-build",
1016+
"parameters": [
1017+
{
1018+
"type": "string",
1019+
"description": "Workspace build ID",
1020+
"name": "workspacebuild",
1021+
"in": "path",
1022+
"required": true
1023+
}
1024+
],
1025+
"responses": {
1026+
"200": {
1027+
"description": "OK",
1028+
"schema": {
1029+
"type": "array",
1030+
"items": {
1031+
"$ref": "#/definitions/codersdk.WorkspaceResource"
1032+
}
1033+
}
1034+
}
1035+
}
1036+
}
1037+
},
1038+
"/workspacebuilds/{workspacebuild}/state": {
1039+
"get": {
1040+
"security": [
1041+
{
1042+
"CoderSessionToken": []
1043+
}
1044+
],
1045+
"produces": [
1046+
"application/json"
1047+
],
1048+
"tags": [
1049+
"Workspaces"
1050+
],
1051+
"summary": "Get provisioner state for workspace build",
1052+
"operationId": "get-provisioner-state-for-workspace-build",
1053+
"parameters": [
1054+
{
1055+
"type": "string",
1056+
"description": "Workspace build ID",
1057+
"name": "workspacebuild",
1058+
"in": "path",
1059+
"required": true
1060+
}
1061+
],
1062+
"responses": {
1063+
"200": {
1064+
"description": "OK",
1065+
"schema": {
1066+
"$ref": "#/definitions/codersdk.WorkspaceBuild"
1067+
}
1068+
}
1069+
}
1070+
}
1071+
},
8781072
"/workspaces": {
8791073
"get": {
8801074
"security": [
@@ -2101,6 +2295,29 @@ const docTemplate = `{
21012295
}
21022296
}
21032297
},
2298+
"codersdk.ProvisionerJobLog": {
2299+
"type": "object",
2300+
"properties": {
2301+
"created_at": {
2302+
"type": "string"
2303+
},
2304+
"id": {
2305+
"type": "integer"
2306+
},
2307+
"log_level": {
2308+
"type": "string"
2309+
},
2310+
"log_source": {
2311+
"type": "string"
2312+
},
2313+
"output": {
2314+
"type": "string"
2315+
},
2316+
"stage": {
2317+
"type": "string"
2318+
}
2319+
}
2320+
},
21042321
"codersdk.PutExtendWorkspaceRequest": {
21052322
"type": "object",
21062323
"required": [

0 commit comments

Comments
 (0)