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
18 lines
444 B
TypeScript
18 lines
444 B
TypeScript
import type { ConfigFile } from '@rtk-query/codegen-openapi';
|
|
|
|
const config: ConfigFile = {
|
|
schemaFile: '../schema/rhsm.json',
|
|
apiFile: '../../src/store/emptyRhsmApi.ts',
|
|
apiImport: 'emptyRhsmApi',
|
|
outputFile: '../../src/store/rhsmApi.ts',
|
|
exportName: 'rhsmApi',
|
|
hooks: true,
|
|
unionUndefined: true,
|
|
filterEndpoints: [
|
|
'listActivationKeys',
|
|
'showActivationKey',
|
|
'createActivationKeys',
|
|
],
|
|
};
|
|
|
|
export default config;
|