Skip to content

Commit 02baeb6

Browse files
committed
Fixes #282 : example is not generated completely when it contains an array
1 parent 07c5113 commit 02baeb6

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/templates/endpoint-template.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,8 @@ function endpointBodyTemplate(path) {
6363
${codeSampleTabPanel}
6464
</div>
6565
<div class='req-resp-container'>
66-
<api-request class="request"
66+
<api-request
67+
class="request"
6768
method = "${path.method}",
6869
path = "${path.path}"
6970
.parameters = "${path.parameters}"

src/utils/schema-utils.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -271,11 +271,11 @@ export function schemaToSampleObj(schema, config = { }) {
271271
} else {
272272
obj[key] = [schemaToSampleObj(schema.properties[key].items, config)];
273273
}
274-
break;
274+
continue;
275275
}
276276
if (schema.example) {
277277
obj[key] = schema.example;
278-
break;
278+
continue;
279279
} else {
280280
obj[key] = schemaToSampleObj(schema.properties[key], config);
281281
}

0 commit comments

Comments
 (0)