Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 1d30352

Browse files
committed
Support enterprise
1 parent b501822 commit 1d30352

File tree

9 files changed

+623
-180
lines changed

9 files changed

+623
-180
lines changed

coderd/apidoc/docs.go

Lines changed: 117 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -500,7 +500,7 @@ const docTemplate = `{
500500
}
501501
}
502502
},
503-
"/groups/{groupName}": {
503+
"/groups/{group}": {
504504
"get": {
505505
"security": [
506506
{
@@ -519,7 +519,7 @@ const docTemplate = `{
519519
{
520520
"type": "string",
521521
"description": "Group name",
522-
"name": "groupName",
522+
"name": "group",
523523
"in": "path",
524524
"required": true
525525
}
@@ -532,9 +532,7 @@ const docTemplate = `{
532532
}
533533
}
534534
}
535-
}
536-
},
537-
"/license/{id}": {
535+
},
538536
"delete": {
539537
"security": [
540538
{
@@ -547,21 +545,55 @@ const docTemplate = `{
547545
"tags": [
548546
"Enterprise"
549547
],
550-
"summary": "Delete license",
551-
"operationId": "delete-license",
548+
"summary": "Delete group by name",
549+
"operationId": "delete-group-by-name",
552550
"parameters": [
553551
{
554552
"type": "string",
555-
"format": "number",
556-
"description": "License ID",
557-
"name": "id",
553+
"description": "Group name",
554+
"name": "group",
558555
"in": "path",
559556
"required": true
560557
}
561558
],
562559
"responses": {
563560
"200": {
564-
"description": "OK"
561+
"description": "OK",
562+
"schema": {
563+
"$ref": "#/definitions/codersdk.Group"
564+
}
565+
}
566+
}
567+
},
568+
"patch": {
569+
"security": [
570+
{
571+
"CoderSessionToken": []
572+
}
573+
],
574+
"produces": [
575+
"application/json"
576+
],
577+
"tags": [
578+
"Enterprise"
579+
],
580+
"summary": "Update group by name",
581+
"operationId": "update-group-by-name",
582+
"parameters": [
583+
{
584+
"type": "string",
585+
"description": "Group name",
586+
"name": "group",
587+
"in": "path",
588+
"required": true
589+
}
590+
],
591+
"responses": {
592+
"200": {
593+
"description": "OK",
594+
"schema": {
595+
"$ref": "#/definitions/codersdk.Group"
596+
}
565597
}
566598
}
567599
}
@@ -628,6 +660,38 @@ const docTemplate = `{
628660
}
629661
}
630662
},
663+
"/licenses/{id}": {
664+
"delete": {
665+
"security": [
666+
{
667+
"CoderSessionToken": []
668+
}
669+
],
670+
"produces": [
671+
"application/json"
672+
],
673+
"tags": [
674+
"Enterprise"
675+
],
676+
"summary": "Delete license",
677+
"operationId": "delete-license",
678+
"parameters": [
679+
{
680+
"type": "string",
681+
"format": "number",
682+
"description": "License ID",
683+
"name": "id",
684+
"in": "path",
685+
"required": true
686+
}
687+
],
688+
"responses": {
689+
"200": {
690+
"description": "OK"
691+
}
692+
}
693+
}
694+
},
631695
"/organizations": {
632696
"post": {
633697
"security": [
@@ -781,6 +845,48 @@ const docTemplate = `{
781845
}
782846
}
783847
},
848+
"/organizations/{organization}/groups/{groupName}": {
849+
"get": {
850+
"security": [
851+
{
852+
"CoderSessionToken": []
853+
}
854+
],
855+
"produces": [
856+
"application/json"
857+
],
858+
"tags": [
859+
"Enterprise"
860+
],
861+
"summary": "Get group by organization and group name",
862+
"operationId": "get-group-by-organization-and-group-name",
863+
"parameters": [
864+
{
865+
"type": "string",
866+
"format": "uuid",
867+
"description": "Organization ID",
868+
"name": "organization",
869+
"in": "path",
870+
"required": true
871+
},
872+
{
873+
"type": "string",
874+
"description": "Group name",
875+
"name": "groupName",
876+
"in": "path",
877+
"required": true
878+
}
879+
],
880+
"responses": {
881+
"200": {
882+
"description": "OK",
883+
"schema": {
884+
"$ref": "#/definitions/codersdk.Group"
885+
}
886+
}
887+
}
888+
}
889+
},
784890
"/organizations/{organization}/members/roles": {
785891
"get": {
786892
"security": [

coderd/apidoc/swagger.json

Lines changed: 105 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,7 @@
430430
}
431431
}
432432
},
433-
"/groups/{groupName}": {
433+
"/groups/{group}": {
434434
"get": {
435435
"security": [
436436
{
@@ -445,7 +445,7 @@
445445
{
446446
"type": "string",
447447
"description": "Group name",
448-
"name": "groupName",
448+
"name": "group",
449449
"in": "path",
450450
"required": true
451451
}
@@ -458,9 +458,7 @@
458458
}
459459
}
460460
}
461-
}
462-
},
463-
"/license/{id}": {
461+
},
464462
"delete": {
465463
"security": [
466464
{
@@ -469,21 +467,51 @@
469467
],
470468
"produces": ["application/json"],
471469
"tags": ["Enterprise"],
472-
"summary": "Delete license",
473-
"operationId": "delete-license",
470+
"summary": "Delete group by name",
471+
"operationId": "delete-group-by-name",
474472
"parameters": [
475473
{
476474
"type": "string",
477-
"format": "number",
478-
"description": "License ID",
479-
"name": "id",
475+
"description": "Group name",
476+
"name": "group",
480477
"in": "path",
481478
"required": true
482479
}
483480
],
484481
"responses": {
485482
"200": {
486-
"description": "OK"
483+
"description": "OK",
484+
"schema": {
485+
"$ref": "#/definitions/codersdk.Group"
486+
}
487+
}
488+
}
489+
},
490+
"patch": {
491+
"security": [
492+
{
493+
"CoderSessionToken": []
494+
}
495+
],
496+
"produces": ["application/json"],
497+
"tags": ["Enterprise"],
498+
"summary": "Update group by name",
499+
"operationId": "update-group-by-name",
500+
"parameters": [
501+
{
502+
"type": "string",
503+
"description": "Group name",
504+
"name": "group",
505+
"in": "path",
506+
"required": true
507+
}
508+
],
509+
"responses": {
510+
"200": {
511+
"description": "OK",
512+
"schema": {
513+
"$ref": "#/definitions/codersdk.Group"
514+
}
487515
}
488516
}
489517
}
@@ -542,6 +570,34 @@
542570
}
543571
}
544572
},
573+
"/licenses/{id}": {
574+
"delete": {
575+
"security": [
576+
{
577+
"CoderSessionToken": []
578+
}
579+
],
580+
"produces": ["application/json"],
581+
"tags": ["Enterprise"],
582+
"summary": "Delete license",
583+
"operationId": "delete-license",
584+
"parameters": [
585+
{
586+
"type": "string",
587+
"format": "number",
588+
"description": "License ID",
589+
"name": "id",
590+
"in": "path",
591+
"required": true
592+
}
593+
],
594+
"responses": {
595+
"200": {
596+
"description": "OK"
597+
}
598+
}
599+
}
600+
},
545601
"/organizations": {
546602
"post": {
547603
"security": [
@@ -677,6 +733,44 @@
677733
}
678734
}
679735
},
736+
"/organizations/{organization}/groups/{groupName}": {
737+
"get": {
738+
"security": [
739+
{
740+
"CoderSessionToken": []
741+
}
742+
],
743+
"produces": ["application/json"],
744+
"tags": ["Enterprise"],
745+
"summary": "Get group by organization and group name",
746+
"operationId": "get-group-by-organization-and-group-name",
747+
"parameters": [
748+
{
749+
"type": "string",
750+
"format": "uuid",
751+
"description": "Organization ID",
752+
"name": "organization",
753+
"in": "path",
754+
"required": true
755+
},
756+
{
757+
"type": "string",
758+
"description": "Group name",
759+
"name": "groupName",
760+
"in": "path",
761+
"required": true
762+
}
763+
],
764+
"responses": {
765+
"200": {
766+
"description": "OK",
767+
"schema": {
768+
"$ref": "#/definitions/codersdk.Group"
769+
}
770+
}
771+
}
772+
}
773+
},
680774
"/organizations/{organization}/members/roles": {
681775
"get": {
682776
"security": [

0 commit comments

Comments
 (0)