Skip to content

Commit 71277de

Browse files
authored
Codegen: Update import paths from old package name to new (#1936)
* Update import paths from old package name to new * Update type import in docs
1 parent 637b0ca commit 71277de

File tree

4 files changed

+4
-7
lines changed

4 files changed

+4
-7
lines changed

docs/rtk-query/usage/code-generation.mdx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ We provide a package for RTK Query code generation from OpenAPI schemas. It is p
2929
Create an empty api using `createApi` like
3030

3131
```ts no-transpile title="src/store/emptyApi.ts"
32-
3332
// Or from '@reduxjs/toolkit/query' if not using the auto-generated hooks
3433
import { createApi, fetchBaseQuery } from '@reduxjs/toolkit/query/react'
3534

@@ -43,8 +42,7 @@ export const emptySplitApi = createApi({
4342
Generate a config file (json, js or ts) with contents like
4443

4544
```ts no-transpile title="openapi-config.ts"
46-
47-
import { ConfigFile } from '@rtk-query/codegen-openapi'
45+
import type { ConfigFile } from '@rtk-query/codegen-openapi'
4846

4947
const config: ConfigFile = {
5048
schemaFile: 'https://petstore3.swagger.io/api/v3/openapi.json',
@@ -67,7 +65,6 @@ npx @rtk-query/codegen-openapi openapi-config.ts
6765
### Programmatic usage
6866

6967
```ts no-transpile title="src/store/petApi.ts"
70-
7168
import { generateEndpoints } from '@rtk-query/codegen-openapi'
7269

7370
const api = await generateEndpoints({

packages/rtk-query-codegen-openapi/test/config.example.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* @type {import("@rtk-incubator/rtk-query-codegen-openapi").ConfigFile}
2+
* @type {import("@rtk-query/codegen-openapi").ConfigFile}
33
*/
44
module.exports = {
55
schemaFile: './fixtures/petstore.yaml',

packages/rtk-query-codegen-openapi/test/config.example.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { ConfigFile } from '@rtk-incubator/rtk-query-codegen-openapi';
1+
import type { ConfigFile } from '@rtk-query/codegen-openapi';
22

33
const config: ConfigFile = {
44
schemaFile: './fixtures/petstore.yaml',

packages/rtk-query-codegen-openapi/test/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"compilerOptions": {
33
"paths": {
44
"@/*": ["./test/fixtures/*"],
5-
"@rtk-incubator/rtk-query-codegen-openapi": ["./src"]
5+
"@rtk-query/codegen-openapi": ["./src"]
66
},
77
"allowSyntheticDefaultImports": true,
88
"esModuleInterop": true,

0 commit comments

Comments
 (0)