diff --git a/lib/nodejs/swagger-parser/__tests__/lib/processItems/object.test.js b/lib/nodejs/swagger-parser/__tests__/lib/processItems/object.test.js index 85775d3..63e573a 100644 --- a/lib/nodejs/swagger-parser/__tests__/lib/processItems/object.test.js +++ b/lib/nodejs/swagger-parser/__tests__/lib/processItems/object.test.js @@ -72,9 +72,8 @@ describe('swagger-parser.lib.processItems.object', () => { processObject({object, key, isRequired, result}); - expect(mockUpdateResult).toHaveBeenCalledTimes(2); + expect(mockUpdateResult).toHaveBeenCalled(); expect(mockUpdateResult).toHaveBeenCalledWith({object, key, isRequired, result}); - expect(mockUpdateResult).toHaveBeenCalledWith({object: object.additionalProperties, key, isRequired}); expect(mockTraverse).toHaveBeenCalledTimes(1); expect(mockTraverse).toHaveBeenCalledWith({object: {type: 'string'} , key: 'foo', isRequired: true}); diff --git a/lib/nodejs/swagger-parser/lib/processItems/object.js b/lib/nodejs/swagger-parser/lib/processItems/object.js index 7158183..fc402a7 100644 --- a/lib/nodejs/swagger-parser/lib/processItems/object.js +++ b/lib/nodejs/swagger-parser/lib/processItems/object.js @@ -7,10 +7,8 @@ const processObject = ({object, key, isRequired, result}) => { updateResult({object, key, isRequired, result}); // Check for additional properteis - // FIXME:: Check the representation of additionalProperties if (object.additionalProperties){ object = object.additionalProperties; - updateResult({object, key, isRequired}); } const properties = object.properties || {};