mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
fix(coderd): document HTTP 201 for workspace and build creation (#27903)
This commit is contained in:
Generated
+6
-6
@@ -5684,8 +5684,8 @@ const docTemplate = `{
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"201": {
|
||||
"description": "Created",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/codersdk.Workspace"
|
||||
}
|
||||
@@ -11752,8 +11752,8 @@ const docTemplate = `{
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"201": {
|
||||
"description": "Created",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/codersdk.Workspace"
|
||||
}
|
||||
@@ -13979,8 +13979,8 @@ const docTemplate = `{
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"201": {
|
||||
"description": "Created",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/codersdk.WorkspaceBuild"
|
||||
}
|
||||
|
||||
Generated
+6
-6
@@ -5029,8 +5029,8 @@
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"201": {
|
||||
"description": "Created",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/codersdk.Workspace"
|
||||
}
|
||||
@@ -10429,8 +10429,8 @@
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"201": {
|
||||
"description": "Created",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/codersdk.Workspace"
|
||||
}
|
||||
@@ -12407,8 +12407,8 @@
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"201": {
|
||||
"description": "Created",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/codersdk.WorkspaceBuild"
|
||||
}
|
||||
|
||||
@@ -323,7 +323,7 @@ func (api *API) workspaceBuildByBuildNumber(rw http.ResponseWriter, r *http.Requ
|
||||
// @Tags Builds
|
||||
// @Param workspace path string true "Workspace ID" format(uuid)
|
||||
// @Param request body codersdk.CreateWorkspaceBuildRequest true "Create workspace build request"
|
||||
// @Success 200 {object} codersdk.WorkspaceBuild
|
||||
// @Success 201 {object} codersdk.WorkspaceBuild
|
||||
// @Router /api/v2/workspaces/{workspace}/builds [post]
|
||||
func (api *API) postWorkspaceBuilds(rw http.ResponseWriter, r *http.Request) {
|
||||
ctx := r.Context()
|
||||
|
||||
@@ -364,7 +364,7 @@ func (api *API) workspaceByOwnerAndName(rw http.ResponseWriter, r *http.Request)
|
||||
// @Param organization path string true "Organization ID" format(uuid)
|
||||
// @Param user path string true "Username, UUID, or me"
|
||||
// @Param request body codersdk.CreateWorkspaceRequest true "Create workspace request"
|
||||
// @Success 200 {object} codersdk.Workspace
|
||||
// @Success 201 {object} codersdk.Workspace
|
||||
// @Router /api/v2/organizations/{organization}/members/{user}/workspaces [post]
|
||||
func (api *API) postWorkspacesByOrganization(rw http.ResponseWriter, r *http.Request) {
|
||||
var (
|
||||
@@ -425,7 +425,7 @@ func (api *API) postWorkspacesByOrganization(rw http.ResponseWriter, r *http.Req
|
||||
// @Tags Workspaces
|
||||
// @Param user path string true "Username, UUID, or me"
|
||||
// @Param request body codersdk.CreateWorkspaceRequest true "Create workspace request"
|
||||
// @Success 200 {object} codersdk.Workspace
|
||||
// @Success 201 {object} codersdk.Workspace
|
||||
// @Router /api/v2/users/{user}/workspaces [post]
|
||||
func (api *API) postUserWorkspaces(rw http.ResponseWriter, r *http.Request) {
|
||||
var (
|
||||
|
||||
Reference in New Issue
Block a user