acquia / waterwheel.js

A generic JavaScript helper library to query and manipulate Drupal 8 via core REST and JSON API
https://github.com/acquia/waterwheel.js
232 stars 26 forks source link

"Cannot read property 'hasOwnProperty' of undefined" during populateResources() #68

Open richgerdes opened 6 years ago

richgerdes commented 6 years ago

I am testing out Waterwheel for use on a project.

I was able to setup the project with OAuth and Cors but one i got that online, i was unable to parse the openapi/jsonapi resources with populateResources().

During iteration over the definitions, the implementation expects for each Tag to exist, however, this is not true. In my case on a basic site, the Actions Tag exists, but there are not "Actions" definitions. The site is a simple build, the minimal install of 8.4.3 with a handful of core modules and OpenApi, Simple OAuth, Cors. and Json Api.

richgerdes commented 6 years ago

Ultimately the line the throws the error is swagger.js#L15 as a result of using [entity] on line 13.