Skip to content

Commit f69e3f0

Browse files
committed
Fix make gen referencing old type names
1 parent ab01da7 commit f69e3f0

File tree

9 files changed

+148
-182
lines changed

9 files changed

+148
-182
lines changed

coderd/apidoc/docs.go

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

coderd/workspaceagents.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ func (api *API) workspaceAgentPTY(rw http.ResponseWriter, r *http.Request) {
299299
// @Produce json
300300
// @Tags Agents
301301
// @Param workspaceagent path string true "Workspace agent ID" format(uuid)
302-
// @Success 200 {object} codersdk.ListeningPortsResponse
302+
// @Success 200 {object} codersdk.WorkspaceAgentListeningPortsResponse
303303
// @Router /workspaceagents/{workspaceagent}/listening-ports [get]
304304
func (api *API) workspaceAgentListeningPorts(rw http.ResponseWriter, r *http.Request) {
305305
ctx := r.Context()

coderd/workspaceapps.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,15 +77,15 @@ const (
7777
// @Security CoderSessionToken
7878
// @Produce json
7979
// @Tags Applications
80-
// @Success 200 {object} codersdk.GetAppHostResponse
80+
// @Success 200 {object} codersdk.WorkspaceAppHostResponse
8181
// @Router /applications/host [get]
8282
func (api *API) appHost(rw http.ResponseWriter, r *http.Request) {
8383
host := api.AppHostname
8484
if host != "" && api.AccessURL.Port() != "" {
8585
host += fmt.Sprintf(":%s", api.AccessURL.Port())
8686
}
8787

88-
httpapi.Write(r.Context(), rw, http.StatusOK, codersdk.AppHostResponse{
88+
httpapi.Write(r.Context(), rw, http.StatusOK, codersdk.WorkspaceAppHostResponse{
8989
Host: host,
9090
})
9191
}

codersdk/deployment.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import (
1111
"golang.org/x/xerrors"
1212
)
1313

14+
// Entitlement represents whether a feature is licensed.
1415
type Entitlement string
1516

1617
const (
@@ -19,7 +20,8 @@ const (
1920
EntitlementNotEntitled Entitlement = "not_entitled"
2021
)
2122

22-
// To add a new feature, modify this set of enums as well as the FeatureNames
23+
// FeatureName represents the internal name of a feature.
24+
// To add a new feature, add it to this set of enums as well as the FeatureNames
2325
// array below.
2426
type FeatureName string
2527

codersdk/workspaces.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ func (c *Client) WorkspaceByOwnerAndName(ctx context.Context, owner string, name
350350
return workspace, json.NewDecoder(res.Body).Decode(&workspace)
351351
}
352352

353-
type AppHostResponse struct {
353+
type WorkspaceAppHostResponse struct {
354354
// Host is the externally accessible URL for the Coder instance.
355355
Host string `json:"host"`
356356
}
@@ -361,18 +361,18 @@ type AppHostResponse struct {
361361
// "my-app--agent--workspace--username.apps.coder.com".
362362
//
363363
// If the app host is not set, the response will contain an empty string.
364-
func (c *Client) AppHost(ctx context.Context) (AppHostResponse, error) {
364+
func (c *Client) AppHost(ctx context.Context) (WorkspaceAppHostResponse, error) {
365365
res, err := c.Request(ctx, http.MethodGet, "/api/v2/applications/host", nil)
366366
if err != nil {
367-
return AppHostResponse{}, err
367+
return WorkspaceAppHostResponse{}, err
368368
}
369369
defer res.Body.Close()
370370

371371
if res.StatusCode != http.StatusOK {
372-
return AppHostResponse{}, readBodyAsError(res)
372+
return WorkspaceAppHostResponse{}, readBodyAsError(res)
373373
}
374374

375-
var host AppHostResponse
375+
var host WorkspaceAppHostResponse
376376
return host, json.NewDecoder(res.Body).Decode(&host)
377377
}
378378

docs/api/agents.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -666,7 +666,7 @@ curl -X GET http://coder-server:8080/api/v2/workspaceagents/{workspaceagent}/lis
666666
{
667667
"ports": [
668668
{
669-
"network": "tcp",
669+
"network": "string",
670670
"port": 0,
671671
"process_name": "string"
672672
}
@@ -676,9 +676,9 @@ curl -X GET http://coder-server:8080/api/v2/workspaceagents/{workspaceagent}/lis
676676

677677
### Responses
678678

679-
| Status | Meaning | Description | Schema |
680-
| ------ | ------------------------------------------------------- | ----------- | ---------------------------------------------------------------------------- |
681-
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | [codersdk.ListeningPortsResponse](schemas.md#codersdklisteningportsresponse) |
679+
| Status | Meaning | Description | Schema |
680+
| ------ | ------------------------------------------------------- | ----------- | -------------------------------------------------------------------------------------------------------- |
681+
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | [codersdk.WorkspaceAgentListeningPortsResponse](schemas.md#codersdkworkspaceagentlisteningportsresponse) |
682682

683683
To perform this operation, you must be authenticated. [Learn more](authentication.md).
684684

docs/api/applications.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ curl -X GET http://coder-server:8080/api/v2/applications/host \
5151

5252
### Responses
5353

54-
| Status | Meaning | Description | Schema |
55-
| ------ | ------------------------------------------------------- | ----------- | -------------------------------------------------------------------- |
56-
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | [codersdk.GetAppHostResponse](schemas.md#codersdkgetapphostresponse) |
54+
| Status | Meaning | Description | Schema |
55+
| ------ | ------------------------------------------------------- | ----------- | -------------------------------------------------------------------------------- |
56+
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | [codersdk.WorkspaceAppHostResponse](schemas.md#codersdkworkspaceapphostresponse) |
5757

5858
To perform this operation, you must be authenticated. [Learn more](authentication.md).

0 commit comments

Comments
 (0)