mirror of
https://github.com/Kong/insomnia
synced 2024-11-08 06:39:48 +00:00
OpenAPI spec check for empty properties on import
This commit is contained in:
parent
62f3899e23
commit
af3a4f0553
@ -132,7 +132,10 @@ function parseEndpoints(document) {
|
||||
return importFolderItem(tag, defaultParent);
|
||||
});
|
||||
const folderLookup = {};
|
||||
folders.forEach(folder => (folderLookup[folder.name] = folder._id));
|
||||
|
||||
for (const folder of folders) {
|
||||
folderLookup[folder.name] = folder._id;
|
||||
}
|
||||
|
||||
const requests = [];
|
||||
endpointsSchemas.map(endpointSchema => {
|
||||
@ -427,9 +430,11 @@ function generateParameterExample(schema) {
|
||||
const example = {};
|
||||
const { properties } = schema;
|
||||
|
||||
Object.keys(properties).forEach(propertyName => {
|
||||
if (properties) {
|
||||
for (const propertyName of Object.keys(properties)) {
|
||||
example[propertyName] = generateParameterExample(properties[propertyName]);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
return example;
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user