File tree Expand file tree Collapse file tree 4 files changed +4
-7
lines changed 
packages/rtk-query-codegen-openapi/test Expand file tree Collapse file tree 4 files changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -29,7 +29,6 @@ We provide a package for RTK Query code generation from OpenAPI schemas. It is p
2929Create 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
3433import  { createApi , fetchBaseQuery  } from  ' @reduxjs/toolkit/query/react' 
3534
@@ -43,8 +42,7 @@ export const emptySplitApi = createApi({
4342Generate 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
4947const :  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- 
7168import  { generateEndpoints  } from  ' @rtk-query/codegen-openapi' 
7269
7370const =  await  generateEndpoints ({
Original file line number Diff line number Diff line change 11/** 
2-  * @type  {import("@rtk-incubator/rtk- query- codegen-openapi").ConfigFile } 
2+  * @type  {import("@rtk-query/ codegen-openapi").ConfigFile } 
33 */ 
44module . exports  =  { 
55  schemaFile : './fixtures/petstore.yaml' , 
Original file line number Diff line number Diff line change 1- import  type  {  ConfigFile  }  from  '@rtk-incubator/rtk- query- codegen-openapi' ; 
1+ import  type  {  ConfigFile  }  from  '@rtk-query/ codegen-openapi' ; 
22
33const  config : ConfigFile  =  { 
44  schemaFile : './fixtures/petstore.yaml' , 
Original file line number Diff line number Diff line change 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 ,
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments