Skip to content

Commit

Permalink
Path parameters are required by default
Browse files Browse the repository at this point in the history
  • Loading branch information
anttiviljami committed Jan 29, 2024
1 parent bc6ae54 commit e9d85e5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/typegen/src/typegen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ export async function main() {
})
.option('disableOptionalPathParameters', {
type: 'string',
description: 'If true the parameters will be required when path parameters are given',
default: false,
description: 'Force all path parameters to be required',
default: true,
})
.usage('Usage: $0 [file]')
.example('$0 ./openapi.yml > openapi.d.ts', '')
Expand All @@ -67,7 +67,7 @@ export async function main() {
opts.transformOperationName = module[func];
}

opts.disableOptionalPathParameters = argv.disableOptionalPathParameters ?? false;
opts.disableOptionalPathParameters = argv.disableOptionalPathParameters ?? true;

const [imports, schemaTypes, operationTypings] = await generateTypesForDocument(argv._[0] as string, opts);
console.log(imports, '\n');
Expand Down

0 comments on commit e9d85e5

Please sign in to comment.