2024-04-02 10:01:33 -05:00
|
|
|
// Generates Redux Toolkit API slices for certain APIs from the OpenAPI spec
|
|
|
|
import type { ConfigFile } from '@rtk-query/codegen-openapi';
|
|
|
|
|
|
|
|
const config: ConfigFile = {
|
|
|
|
schemaFile: '../public/openapi3.json',
|
|
|
|
apiFile: '', // leave this empty, and instead populate the outputFiles object below
|
|
|
|
hooks: true,
|
2024-04-03 12:47:02 -05:00
|
|
|
exportName: 'generatedAPI',
|
2024-04-02 10:01:33 -05:00
|
|
|
|
|
|
|
outputFiles: {
|
|
|
|
'../public/app/features/migrate-to-cloud/api/endpoints.gen.ts': {
|
|
|
|
apiFile: '../public/app/features/migrate-to-cloud/api/baseAPI.ts',
|
|
|
|
apiImport: 'baseAPI',
|
|
|
|
filterEndpoints: [
|
|
|
|
'createCloudMigrationToken',
|
|
|
|
'getMigrationList',
|
|
|
|
'getCloudMigration',
|
|
|
|
'createMigration',
|
|
|
|
'runCloudMigration',
|
|
|
|
'getCloudMigrationRun',
|
|
|
|
'getCloudMigrationRunList',
|
|
|
|
'deleteCloudMigration',
|
2024-04-03 12:47:02 -05:00
|
|
|
'getDashboardByUid',
|
2024-04-02 10:01:33 -05:00
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
export default config;
|