File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
packages/zudoku/src/vite/api Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change 66} from "@apidevtools/json-schema-ref-parser" ;
77import { upgrade , validate } from "@scalar/openapi-parser" ;
88import slugify from "@sindresorhus/slugify" ;
9+ import { deepEqual } from "fast-equals" ;
910import type { LoadedConfig } from "../../config/config.js" ;
1011import type { Processor } from "../../config/validators/BuildSchema.js" ;
1112import type { VersionConfig } from "../../config/validators/validate.js" ;
@@ -99,7 +100,7 @@ export class SchemaManager {
99100 const match = normalizeInputs ( apiConfig . input ) . some (
100101 ( i ) =>
101102 path . resolve ( this . config . __meta . rootDir , i . input ) === filePath &&
102- JSON . stringify ( i . params ) === JSON . stringify ( params ) ,
103+ deepEqual ( i . params , params ) ,
103104 ) ;
104105 if ( match ) return apiConfig . path ;
105106 }
@@ -179,9 +180,7 @@ export class SchemaManager {
179180 }
180181
181182 const index = schemas . findIndex (
182- ( s ) =>
183- s . inputPath === filePath &&
184- JSON . stringify ( s . params ) === JSON . stringify ( params ) ,
183+ ( s ) => s . inputPath === filePath && deepEqual ( s . params , params ) ,
185184 ) ;
186185 const existingSchema = schemas [ index ] ;
187186
You can’t perform that action at this time.
0 commit comments