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

Skip to content

Commit 5f05cbf

Browse files
committed
Fix compile and make gen
1 parent e49f96c commit 5f05cbf

File tree

8 files changed

+119
-157
lines changed

8 files changed

+119
-157
lines changed

coderd/apidoc/docs.go

Lines changed: 38 additions & 42 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: 32 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

coderd/httpmw/workspaceproxy.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,8 +161,8 @@ func ExtractWorkspaceProxy(opts ExtractWorkspaceProxyConfig) func(http.Handler)
161161

162162
type workspaceProxyParamContextKey struct{}
163163

164-
// WorkspaceProxy returns the worksace proxy from the ExtractWorkspaceProxyParam handler.
165-
func WorkspaceProxy(r *http.Request) database.WorkspaceProxy {
164+
// WorkspaceProxyParam returns the worksace proxy from the ExtractWorkspaceProxyParam handler.
165+
func WorkspaceProxyParam(r *http.Request) database.WorkspaceProxy {
166166
user, ok := r.Context().Value(workspaceProxyParamContextKey{}).(database.WorkspaceProxy)
167167
if !ok {
168168
panic("developer error: workspace proxy parameter middleware not provided")

docs/api/enterprise.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1272,3 +1272,47 @@ curl -X POST http://coder-server:8080/api/v2/workspaceproxies \
12721272
| 201 | [Created](https://tools.ietf.org/html/rfc7231#section-6.3.2) | Created | [codersdk.WorkspaceProxy](schemas.md#codersdkworkspaceproxy) |
12731273

12741274
To perform this operation, you must be authenticated. [Learn more](authentication.md).
1275+
1276+
## Delete workspace proxy
1277+
1278+
### Code samples
1279+
1280+
```shell
1281+
# Example request using curl
1282+
curl -X DELETE http://coder-server:8080/api/v2/workspaceproxies/{workspaceproxy} \
1283+
-H 'Accept: application/json' \
1284+
-H 'Coder-Session-Token: API_KEY'
1285+
```
1286+
1287+
`DELETE /workspaceproxies/{workspaceproxy}`
1288+
1289+
### Parameters
1290+
1291+
| Name | In | Type | Required | Description |
1292+
| ---------------- | ---- | ------------ | -------- | ---------------- |
1293+
| `workspaceproxy` | path | string(uuid) | true | Proxy ID or name |
1294+
1295+
### Example responses
1296+
1297+
> 200 Response
1298+
1299+
```json
1300+
{
1301+
"detail": "string",
1302+
"message": "string",
1303+
"validations": [
1304+
{
1305+
"detail": "string",
1306+
"field": "string"
1307+
}
1308+
]
1309+
}
1310+
```
1311+
1312+
### Responses
1313+
1314+
| Status | Meaning | Description | Schema |
1315+
| ------ | ------------------------------------------------------- | ----------- | ------------------------------------------------ |
1316+
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | [codersdk.Response](schemas.md#codersdkresponse) |
1317+
1318+
To perform this operation, you must be authenticated. [Learn more](authentication.md).

docs/api/workspaceproxies.md

Lines changed: 0 additions & 102 deletions
This file was deleted.

docs/manifest.json

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -462,10 +462,6 @@
462462
"title": "Users",
463463
"path": "./api/users.md"
464464
},
465-
{
466-
"title": "WorkspaceProxies",
467-
"path": "./api/workspaceproxies.md"
468-
},
469465
{
470466
"title": "Workspaces",
471467
"path": "./api/workspaces.md"

enterprise/coderd/workspaceproxy.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ import (
2323

2424
// @Summary Delete workspace proxy
2525
// @ID delete-workspace-proxy
26-
// @Security CoderSessionToken
27-
// @Accept json
26+
// @Security CoderSessionTokeny
27+
2828
// @Produce json
2929
// @Tags Enterprise
3030
// @Param workspaceproxy path string true "Proxy ID or name" format(uuid)
@@ -33,7 +33,7 @@ import (
3333
func (api *API) deleteWorkspaceProxy(rw http.ResponseWriter, r *http.Request) {
3434
var (
3535
ctx = r.Context()
36-
proxy = httpmw.WorkspaceProxy(r)
36+
proxy = httpmw.WorkspaceProxyParam(r)
3737
auditor = api.AGPL.Auditor.Load()
3838
aReq, commitAudit = audit.InitRequest[database.WorkspaceProxy](rw, &audit.RequestParams{
3939
Audit: *auditor,

site/src/api/typesGenerated.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
// From codersdk/apikey.go
32
export interface APIKey {
43
readonly id: string

0 commit comments

Comments
 (0)