Skip to content

Commit 403e711

Browse files
committed
- Aligned with latest development
2 parents a331546 + cffa707 commit 403e711

File tree

6 files changed

+374
-269
lines changed

6 files changed

+374
-269
lines changed

src/openApi/v3/parser/getModel.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ export function getModel(openApi: OpenApi, definition: OpenApiSchema, isDefiniti
103103
}
104104
}
105105

106-
if (definition.type === 'object' && typeof definition.additionalProperties === 'object') {
106+
if (definition.type === 'object' && definition.additionalProperties && typeof definition.additionalProperties === 'object') {
107107
if (definition.additionalProperties.$ref) {
108108
const additionalProperties = getType(definition.additionalProperties.$ref);
109109
model.export = 'dictionary';

src/templates/partials/schemaComposition.hbs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
{
22
type: '{{export}}',
3-
43
contains: [{{#each properties}}{{>schema}}, {{/each}}]
54
{{#if isReadOnly}}
65
isReadOnly: {{{isReadOnly}}},
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
({{#each properties}}{{#unless @first}} & {{/unless}}{{>type}}{{/each}}){{>isNullable}}
1+
({{#each properties}}{{>type}}{{#unless @last}} & {{/unless}}{{/each}}){{>isNullable}}

src/templates/partials/typeUnion.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
({{#each properties}}{{#unless @first}} | {{/unless}}{{>type}}{{/each}}){{>isNullable}}
1+
({{#each properties}}{{>type}}{{#unless @last}} | {{/unless}}{{/each}}){{>isNullable}}

0 commit comments

Comments
 (0)