Skip to content

Commit e1c2ff4

Browse files
committed
Only make optional when defaultRequestParams has a truthy value
1 parent 8d62600 commit e1c2ff4

File tree

3 files changed

+48
-48
lines changed

3 files changed

+48
-48
lines changed

templates/default/procedure-call.ejs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ const isFetchTemplate = config.httpClientType === HTTP_CLIENT.FETCH;
1414
1515
const requestConfigParam = {
1616
name: specificArgNameResolver.resolve(RESERVED_REQ_PARAMS_ARG_NAMES),
17-
optional: true,
17+
optional: !!config.defaultRequestParams,
1818
type: "RequestParams",
1919
defaultValue: config.defaultRequestParams ?? "{}",
2020
}

templates/modular/procedure-call.ejs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ const isFetchTemplate = config.httpClientType === HTTP_CLIENT.FETCH;
1414
1515
const requestConfigParam = {
1616
name: specificArgNameResolver.resolve(RESERVED_REQ_PARAMS_ARG_NAMES),
17-
optional: true,
17+
optional: !!config.defaultRequestParams,
1818
type: "RequestParams",
1919
defaultValue: config.defaultRequestParams ?? "{}",
2020
}

0 commit comments

Comments
 (0)