From f6dbb0aad1aa8b0e9afcd81d9992dbbf5e67f22e Mon Sep 17 00:00:00 2001 From: Gao Sun Date: Thu, 6 Jun 2024 13:37:43 +0800 Subject: [PATCH] chore: add api docs --- .../index.email-domain.openapi.json | 90 +++++++++++++++++++ 1 file changed, 90 insertions(+) create mode 100644 packages/core/src/routes/organization/index.email-domain.openapi.json diff --git a/packages/core/src/routes/organization/index.email-domain.openapi.json b/packages/core/src/routes/organization/index.email-domain.openapi.json new file mode 100644 index 000000000..96a4a98b9 --- /dev/null +++ b/packages/core/src/routes/organization/index.email-domain.openapi.json @@ -0,0 +1,90 @@ +{ + "tags": [{ + "name": "Organizations" + }], + "paths": { + "/api/organizations/{id}/email-domains": { + "get": { + "summary": "Get organization email domains", + "description": "Get email domains for just-in-time provisioning of users in the organization.", + "responses": { + "200": { + "description": "A list of email domains." + } + } + }, + "post": { + "summary": "Add organization email domain", + "description": "Add a new email domain for just-in-time provisioning of users in the organization.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "properties": { + "emailDomain": { + "description": "The email domain to add." + } + } + } + } + } + }, + "responses": { + "201": { + "description": "The email domain was added successfully." + }, + "422": { + "description": "The email domain is already in use." + } + } + }, + "put": { + "summary": "Replace organization email domains", + "description": "Replace all just-in-time provisioning email domains for the organization with the given data.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "properties": { + "emailDomains": { + "description": "An array of email domains to replace existing email domains." + } + } + } + } + } + }, + "responses": { + "204": { + "description": "The email domains were replaced successfully." + } + } + } + }, + "/api/organizations/{id}/email-domains/{emailDomain}": { + "delete": { + "summary": "Remove organization email domain", + "description": "Remove an email domain for just-in-time provisioning of users in the organization.", + "parameters": [ + { + "schema": { + "type": "string" + }, + "name": "emailDomain", + "in": "path", + "required": true, + "description": "The email domain to remove." + } + ], + "responses": { + "204": { + "description": "The email domain was removed successfully." + }, + "404": { + "description": "The email domain was not found." + } + } + } + } + } +}