mirror of
https://github.com/coder/coder.git
synced 2025-07-03 16:13:58 +00:00
- Deprecates the --experimental flag - Adds a new flag --experiments which supports passing multiple comma-separated values or a wildcard value. - Exposes a new endpoint /api/v2/experiments that returns the list of enabled experiments. - Deprecates the field Features.Experimental in favour of this new API. - Updates apidocgen to support type aliases (shoutout to @mtojek). - Modifies apitypings to support generating slice types. - Updates develop.sh to pass additional args after -- to $CODERD_SHIM.
20 lines
430 B
Go
20 lines
430 B
Go
package coderd
|
|
|
|
import (
|
|
"net/http"
|
|
|
|
"github.com/coder/coder/coderd/httpapi"
|
|
)
|
|
|
|
// @Summary Get experiments
|
|
// @ID get-experiments
|
|
// @Security CoderSessionToken
|
|
// @Produce json
|
|
// @Tags General
|
|
// @Success 200 {array} codersdk.Experiment
|
|
// @Router /experiments [get]
|
|
func (api *API) handleExperimentsGet(rw http.ResponseWriter, r *http.Request) {
|
|
ctx := r.Context()
|
|
httpapi.Write(ctx, rw, http.StatusOK, api.Experiments)
|
|
}
|