From 4278b52a4df48f0789051ccc978a1c7c73d82613 Mon Sep 17 00:00:00 2001 From: dmisic-godaddy Date: Mon, 25 May 2026 09:04:21 +0200 Subject: [PATCH 1/2] feat: allow application creation without required authorization scopes --- src/cli/commands/application.ts | 7 ------- src/core/applications.ts | 4 ++-- src/services/applications.ts | 2 +- 3 files changed, 3 insertions(+), 10 deletions(-) diff --git a/src/cli/commands/application.ts b/src/cli/commands/application.ts index bb0ab2c..decdd87 100644 --- a/src/cli/commands/application.ts +++ b/src/cli/commands/application.ts @@ -711,13 +711,6 @@ const appInit = Command.make( userMessage: "Proxy URL is required", }), ); - if (!input.authorizationScopes.length) - return yield* Effect.fail( - new ValidationError({ - message: "Authorization scopes are required", - userMessage: "Authorization scopes are required", - }), - ); const environment = yield* resolveEnvironmentEffect(envStr); const appData = yield* applicationInitEffect(input, environment); diff --git a/src/core/applications.ts b/src/core/applications.ts index 87f2ad1..c8f2633 100644 --- a/src/core/applications.ts +++ b/src/core/applications.ts @@ -90,7 +90,7 @@ export interface CreateApplicationInput { description: string; url: string; proxyUrl: string; - authorizationScopes: string[]; + authorizationScopes?: string[]; } export interface CreatedApplicationInfo { @@ -185,7 +185,7 @@ const createApplicationInputValidator = type({ description: "string", url: type.keywords.string.url.root, proxyUrl: type.keywords.string.url.root, - authorizationScopes: type.string.array().moreThanLength(0), + authorizationScopes: "string[]?", }); // --------------------------------------------------------------------------- diff --git a/src/services/applications.ts b/src/services/applications.ts index 696ff51..9513d52 100644 --- a/src/services/applications.ts +++ b/src/services/applications.ts @@ -146,7 +146,7 @@ export const applicationInput = type({ description: "string", url: type.keywords.string.url.root, proxyUrl: type.keywords.string.url.root, - authorizationScopes: type.string.array().moreThanLength(0), + authorizationScopes: "string[]?", }); export const updateApplicationInput = type({ From a04c73a311ac6b55c2f623b785d78143dfb5c8cf Mon Sep 17 00:00:00 2001 From: Dalibor Misic Date: Mon, 25 May 2026 09:12:32 +0200 Subject: [PATCH 2/2] Fix formatting in createApplicationInputValidator --- src/core/applications.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/applications.ts b/src/core/applications.ts index 6f00b96..b48f621 100644 --- a/src/core/applications.ts +++ b/src/core/applications.ts @@ -183,7 +183,7 @@ const updateApplicationInputValidator = type({ const createApplicationInputValidator = type({ name: "string", - description: "string", + description: "string", url: publicHttpUrl, proxyUrl: publicHttpUrl, authorizationScopes: "string[]?",