Skip to content

Commit ada06ec

Browse files
committed
Merge branch 'main' of github.com:/coder/coder into dk/prebuilds
2 parents efcc2a2 + 345435a commit ada06ec

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+1194
-500
lines changed

coderd/apidoc/docs.go

+37-29
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

coderd/apidoc/swagger.json

+35-27
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

coderd/coderd.go

+11-4
Original file line numberDiff line numberDiff line change
@@ -1111,10 +1111,6 @@ func New(options *Options) *API {
11111111
// The idea is to return an empty [], so that the coder CLI won't get blocked accidentally.
11121112
r.Get("/schema", templateVersionSchemaDeprecated)
11131113
r.Get("/parameters", templateVersionParametersDeprecated)
1114-
r.Group(func(r chi.Router) {
1115-
r.Use(httpmw.RequireExperiment(api.Experiments, codersdk.ExperimentDynamicParameters))
1116-
r.Get("/dynamic-parameters", api.templateVersionDynamicParameters)
1117-
})
11181114
r.Get("/rich-parameters", api.templateVersionRichParameters)
11191115
r.Get("/external-auth", api.templateVersionExternalAuth)
11201116
r.Get("/variables", api.templateVersionVariables)
@@ -1180,6 +1176,17 @@ func New(options *Options) *API {
11801176
// organization member. This endpoint should match the authz story of
11811177
// postWorkspacesByOrganization
11821178
r.Post("/workspaces", api.postUserWorkspaces)
1179+
1180+
// Similarly to creating a workspace, evaluating parameters for a
1181+
// new workspace should also match the authz story of
1182+
// postWorkspacesByOrganization
1183+
r.Route("/templateversions/{templateversion}", func(r chi.Router) {
1184+
r.Use(
1185+
httpmw.ExtractTemplateVersionParam(options.Database),
1186+
httpmw.RequireExperiment(api.Experiments, codersdk.ExperimentDynamicParameters),
1187+
)
1188+
r.Get("/parameters", api.templateVersionDynamicParameters)
1189+
})
11831190
})
11841191

11851192
r.Group(func(r chi.Router) {

0 commit comments

Comments
 (0)