feat(coderd): add endpoints for editing and deleting organizations (#13287)

This commit is contained in:
Kayla Washburn-Love
2024-05-21 12:46:31 -06:00
committed by GitHub
parent 0a86d6d176
commit 3f1e9c038a
19 changed files with 757 additions and 63 deletions
+87
View File
@@ -1987,6 +1987,82 @@ const docTemplate = `{
}
}
}
},
"delete": {
"security": [
{
"CoderSessionToken": []
}
],
"produces": [
"application/json"
],
"tags": [
"Organizations"
],
"summary": "Delete organization",
"operationId": "delete-organization",
"parameters": [
{
"type": "string",
"description": "Organization ID or name",
"name": "organization",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/codersdk.Response"
}
}
}
},
"patch": {
"security": [
{
"CoderSessionToken": []
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Organizations"
],
"summary": "Update organization",
"operationId": "update-organization",
"parameters": [
{
"type": "string",
"description": "Organization ID or name",
"name": "organization",
"in": "path",
"required": true
},
{
"description": "Patch organization request",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/codersdk.UpdateOrganizationRequest"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/codersdk.Organization"
}
}
}
}
},
"/organizations/{organization}/groups": {
@@ -12099,6 +12175,17 @@ const docTemplate = `{
}
}
},
"codersdk.UpdateOrganizationRequest": {
"type": "object",
"required": [
"name"
],
"properties": {
"name": {
"type": "string"
}
}
},
"codersdk.UpdateRoles": {
"type": "object",
"properties": {
+75
View File
@@ -1732,6 +1732,72 @@
}
}
}
},
"delete": {
"security": [
{
"CoderSessionToken": []
}
],
"produces": ["application/json"],
"tags": ["Organizations"],
"summary": "Delete organization",
"operationId": "delete-organization",
"parameters": [
{
"type": "string",
"description": "Organization ID or name",
"name": "organization",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/codersdk.Response"
}
}
}
},
"patch": {
"security": [
{
"CoderSessionToken": []
}
],
"consumes": ["application/json"],
"produces": ["application/json"],
"tags": ["Organizations"],
"summary": "Update organization",
"operationId": "update-organization",
"parameters": [
{
"type": "string",
"description": "Organization ID or name",
"name": "organization",
"in": "path",
"required": true
},
{
"description": "Patch organization request",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/codersdk.UpdateOrganizationRequest"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/codersdk.Organization"
}
}
}
}
},
"/organizations/{organization}/groups": {
@@ -10958,6 +11024,15 @@
}
}
},
"codersdk.UpdateOrganizationRequest": {
"type": "object",
"required": ["name"],
"properties": {
"name": {
"type": "string"
}
}
},
"codersdk.UpdateRoles": {
"type": "object",
"properties": {