You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Prefix generated request interface names with API classname rather than
using namespaces, because namespaces are not well-supported by some
tooling (in particular, Babel).
Copy file name to clipboardExpand all lines: docs/generators/typescript-fetch.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -19,4 +19,4 @@ sidebar_label: typescript-fetch
19
19
|npmRepository|Use this property to set an url your private npmRepo in the package.json||null|
20
20
|withInterfaces|Setting this property to true will generate interfaces next to the default class implementations.||false|
21
21
|useSingleRequestParameter|Setting this property to true will generate functions with a single argument containing all API endpoint parameters instead of one argument per parameter.||true|
22
-
|namespaceParameterInterfaces|Setting this property to true will generate parameter interface declarations within a dedicated namespace to avoid name conflicts.||false|
22
+
|prefixParameterInterfaces|Setting this property to true will generate parameter interface declarations prefixed with API class name to avoid name conflicts.||false|
Copy file name to clipboardExpand all lines: modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptFetchClientCodegen.java
+13-24
Original file line number
Diff line number
Diff line change
@@ -33,11 +33,11 @@ public class TypeScriptFetchClientCodegen extends AbstractTypeScriptClientCodege
@@ -61,7 +61,7 @@ public TypeScriptFetchClientCodegen() {
61
61
this.cliOptions.add(newCliOption(NPM_REPOSITORY, "Use this property to set an url your private npmRepo in the package.json"));
62
62
this.cliOptions.add(newCliOption(WITH_INTERFACES, "Setting this property to true will generate interfaces next to the default class implementations.", SchemaTypeUtil.BOOLEAN_TYPE).defaultValue(Boolean.FALSE.toString()));
63
63
this.cliOptions.add(newCliOption(USE_SINGLE_REQUEST_PARAMETER, "Setting this property to true will generate functions with a single argument containing all API endpoint parameters instead of one argument per parameter.", SchemaTypeUtil.BOOLEAN_TYPE).defaultValue(Boolean.TRUE.toString()));
64
-
this.cliOptions.add(newCliOption(NAMESPACE_PARAMETER_INTERFACES, "Setting this property to true will generate parameter interface declarations within a dedicated namespace to avoid name conflicts.", SchemaTypeUtil.BOOLEAN_TYPE).defaultValue(Boolean.FALSE.toString()));
64
+
this.cliOptions.add(newCliOption(PREFIX_PARAMETER_INTERFACES, "Setting this property to true will generate parameter interface declarations prefixed with API class name to avoid name conflicts.", SchemaTypeUtil.BOOLEAN_TYPE).defaultValue(Boolean.FALSE.toString()));
Copy file name to clipboardExpand all lines: modules/openapi-generator/src/test/java/org/openapitools/codegen/options/TypeScriptFetchClientOptionsProvider.java
+1-1
Original file line number
Diff line number
Diff line change
@@ -52,7 +52,7 @@ public Map<String, String> createOptions() {
0 commit comments