From 60647e536b3addcddf8d304f9fa78ee35f065d90 Mon Sep 17 00:00:00 2001 From: Colin Adler Date: Wed, 5 Apr 2023 14:28:46 -0500 Subject: [PATCH] chore: fix `postGroupByOrganization` swagger tag --- coderd/apidoc/docs.go | 2 +- coderd/apidoc/swagger.json | 2 +- docs/api/enterprise.md | 71 +++++++++++++++++++++++++++++++++++++ docs/api/templates.md | 71 ------------------------------------- enterprise/coderd/groups.go | 2 +- 5 files changed, 74 insertions(+), 74 deletions(-) diff --git a/coderd/apidoc/docs.go b/coderd/apidoc/docs.go index 87391fe14e309..21465fa3f69e8 100644 --- a/coderd/apidoc/docs.go +++ b/coderd/apidoc/docs.go @@ -931,7 +931,7 @@ const docTemplate = `{ "application/json" ], "tags": [ - "Templates" + "Enterprise" ], "summary": "Create group for organization", "operationId": "create-group-for-organization", diff --git a/coderd/apidoc/swagger.json b/coderd/apidoc/swagger.json index 2046aff0425b7..87072ad322aa2 100644 --- a/coderd/apidoc/swagger.json +++ b/coderd/apidoc/swagger.json @@ -796,7 +796,7 @@ ], "consumes": ["application/json"], "produces": ["application/json"], - "tags": ["Templates"], + "tags": ["Enterprise"], "summary": "Create group for organization", "operationId": "create-group-for-organization", "parameters": [ diff --git a/docs/api/enterprise.md b/docs/api/enterprise.md index 07f7cf407c98d..a24abd11ae8a5 100644 --- a/docs/api/enterprise.md +++ b/docs/api/enterprise.md @@ -492,6 +492,77 @@ Status Code **200** To perform this operation, you must be authenticated. [Learn more](authentication.md). +## Create group for organization + +### Code samples + +```shell +# Example request using curl +curl -X POST http://coder-server:8080/api/v2/organizations/{organization}/groups \ + -H 'Content-Type: application/json' \ + -H 'Accept: application/json' \ + -H 'Coder-Session-Token: API_KEY' +``` + +`POST /organizations/{organization}/groups` + +> Body parameter + +```json +{ + "avatar_url": "string", + "name": "string", + "quota_allowance": 0 +} +``` + +### Parameters + +| Name | In | Type | Required | Description | +| -------------- | ---- | -------------------------------------------------------------------- | -------- | -------------------- | +| `organization` | path | string | true | Organization ID | +| `body` | body | [codersdk.CreateGroupRequest](schemas.md#codersdkcreategrouprequest) | true | Create group request | + +### Example responses + +> 201 Response + +```json +{ + "avatar_url": "string", + "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", + "members": [ + { + "avatar_url": "http://example.com", + "created_at": "2019-08-24T14:15:22Z", + "email": "user@example.com", + "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", + "last_seen_at": "2019-08-24T14:15:22Z", + "organization_ids": ["497f6eca-6276-4993-bfeb-53cbbbba6f08"], + "roles": [ + { + "display_name": "string", + "name": "string" + } + ], + "status": "active", + "username": "string" + } + ], + "name": "string", + "organization_id": "7c60d51f-b44e-4682-87d6-449835ea4de6", + "quota_allowance": 0 +} +``` + +### Responses + +| Status | Meaning | Description | Schema | +| ------ | ------------------------------------------------------------ | ----------- | ------------------------------------------ | +| 201 | [Created](https://tools.ietf.org/html/rfc7231#section-6.3.2) | Created | [codersdk.Group](schemas.md#codersdkgroup) | + +To perform this operation, you must be authenticated. [Learn more](authentication.md). + ## Get group by organization and group name ### Code samples diff --git a/docs/api/templates.md b/docs/api/templates.md index 7d23e6387c7cc..e94037ce09d2a 100644 --- a/docs/api/templates.md +++ b/docs/api/templates.md @@ -1,76 +1,5 @@ # Templates -## Create group for organization - -### Code samples - -```shell -# Example request using curl -curl -X POST http://coder-server:8080/api/v2/organizations/{organization}/groups \ - -H 'Content-Type: application/json' \ - -H 'Accept: application/json' \ - -H 'Coder-Session-Token: API_KEY' -``` - -`POST /organizations/{organization}/groups` - -> Body parameter - -```json -{ - "avatar_url": "string", - "name": "string", - "quota_allowance": 0 -} -``` - -### Parameters - -| Name | In | Type | Required | Description | -| -------------- | ---- | -------------------------------------------------------------------- | -------- | -------------------- | -| `organization` | path | string | true | Organization ID | -| `body` | body | [codersdk.CreateGroupRequest](schemas.md#codersdkcreategrouprequest) | true | Create group request | - -### Example responses - -> 201 Response - -```json -{ - "avatar_url": "string", - "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", - "members": [ - { - "avatar_url": "http://example.com", - "created_at": "2019-08-24T14:15:22Z", - "email": "user@example.com", - "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", - "last_seen_at": "2019-08-24T14:15:22Z", - "organization_ids": ["497f6eca-6276-4993-bfeb-53cbbbba6f08"], - "roles": [ - { - "display_name": "string", - "name": "string" - } - ], - "status": "active", - "username": "string" - } - ], - "name": "string", - "organization_id": "7c60d51f-b44e-4682-87d6-449835ea4de6", - "quota_allowance": 0 -} -``` - -### Responses - -| Status | Meaning | Description | Schema | -| ------ | ------------------------------------------------------------ | ----------- | ------------------------------------------ | -| 201 | [Created](https://tools.ietf.org/html/rfc7231#section-6.3.2) | Created | [codersdk.Group](schemas.md#codersdkgroup) | - -To perform this operation, you must be authenticated. [Learn more](authentication.md). - ## Get templates by organization ### Code samples diff --git a/enterprise/coderd/groups.go b/enterprise/coderd/groups.go index 84d4754b67d51..423ab38b2b2ef 100644 --- a/enterprise/coderd/groups.go +++ b/enterprise/coderd/groups.go @@ -22,7 +22,7 @@ import ( // @Security CoderSessionToken // @Accept json // @Produce json -// @Tags Templates +// @Tags Enterprise // @Param request body codersdk.CreateGroupRequest true "Create group request" // @Param organization path string true "Organization ID" // @Success 201 {object} codersdk.Group pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy