ShortURL: Graduate api v1alpha1 to v1beta1 (#113597)
This commit is contained in:
@@ -76,9 +76,9 @@
|
||||
"import": "./src/clients/rtkq/provisioning/v0alpha1/index.ts",
|
||||
"require": "./src/clients/rtkq/provisioning/v0alpha1/index.ts"
|
||||
},
|
||||
"./rtkq/shorturl/v1alpha1": {
|
||||
"import": "./src/clients/rtkq/shorturl/v1alpha1/index.ts",
|
||||
"require": "./src/clients/rtkq/shorturl/v1alpha1/index.ts"
|
||||
"./rtkq/shorturl/v1beta1": {
|
||||
"import": "./src/clients/rtkq/shorturl/v1beta1/index.ts",
|
||||
"require": "./src/clients/rtkq/shorturl/v1beta1/index.ts"
|
||||
}
|
||||
},
|
||||
"publishConfig": {
|
||||
|
||||
@@ -11,7 +11,7 @@ import { generatedAPI as playlistAPIv0alpha1 } from './playlist/v0alpha1';
|
||||
import { generatedAPI as preferencesUserAPI } from './preferences/user';
|
||||
import { generatedAPI as preferencesAPIv1alpha1 } from './preferences/v1alpha1';
|
||||
import { generatedAPI as provisioningAPIv0alpha1 } from './provisioning/v0alpha1';
|
||||
import { generatedAPI as shortURLAPIv1alpha1 } from './shorturl/v1alpha1';
|
||||
import { generatedAPI as shortURLAPIv1beta1 } from './shorturl/v1beta1';
|
||||
import { generatedAPI as legacyUserAPI } from './user';
|
||||
// PLOP_INJECT_IMPORT
|
||||
|
||||
@@ -26,7 +26,7 @@ export const allMiddleware = [
|
||||
preferencesAPIv1alpha1.middleware,
|
||||
preferencesUserAPI.middleware,
|
||||
provisioningAPIv0alpha1.middleware,
|
||||
shortURLAPIv1alpha1.middleware,
|
||||
shortURLAPIv1beta1.middleware,
|
||||
correlationsAPIv0alpha1.middleware,
|
||||
legacyUserAPI.middleware,
|
||||
// PLOP_INJECT_MIDDLEWARE
|
||||
@@ -43,7 +43,7 @@ export const allReducers = {
|
||||
[preferencesAPIv1alpha1.reducerPath]: preferencesAPIv1alpha1.reducer,
|
||||
[preferencesUserAPI.reducerPath]: preferencesUserAPI.reducer,
|
||||
[provisioningAPIv0alpha1.reducerPath]: provisioningAPIv0alpha1.reducer,
|
||||
[shortURLAPIv1alpha1.reducerPath]: shortURLAPIv1alpha1.reducer,
|
||||
[shortURLAPIv1beta1.reducerPath]: shortURLAPIv1beta1.reducer,
|
||||
[correlationsAPIv0alpha1.reducerPath]: correlationsAPIv0alpha1.reducer,
|
||||
[legacyUserAPI.reducerPath]: legacyUserAPI.reducer,
|
||||
// PLOP_INJECT_REDUCER
|
||||
|
||||
+2
-2
@@ -4,11 +4,11 @@ import { getAPIBaseURL } from '../../../../utils/utils';
|
||||
import { createBaseQuery } from '../../createBaseQuery';
|
||||
|
||||
export const API_GROUP = 'shorturl.grafana.app' as const;
|
||||
export const API_VERSION = 'v1alpha1' as const;
|
||||
export const API_VERSION = 'v1beta1' as const;
|
||||
export const BASE_URL = getAPIBaseURL(API_GROUP, API_VERSION);
|
||||
|
||||
export const api = createApi({
|
||||
reducerPath: 'shortURLAPIv1alpha1',
|
||||
reducerPath: 'shortURLAPIv1beta1',
|
||||
baseQuery: createBaseQuery({
|
||||
baseURL: BASE_URL,
|
||||
}),
|
||||
+1
-1
@@ -7,7 +7,7 @@ const injectedRtkApi = api
|
||||
.injectEndpoints({
|
||||
endpoints: (build) => ({
|
||||
getApiResources: build.query<GetApiResourcesApiResponse, GetApiResourcesApiArg>({
|
||||
query: () => ({ url: `/apis/shorturl.grafana.app/v1alpha1/` }),
|
||||
query: () => ({ url: `/apis/shorturl.grafana.app/v1beta1/` }),
|
||||
providesTags: ['API Discovery'],
|
||||
}),
|
||||
listShortUrl: build.query<ListShortUrlApiResponse, ListShortUrlApiArg>({
|
||||
@@ -100,7 +100,9 @@ const config: ConfigFile = {
|
||||
...createAPIConfig('playlist', 'v0alpha1'),
|
||||
...createAPIConfig('preferences', 'v1alpha1'),
|
||||
...createAPIConfig('provisioning', 'v0alpha1'),
|
||||
...createAPIConfig('shorturl', 'v1alpha1'),
|
||||
...createAPIConfig('shorturl', 'v1beta1'),
|
||||
...createAPIConfig('shorturl', 'v1beta1'),
|
||||
...createAPIConfig('shorturl', 'v1beta1'),
|
||||
// PLOP_INJECT_API_CLIENT - Used by the API client generator
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user