From a909f8ddf427af879a2c6948a4a651d5ab8f7355 Mon Sep 17 00:00:00 2001 From: dvankeke Date: Tue, 19 May 2026 10:20:16 +0200 Subject: [PATCH] fix: internalrepo v2 --- src/api.authz.test.ts | 2 +- src/api/{v1 => v2}/internalRepoUrls.ts | 4 ++-- src/openapi/api.yaml | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) rename src/api/{v1 => v2}/internalRepoUrls.ts (83%) diff --git a/src/api.authz.test.ts b/src/api.authz.test.ts index 9a02ba702..ef8926344 100644 --- a/src/api.authz.test.ts +++ b/src/api.authz.test.ts @@ -784,7 +784,7 @@ describe('API authz tests', () => { test('team member can get internal repository urls', async () => { jest.spyOn(otomiStack, 'getInternalRepoUrls').mockResolvedValue([]) await agent - .get(`/v1/internalRepoUrls`) + .get(`/v2/internalRepoUrls`) .query({ teamId }) .set('Authorization', `Bearer ${teamMemberToken}`) .expect(200) diff --git a/src/api/v1/internalRepoUrls.ts b/src/api/v2/internalRepoUrls.ts similarity index 83% rename from src/api/v1/internalRepoUrls.ts rename to src/api/v2/internalRepoUrls.ts index 2cf95b47d..d6c3c27d5 100644 --- a/src/api/v1/internalRepoUrls.ts +++ b/src/api/v2/internalRepoUrls.ts @@ -2,10 +2,10 @@ import Debug from 'debug' import { Response } from 'express' import { OpenApiRequestExt } from 'src/otomi-models' -const debug = Debug('otomi:api:v1:internalRepoUrls') +const debug = Debug('otomi:api:v2:internalRepoUrls') /** - * GET /v1/internalRepoUrls + * GET /v2/internalRepoUrls * Get internal repository URLs */ export const getInternalRepoUrls = async (req: OpenApiRequestExt, res: Response): Promise => { diff --git a/src/openapi/api.yaml b/src/openapi/api.yaml index 6bd339466..84b605a72 100644 --- a/src/openapi/api.yaml +++ b/src/openapi/api.yaml @@ -2805,10 +2805,10 @@ paths: schema: $ref: '#/components/schemas/TestRepoConnect' - /v1/internalRepoUrls: + /v2/internalRepoUrls: get: operationId: getInternalRepoUrls - x-eov-operation-handler: v1/internalRepoUrls + x-eov-operation-handler: v2/internalRepoUrls x-aclSchema: InternalRepoUrls parameters: - name: teamId