mirror of
https://github.com/grafana/grafana.git
synced 2025-07-31 05:43:00 +08:00
Alerting: mocking and testing of Alerting package (#105342)
This commit is contained in:
@ -9,6 +9,7 @@ import type { ConfigFile } from '@rtk-query/codegen-openapi';
|
||||
|
||||
// ℹ️ append versions here to generate additional API clients
|
||||
const VERSIONS = ['v0alpha1'] as const;
|
||||
const GROUP = 'notifications.alerting.grafana.app' as const;
|
||||
|
||||
type OutputFile = Omit<ConfigFile, 'outputFile'>;
|
||||
type OutputFiles = Record<string, OutputFile>;
|
||||
@ -19,7 +20,7 @@ const outputFiles = VERSIONS.reduce<OutputFiles>((acc, version) => {
|
||||
|
||||
// ℹ️ these snapshots are generated by running "go test pkg/tests/apis/openapi_test.go" and "scripts/process-specs.ts",
|
||||
// see the README in the "openapi_snapshots" directory
|
||||
const schemaFile = `../../../data/openapi/notifications.alerting.grafana.app-${version}.json`;
|
||||
const schemaFile = `../../../data/openapi/${GROUP}-${version}.json`;
|
||||
|
||||
// ℹ️ make sure there is a API file in each versioned directory
|
||||
const apiFile = `../src/grafana/api/${version}/api.ts`;
|
||||
|
Reference in New Issue
Block a user