Skip to content

Commit d8cb335

Browse files
committed
Fix: by ID
1 parent 80dbf3d commit d8cb335

File tree

7 files changed

+14
-15
lines changed

7 files changed

+14
-15
lines changed

coderd/apidoc/docs.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ const docTemplate = `{
9393
"tags": [
9494
"Templates"
9595
],
96-
"summary": "Get template metadata",
96+
"summary": "Get template metadata by ID",
9797
"operationId": "get-template",
9898
"parameters": [
9999
{
@@ -214,7 +214,7 @@ const docTemplate = `{
214214
"tags": [
215215
"Workspaces"
216216
],
217-
"summary": "Get workspace metadata",
217+
"summary": "Get workspace metadata by ID",
218218
"operationId": "get-workspace",
219219
"parameters": [
220220
{

coderd/apidoc/swagger.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@
8585
"tags": [
8686
"Templates"
8787
],
88-
"summary": "Get template metadata",
88+
"summary": "Get template metadata by ID",
8989
"operationId": "get-template",
9090
"parameters": [
9191
{
@@ -206,7 +206,7 @@
206206
"tags": [
207207
"Workspaces"
208208
],
209-
"summary": "Get workspace metadata",
209+
"summary": "Get workspace metadata by ID",
210210
"operationId": "get-workspace",
211211
"parameters": [
212212
{

coderd/coderd.go

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -101,19 +101,18 @@ type Options struct {
101101
RealIPConfig *httpmw.RealIPConfig
102102
TrialGenerator func(ctx context.Context, email string) error
103103
// TLSCertificates is used to mesh DERP servers securely.
104-
TLSCertificates []tls.Certificate
105-
TailnetCoordinator tailnet.Coordinator
106-
DERPServer *derp.Server
107-
DERPMap *tailcfg.DERPMap
104+
TLSCertificates []tls.Certificate
105+
TailnetCoordinator tailnet.Coordinator
106+
DERPServer *derp.Server
107+
DERPMap *tailcfg.DERPMap
108+
SwaggerEndpointEnable bool
108109

109110
MetricsCacheRefreshInterval time.Duration
110111
AgentStatsRefreshInterval time.Duration
111112
Experimental bool
112113
DeploymentConfig *codersdk.DeploymentConfig
113114
UpdateCheckOptions *updatecheck.Options // Set non-nil to enable update checking.
114115

115-
SwaggerEndpointEnable bool
116-
117116
HTTPClient *http.Client
118117
}
119118

@@ -604,7 +603,7 @@ func New(options *Options) *API {
604603
if options.SwaggerEndpointEnable {
605604
// Swagger UI requires the URL trailing slash. Otherwise, the browser tries to load /assets
606605
// from http://localhost:8080/assets instead of http://localhost:8080/swagger/assets.
607-
r.Get("/swagger", http.RedirectHandler("/swagger/", http.StatusSeeOther).ServeHTTP)
606+
r.Get("/swagger", http.RedirectHandler("/swagger/", http.StatusTemporaryRedirect).ServeHTTP)
608607
r.Get("/swagger/*", httpSwagger.Handler(httpSwagger.URL("/swagger/doc.json")))
609608
}
610609

coderd/templates.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ const (
3434
AutoImportTemplateKubernetes AutoImportTemplate = "kubernetes"
3535
)
3636

37-
// @Summary Get template metadata
37+
// @Summary Get template metadata by ID
3838
// @ID get-template
3939
// @Security CoderSessionToken
4040
// @Produce json

coderd/workspaces.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ var (
4343
errDeadlineBeforeStart = xerrors.New("new deadline must be before workspace start time")
4444
)
4545

46-
// @Summary Get workspace metadata
46+
// @Summary Get workspace metadata by ID
4747
// @ID get-workspace
4848
// @Security CoderSessionToken
4949
// @Produce json

docs/api/templates.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ curl -X POST http://coder-server:8080/api/v2/organizations/{organization-id}/tem
9090

9191
To perform this operation, you must be authenticated by means of one of the following methods: **CoderSessionToken**.
9292

93-
## Get template metadata
93+
## Get template metadata by ID
9494

9595
### Code samples
9696

docs/api/workspaces.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ curl -X GET http://coder-server:8080/api/v2/workspaces \
171171

172172
To perform this operation, you must be authenticated by means of one of the following methods: **CoderSessionToken**.
173173

174-
## Get workspace metadata
174+
## Get workspace metadata by ID
175175

176176
### Code samples
177177

0 commit comments

Comments
 (0)