File tree Expand file tree Collapse file tree 4 files changed +14
-9
lines changed
openapi-ts/src/ts-dsl/render Expand file tree Collapse file tree 4 files changed +14
-9
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 { ExportModule , ImportModule } from '../bindings' ;
24import { fileBrand } from '../brands' ;
35import { debug } from '../debug' ;
@@ -63,7 +65,7 @@ export class File {
6365 this . external = input . external ?? false ;
6466 this . id = id ;
6567 if ( input . language !== undefined ) this . _language = input . language ;
66- this . _logicalFilePath = input . logicalFilePath ;
68+ this . _logicalFilePath = input . logicalFilePath . split ( path . sep ) . join ( '/' ) ;
6769 if ( input . name !== undefined ) this . _name = input . name ;
6870 this . project = project ;
6971 }
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 @@ -97,9 +97,8 @@ export const moduleSortKey = ({
9797 preferFileExtension : string ;
9898 root : string ;
9999} ) : SortKey => {
100- const fromPath = fromFile . finalPath ! ;
101- const filePath = file . finalPath ! ;
102- let modulePath = fromPath ;
100+ const filePath = file . finalPath ! . split ( path . sep ) . join ( '/' ) ;
101+ let modulePath = fromFile . finalPath ! . split ( path . sep ) . join ( '/' ) ;
103102
104103 // built-ins
105104 // TODO: based on nodeBuiltins set
@@ -110,7 +109,7 @@ export const moduleSortKey = ({
110109 }
111110
112111 // outside project root
113- if ( ! modulePath . startsWith ( root ) ) {
112+ if ( ! modulePath . startsWith ( root . split ( path . sep ) . join ( '/' ) ) ) {
114113 return [ 1 , 0 , modulePath ] ;
115114 }
116115
You can’t perform that action at this time.
0 commit comments