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

Skip to content

Commit d9497df

Browse files
committed
Merge branch 'main' of github.com:/coder/coder into yevhenii/512-claim-prebuild
2 parents 8b9e30d + 56ee5d8 commit d9497df

Some content is hidden

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

43 files changed

+1181
-517
lines changed

coderd/apidoc/docs.go

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

coderd/coderd.go

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

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

0 commit comments

Comments
 (0)