Set the option to generate union undefined types for objects that have optional items. This will allow us to enable `exactOptionalPropertyTypes` in our tsconfig [1]. [1] This is a recommended setting, see: https://www.typescriptlang.org/tsconfig/#exactOptionalPropertyTypes
22 lines
581 B
TypeScript
22 lines
581 B
TypeScript
import type { ConfigFile } from '@rtk-query/codegen-openapi';
|
|
|
|
const config: ConfigFile = {
|
|
schemaFile: '../schema/contentSources.json',
|
|
apiFile: '../../src/store/emptyContentSourcesApi.ts',
|
|
apiImport: 'emptyContentSourcesApi',
|
|
outputFile: '../../src/store/contentSourcesApi.ts',
|
|
exportName: 'contentSourcesApi',
|
|
hooks: true,
|
|
unionUndefined: true,
|
|
filterEndpoints: [
|
|
'createRepository',
|
|
'listRepositories',
|
|
'listRepositoriesRpms',
|
|
'searchRpm',
|
|
'searchPackageGroup',
|
|
'listFeatures',
|
|
'listSnapshotsByDate',
|
|
],
|
|
};
|
|
|
|
export default config;
|