@orval/core 7.6.0 → 7.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -437,6 +437,7 @@ type NormalizedQueryOptions = {
437
437
  shouldExportMutatorHooks?: boolean;
438
438
  shouldExportHttpClient?: boolean;
439
439
  shouldExportQueryKey?: boolean;
440
+ shouldSplitQueryKey?: boolean;
440
441
  signal?: boolean;
441
442
  version?: 3 | 4 | 5;
442
443
  };
@@ -455,6 +456,7 @@ type QueryOptions = {
455
456
  shouldExportMutatorHooks?: boolean;
456
457
  shouldExportHttpClient?: boolean;
457
458
  shouldExportQueryKey?: boolean;
459
+ shouldSplitQueryKey?: boolean;
458
460
  signal?: boolean;
459
461
  version?: 3 | 4 | 5;
460
462
  };
package/dist/index.js CHANGED
@@ -52036,7 +52036,7 @@ var generateInterface = ({
52036
52036
  }
52037
52037
  }
52038
52038
  if (scalar.type === "object" && !context?.output.override?.useTypeOverInterfaces) {
52039
- if (scalar.type === "object" && schema.properties && Object.values(schema.properties).every((item) => "const" in item)) {
52039
+ if (scalar.type === "object" && schema.properties && Object.values(schema.properties).length > 0 && Object.values(schema.properties).every((item) => "const" in item)) {
52040
52040
  const mappedScalarValue = scalar.value.replaceAll(";", ",");
52041
52041
  model += `export const ${name}Value = ${mappedScalarValue} as const;
52042
52042
  export type ${name} = typeof ${name}Value;
@@ -52433,7 +52433,7 @@ var writeSchemas = async ({
52433
52433
  } else {
52434
52434
  duplicateNamesMap.set(
52435
52435
  schema.name,
52436
- (duplicateNamesMap.get(schema.name) || 0) + 1
52436
+ (duplicateNamesMap.get(schema.name) || 1) + 1
52437
52437
  );
52438
52438
  }
52439
52439
  });
@@ -52603,7 +52603,10 @@ var writeSingleMode = async ({
52603
52603
  }) => {
52604
52604
  try {
52605
52605
  const { path: path2, dirname: dirname3 } = getFileInfo(output.target, {
52606
- backupFilename: camel(builder.info.title),
52606
+ backupFilename: conventionName(
52607
+ builder.info.title,
52608
+ output.namingConvention
52609
+ ),
52607
52610
  extension: output.fileExtension
52608
52611
  });
52609
52612
  const {
@@ -52704,7 +52707,10 @@ var writeSplitMode = async ({
52704
52707
  }) => {
52705
52708
  try {
52706
52709
  const { filename, dirname: dirname3, extension } = getFileInfo(output.target, {
52707
- backupFilename: camel(builder.info.title),
52710
+ backupFilename: conventionName(
52711
+ builder.info.title,
52712
+ output.namingConvention
52713
+ ),
52708
52714
  extension: output.fileExtension
52709
52715
  });
52710
52716
  const {