From fa846a1c4b00b52a59cbe412cdd950793899d720 Mon Sep 17 00:00:00 2001 From: Josh Hunt Date: Fri, 19 Apr 2024 13:10:03 +0100 Subject: [PATCH] update openapi specs and generated endpoints --- public/api-merged.json | 56 +++++++++---------- .../migrate-to-cloud/api/endpoints.gen.ts | 38 ++++++------- public/openapi3.json | 56 +++++++++---------- 3 files changed, 69 insertions(+), 81 deletions(-) diff --git a/public/api-merged.json b/public/api-merged.json index c1c20da0c81..39c630e3483 100644 --- a/public/api-merged.json +++ b/public/api-merged.json @@ -2348,7 +2348,7 @@ } } }, - "/cloudmigration/migration/{id}": { + "/cloudmigration/migration/{uid}": { "get": { "description": "It returns migrations that has been created.", "tags": [ @@ -2358,10 +2358,9 @@ "operationId": "getCloudMigration", "parameters": [ { - "type": "integer", - "format": "int64", - "description": "ID of an migration", - "name": "id", + "type": "string", + "description": "UID of a migration", + "name": "uid", "in": "path", "required": true } @@ -2391,8 +2390,8 @@ { "type": "integer", "format": "int64", - "description": "ID of an migration", - "name": "id", + "description": "UID of a migration", + "name": "uid", "in": "path", "required": true } @@ -2410,7 +2409,7 @@ } } }, - "/cloudmigration/migration/{id}/run": { + "/cloudmigration/migration/{uid}/run": { "get": { "tags": [ "migrations" @@ -2421,8 +2420,8 @@ { "type": "integer", "format": "int64", - "description": "ID of an migration", - "name": "id", + "description": "UID of a migration", + "name": "uid", "in": "path", "required": true } @@ -2451,10 +2450,9 @@ "operationId": "runCloudMigration", "parameters": [ { - "type": "integer", - "format": "int64", - "description": "ID of an migration", - "name": "id", + "type": "string", + "description": "UID of a migration", + "name": "uid", "in": "path", "required": true } @@ -2475,7 +2473,7 @@ } } }, - "/cloudmigration/migration/{id}/run/{runID}": { + "/cloudmigration/migration/{uid}/run/{runUID}": { "get": { "tags": [ "migrations" @@ -2484,18 +2482,16 @@ "operationId": "getCloudMigrationRun", "parameters": [ { - "type": "integer", - "format": "int64", - "description": "ID of an migration", - "name": "id", + "type": "string", + "description": "UID of a migration", + "name": "uid", "in": "path", "required": true }, { - "type": "integer", - "format": "int64", - "description": "Run ID of a migration run", - "name": "runID", + "type": "string", + "description": "RunUID of a migration run", + "name": "runUID", "in": "path", "required": true } @@ -12774,13 +12770,12 @@ "type": "string", "format": "date-time" }, - "id": { - "type": "integer", - "format": "int64" - }, "stack": { "type": "string" }, + "uid": { + "type": "string" + }, "updated": { "type": "string", "format": "date-time" @@ -15942,15 +15937,14 @@ "MigrateDataResponseDTO": { "type": "object", "properties": { - "id": { - "type": "integer", - "format": "int64" - }, "items": { "type": "array", "items": { "$ref": "#/definitions/MigrateDataResponseItemDTO" } + }, + "uid": { + "type": "string" } } }, diff --git a/public/app/features/migrate-to-cloud/api/endpoints.gen.ts b/public/app/features/migrate-to-cloud/api/endpoints.gen.ts index 84a8bbafab1..99aa5740bd8 100644 --- a/public/app/features/migrate-to-cloud/api/endpoints.gen.ts +++ b/public/app/features/migrate-to-cloud/api/endpoints.gen.ts @@ -8,19 +8,19 @@ const injectedRtkApi = api.injectEndpoints({ query: (queryArg) => ({ url: `/cloudmigration/migration`, method: 'POST', body: queryArg.cloudMigrationRequest }), }), deleteCloudMigration: build.mutation({ - query: (queryArg) => ({ url: `/cloudmigration/migration/${queryArg.id}`, method: 'DELETE' }), + query: (queryArg) => ({ url: `/cloudmigration/migration/${queryArg.uid}`, method: 'DELETE' }), }), getCloudMigration: build.query({ - query: (queryArg) => ({ url: `/cloudmigration/migration/${queryArg.id}` }), + query: (queryArg) => ({ url: `/cloudmigration/migration/${queryArg.uid}` }), }), getCloudMigrationRunList: build.query({ - query: (queryArg) => ({ url: `/cloudmigration/migration/${queryArg.id}/run` }), + query: (queryArg) => ({ url: `/cloudmigration/migration/${queryArg.uid}/run` }), }), runCloudMigration: build.mutation({ - query: (queryArg) => ({ url: `/cloudmigration/migration/${queryArg.id}/run`, method: 'POST' }), + query: (queryArg) => ({ url: `/cloudmigration/migration/${queryArg.uid}/run`, method: 'POST' }), }), getCloudMigrationRun: build.query({ - query: (queryArg) => ({ url: `/cloudmigration/migration/${queryArg.id}/run/${queryArg.runId}` }), + query: (queryArg) => ({ url: `/cloudmigration/migration/${queryArg.uid}/run/${queryArg.runUid}` }), }), createCloudMigrationToken: build.mutation({ query: () => ({ url: `/cloudmigration/token`, method: 'POST' }), @@ -40,30 +40,30 @@ export type CreateMigrationApiArg = { }; export type DeleteCloudMigrationApiResponse = unknown; export type DeleteCloudMigrationApiArg = { - /** ID of an migration */ - id: number; + /** UID of a migration */ + uid: number; }; export type GetCloudMigrationApiResponse = /** status 200 (empty) */ CloudMigrationResponse; export type GetCloudMigrationApiArg = { - /** ID of an migration */ - id: number; + /** UID of a migration */ + uid: string; }; export type GetCloudMigrationRunListApiResponse = /** status 200 (empty) */ CloudMigrationRunList; export type GetCloudMigrationRunListApiArg = { - /** ID of an migration */ - id: number; + /** UID of a migration */ + uid: number; }; export type RunCloudMigrationApiResponse = /** status 200 (empty) */ MigrateDataResponseDto; export type RunCloudMigrationApiArg = { - /** ID of an migration */ - id: number; + /** UID of a migration */ + uid: string; }; export type GetCloudMigrationRunApiResponse = /** status 200 (empty) */ MigrateDataResponseDto; export type GetCloudMigrationRunApiArg = { - /** ID of an migration */ - id: number; - /** Run ID of a migration run */ - runId: number; + /** UID of a migration */ + uid: string; + /** RunUID of a migration run */ + runUid: string; }; export type CreateCloudMigrationTokenApiResponse = /** status 200 (empty) */ CreateAccessTokenResponseDto; export type CreateCloudMigrationTokenApiArg = void; @@ -73,8 +73,8 @@ export type GetDashboardByUidApiArg = { }; export type CloudMigrationResponse = { created?: string; - id?: number; stack?: string; + uid?: string; updated?: string; }; export type CloudMigrationListResponse = { @@ -100,8 +100,8 @@ export type MigrateDataResponseItemDto = { type: 'DASHBOARD' | 'DATASOURCE' | 'FOLDER'; }; export type MigrateDataResponseDto = { - id?: number; items?: MigrateDataResponseItemDto[]; + uid?: string; }; export type CloudMigrationRunList = { runs?: MigrateDataResponseDto[]; diff --git a/public/openapi3.json b/public/openapi3.json index fa944a233dc..17376f99db3 100644 --- a/public/openapi3.json +++ b/public/openapi3.json @@ -3546,13 +3546,12 @@ "format": "date-time", "type": "string" }, - "id": { - "format": "int64", - "type": "integer" - }, "stack": { "type": "string" }, + "uid": { + "type": "string" + }, "updated": { "format": "date-time", "type": "string" @@ -6714,15 +6713,14 @@ }, "MigrateDataResponseDTO": { "properties": { - "id": { - "format": "int64", - "type": "integer" - }, "items": { "items": { "$ref": "#/components/schemas/MigrateDataResponseItemDTO" }, "type": "array" + }, + "uid": { + "type": "string" } }, "type": "object" @@ -14859,14 +14857,14 @@ ] } }, - "/cloudmigration/migration/{id}": { + "/cloudmigration/migration/{uid}": { "delete": { "operationId": "deleteCloudMigration", "parameters": [ { - "description": "ID of an migration", + "description": "UID of a migration", "in": "path", - "name": "id", + "name": "uid", "required": true, "schema": { "format": "int64", @@ -14895,13 +14893,12 @@ "operationId": "getCloudMigration", "parameters": [ { - "description": "ID of an migration", + "description": "UID of a migration", "in": "path", - "name": "id", + "name": "uid", "required": true, "schema": { - "format": "int64", - "type": "integer" + "type": "string" } } ], @@ -14925,14 +14922,14 @@ ] } }, - "/cloudmigration/migration/{id}/run": { + "/cloudmigration/migration/{uid}/run": { "get": { "operationId": "getCloudMigrationRunList", "parameters": [ { - "description": "ID of an migration", + "description": "UID of a migration", "in": "path", - "name": "id", + "name": "uid", "required": true, "schema": { "format": "int64", @@ -14964,13 +14961,12 @@ "operationId": "runCloudMigration", "parameters": [ { - "description": "ID of an migration", + "description": "UID of a migration", "in": "path", - "name": "id", + "name": "uid", "required": true, "schema": { - "format": "int64", - "type": "integer" + "type": "string" } } ], @@ -14994,28 +14990,26 @@ ] } }, - "/cloudmigration/migration/{id}/run/{runID}": { + "/cloudmigration/migration/{uid}/run/{runUID}": { "get": { "operationId": "getCloudMigrationRun", "parameters": [ { - "description": "ID of an migration", + "description": "UID of a migration", "in": "path", - "name": "id", + "name": "uid", "required": true, "schema": { - "format": "int64", - "type": "integer" + "type": "string" } }, { - "description": "Run ID of a migration run", + "description": "RunUID of a migration run", "in": "path", - "name": "runID", + "name": "runUID", "required": true, "schema": { - "format": "int64", - "type": "integer" + "type": "string" } } ],