Skip to content

Commit d95fff7

Browse files
committed
filter media object if schema and examples are empty
1 parent 9ced139 commit d95fff7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

forward_engineering/helpers/componentsHelpers/parametersHelper.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,9 @@ function getContent(data) {
9999
if (!properties) {
100100
return;
101101
}
102-
if (properties.schema && get(properties.schema, 'type') === 'object' && !get(properties.schema, 'properties')) {
102+
const isSchemaEmpty = properties.schema && get(properties.schema, 'type') === 'object' && !get(properties.schema, 'properties');
103+
const isExamplesEmpty = !get(properties, 'examples.properties');
104+
if (isSchemaEmpty && isExamplesEmpty) {
103105
return;
104106
}
105107
acc[key] = mapMediaTypeObject(data.properties[key]);

0 commit comments

Comments
 (0)