mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
feat: add --experiments flag to replace --experimental (#5767)
- 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.
This commit is contained in:
Generated
+47
-1
@@ -387,6 +387,34 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"/experiments": {
|
||||
"get": {
|
||||
"security": [
|
||||
{
|
||||
"CoderSessionToken": []
|
||||
}
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"General"
|
||||
],
|
||||
"summary": "Get experiments",
|
||||
"operationId": "get-experiments",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/codersdk.Experiment"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/files": {
|
||||
"post": {
|
||||
"security": [
|
||||
@@ -5740,7 +5768,15 @@ const docTemplate = `{
|
||||
"$ref": "#/definitions/codersdk.DERP"
|
||||
},
|
||||
"experimental": {
|
||||
"$ref": "#/definitions/codersdk.DeploymentConfigField-bool"
|
||||
"description": "DEPRECATED: Use Experiments instead.",
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/codersdk.DeploymentConfigField-bool"
|
||||
}
|
||||
]
|
||||
},
|
||||
"experiments": {
|
||||
"$ref": "#/definitions/codersdk.DeploymentConfigField-array_string"
|
||||
},
|
||||
"gitauth": {
|
||||
"$ref": "#/definitions/codersdk.DeploymentConfigField-array_codersdk_GitAuthConfig"
|
||||
@@ -6043,6 +6079,7 @@ const docTemplate = `{
|
||||
}
|
||||
},
|
||||
"experimental": {
|
||||
"description": "DEPRECATED: use Experiments instead.",
|
||||
"type": "boolean"
|
||||
},
|
||||
"features": {
|
||||
@@ -6065,6 +6102,15 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"codersdk.Experiment": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"vscode_local"
|
||||
],
|
||||
"x-enum-varnames": [
|
||||
"ExperimentVSCodeLocal"
|
||||
]
|
||||
},
|
||||
"codersdk.Feature": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
||||
Generated
+39
-1
@@ -329,6 +329,30 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/experiments": {
|
||||
"get": {
|
||||
"security": [
|
||||
{
|
||||
"CoderSessionToken": []
|
||||
}
|
||||
],
|
||||
"produces": ["application/json"],
|
||||
"tags": ["General"],
|
||||
"summary": "Get experiments",
|
||||
"operationId": "get-experiments",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/codersdk.Experiment"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/files": {
|
||||
"post": {
|
||||
"security": [
|
||||
@@ -5093,7 +5117,15 @@
|
||||
"$ref": "#/definitions/codersdk.DERP"
|
||||
},
|
||||
"experimental": {
|
||||
"$ref": "#/definitions/codersdk.DeploymentConfigField-bool"
|
||||
"description": "DEPRECATED: Use Experiments instead.",
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/codersdk.DeploymentConfigField-bool"
|
||||
}
|
||||
]
|
||||
},
|
||||
"experiments": {
|
||||
"$ref": "#/definitions/codersdk.DeploymentConfigField-array_string"
|
||||
},
|
||||
"gitauth": {
|
||||
"$ref": "#/definitions/codersdk.DeploymentConfigField-array_codersdk_GitAuthConfig"
|
||||
@@ -5392,6 +5424,7 @@
|
||||
}
|
||||
},
|
||||
"experimental": {
|
||||
"description": "DEPRECATED: use Experiments instead.",
|
||||
"type": "boolean"
|
||||
},
|
||||
"features": {
|
||||
@@ -5414,6 +5447,11 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"codersdk.Experiment": {
|
||||
"type": "string",
|
||||
"enum": ["vscode_local"],
|
||||
"x-enum-varnames": ["ExperimentVSCodeLocal"]
|
||||
},
|
||||
"codersdk.Feature": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
||||
Reference in New Issue
Block a user