Skip to content

Commit 0aa1b7c

Browse files
komachimacjohnny
authored andcommitted
[typescript-rxjs]: Add support for nullable (#4438)
1 parent dbbe2b8 commit 0aa1b7c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

modules/openapi-generator/src/main/resources/typescript-rxjs/apis.mustache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import {
1515
{{#allParams.0}}
1616
export interface {{operationIdCamelCase}}Request {
1717
{{#allParams}}
18-
{{paramName}}{{^required}}?{{/required}}: {{#isEnum}}{{{datatypeWithEnum}}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}};
18+
{{paramName}}{{^required}}?{{/required}}: {{#isEnum}}{{{datatypeWithEnum}}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{#isNullable}} | null{{/isNullable}}{{/isEnum}};
1919
{{/allParams}}
2020
}
2121

modules/openapi-generator/src/main/resources/typescript-rxjs/modelGeneric.mustache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export interface {{classname}} {{#parent}}extends {{{parent}}} {{/parent}}{
2121
* @type {{=<% %>=}}{<%&datatype%>}<%={{ }}=%>
2222
* @memberof {{classname}}
2323
*/
24-
{{#isReadOnly}}readonly {{/isReadOnly}}{{name}}{{^required}}?{{/required}}: {{#isEnum}}{{{datatypeWithEnum}}}{{/isEnum}}{{^isEnum}}{{{datatype}}}{{/isEnum}};
24+
{{#isReadOnly}}readonly {{/isReadOnly}}{{name}}{{^required}}?{{/required}}: {{#isEnum}}{{{datatypeWithEnum}}}{{/isEnum}}{{^isEnum}}{{{datatype}}}{{#isNullable}} | null{{/isNullable}}{{/isEnum}};
2525
{{/vars}}
2626
}{{#hasEnums}}
2727

0 commit comments

Comments
 (0)