diff --git a/generator/api.ts b/generator/api.ts index b08ad40a..92a7fbee 100644 --- a/generator/api.ts +++ b/generator/api.ts @@ -161,6 +161,9 @@ function extractInfo(obj, mode = 'example') { if (obj.items.hasOwnProperty('properties')) { return [extractInfo(obj.items.properties, mode)]; } else { + if (mode === 'example' && obj.hasOwnProperty('example')) { + return obj.example; + } return [extractInfo(obj.items, mode)]; } }