Skip to content

Commit fc455c7

Browse files
authored
Merge pull request #373 from antalike/v2/content
fix: response code issue in API Reference
2 parents 76c6f1d + 4e94434 commit fc455c7

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

app/utils/oas.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,10 @@ function generateSampleFromSchema(schema: SchemaObject, api: OASDocument): unkno
225225
Object.entries(schema.properties).forEach(([key, propSchema]) => {
226226
obj[key] = generateSampleFromSchema(propSchema as SchemaObject, api)
227227
})
228+
} else if ('items' in schema) {
229+
return generateSampleFromSchema((schema as any).items as SchemaObject, api)
228230
}
231+
229232
return obj
230233
}
231234

0 commit comments

Comments
 (0)