File tree Expand file tree Collapse file tree 4 files changed +13
-7
lines changed
openapi-ts/src/ts-dsl/render Expand file tree Collapse file tree 4 files changed +13
-7
lines changed Original file line number Diff line number Diff line change @@ -35,19 +35,20 @@ export default defineConfig(() => {
3535 // },
3636 path : path . resolve (
3737 getSpecsPath ( ) ,
38- // '3.0.x',
39- '3.1.x' ,
38+ '3.0.x' ,
39+ // '3.1.x',
4040 // 'circular.yaml',
4141 // 'dutchie.json',
4242 // 'enum-names-values.yaml',
4343 // 'invalid',
4444 // 'full.yaml',
45+ 'sdk-method-class-conflict.yaml' ,
4546 // 'object-property-names.yaml',
4647 // 'openai.yaml',
4748 // 'opencode.yaml',
4849 // 'pagination-ref.yaml',
4950 // 'sdk-instance.yaml',
50- 'sdk-nested-classes.yaml' ,
51+ // 'sdk-nested-classes.yaml',
5152 // 'string-with-format.yaml',
5253 // 'transformers.json',
5354 // 'transformers-recursive.json',
Original file line number Diff line number Diff line change 1+ import path from 'node:path' ;
2+
13import type { IProject } from '../project/types' ;
24import { File } from './file' ;
35import type { FileKeyArgs , IFileIn , IFileRegistry } from './types' ;
@@ -50,6 +52,7 @@ export class FileRegistry implements IFileRegistry {
5052 }
5153
5254 private createFileKey ( args : FileKeyArgs ) : string {
53- return `${ args . external ? 'ext:' : '' } ${ args . logicalFilePath } ${ args . language ? `:${ args . language } ` : '' } ` ;
55+ const logicalPath = args . logicalFilePath . split ( path . sep ) . join ( '/' ) ;
56+ return `${ args . external ? 'ext:' : '' } ${ logicalPath } ${ args . language ? `:${ args . language } ` : '' } ` ;
5457 }
5558}
Original file line number Diff line number Diff line change 1+ import path from 'node:path' ;
2+
13import type { RenderContext , Renderer } from '@hey-api/codegen-core' ;
24import ts from 'typescript' ;
35
@@ -97,7 +99,7 @@ export class TypeScriptRenderer implements Renderer {
9799 file : ctx . file ,
98100 fromFile : exp . from ,
99101 preferFileExtension : this . preferFileExtension ,
100- root : ctx . project . root ,
102+ root : ctx . project . root . split ( path . sep ) . join ( '/' ) ,
101103 } ) ;
102104 const modulePath = this . resolveModuleName ?.( sortKey [ 2 ] ) ?? sortKey [ 2 ] ;
103105 const [ groupIndex ] = sortKey ;
@@ -169,7 +171,7 @@ export class TypeScriptRenderer implements Renderer {
169171 file : ctx . file ,
170172 fromFile : imp . from ,
171173 preferFileExtension : this . preferFileExtension ,
172- root : ctx . project . root ,
174+ root : ctx . project . root . split ( path . sep ) . join ( '/' ) ,
173175 } ) ;
174176 const modulePath = this . resolveModuleName ?.( sortKey [ 2 ] ) ?? sortKey [ 2 ] ;
175177 const [ groupIndex ] = sortKey ;
Original file line number Diff line number Diff line change @@ -99,7 +99,7 @@ export const moduleSortKey = ({
9999} ) : SortKey => {
100100 const fromPath = fromFile . finalPath ! ;
101101 const filePath = file . finalPath ! ;
102- let modulePath = fromPath ;
102+ let modulePath = fromPath . split ( path . sep ) . join ( '/' ) ;
103103
104104 // built-ins
105105 // TODO: based on nodeBuiltins set
You can’t perform that action at this time.
0 commit comments