diff --git a/src/lib/openapi/spec/create-application-schema.ts b/src/lib/openapi/spec/create-application-schema.ts index edcac29957..c6e99d4c16 100644 --- a/src/lib/openapi/spec/create-application-schema.ts +++ b/src/lib/openapi/spec/create-application-schema.ts @@ -5,7 +5,6 @@ export const createApplicationSchema = { type: 'object', additionalProperties: true, description: 'Reported application information from Unleash SDKs', - required: ['appName'], properties: { appName: { description: 'Name of the application', diff --git a/src/lib/routes/admin-api/metrics.test.ts b/src/lib/routes/admin-api/metrics.test.ts index 885a1924a9..640e1ff989 100644 --- a/src/lib/routes/admin-api/metrics.test.ts +++ b/src/lib/routes/admin-api/metrics.test.ts @@ -84,6 +84,20 @@ test('should store application', () => { .expect(202); }); +test('should store application coming from edit application form', () => { + expect.assertions(0); + const appName = '123!23'; + + return request + .post(`/api/admin/metrics/applications/${appName}`) + .send({ + url: 'http://test.com', + description: 'This is an optional description', + icon: 'arrow-down', + }) + .expect(202); +}); + test('should store application details without strategies', () => { expect.assertions(0); const appName = '123!23'; diff --git a/src/test/e2e/api/openapi/__snapshots__/openapi.e2e.test.ts.snap b/src/test/e2e/api/openapi/__snapshots__/openapi.e2e.test.ts.snap index e5b3ee4dc0..33461af429 100644 --- a/src/test/e2e/api/openapi/__snapshots__/openapi.e2e.test.ts.snap +++ b/src/test/e2e/api/openapi/__snapshots__/openapi.e2e.test.ts.snap @@ -1576,9 +1576,6 @@ The provider you choose for your addon dictates what properties the \`parameters "type": "string", }, }, - "required": [ - "appName", - ], "type": "object", }, "createFeatureSchema": {