waterwheel.js
waterwheel.js copied to clipboard
support question. could waterwheel.js be renamed openapi.js?
i've just started learning about waterwheel and openapi. i see waterwheel module functionality is been moved to openapi module. if waterwheel module is deprecated, does that make waterwheel.js essentially (conceptually) to something like a openapi/swagger.js. would the latter be a better label or does it provide something different?
also does drupal openapi module contain waterwheel.js to work out the box or is it a separate download? would it be beneficial to bundle the module and the javascript together? are there reasons for not doing so?
The OpenApi
module is not directly related to this Waterwheel.js
library. OpenApi
provides a standardized resource, based on the OpenApi 2.0 specifications, which lists the available endpoints on a Drupal installation. The waterwheel project uses this data to discover the endpoints and entities available for an installation of Drupal. Before the Waterwheel
Drupal module was moved to the OpenApi
namespace, it provided these features. OpenApiI
itself does not provide and REST resources, beyond the list of available endpoints.
To answer the question, Waterwheel.js
is able to leverage the api endpoints from Drupal Core's REST module to interact with a Drupal site. Because of this, openapi.js
would not be an accurate name for the project since it provides other functions beyond just parsing the OpenApi 2.0 specifications.
many thanks. i appreciate your time. please can you summarise the "other functions" beyond parsing openapi spec? does it also harness the jsonapi to provide both discovery and mutation?
I have yet to dive into the full feature set of Waterwheel.js. Your best bet is to look at the Readme file included in the project. It details the functions it supports and provides examples of how to use the library against both Drupal Core's REST and the JsonAPI resources. The readme does state the jsonapi support is provisional, so not all actions will be fully supported there, but it should work with GET
, POST
, and DELETE
.
ok so it supports both REST and JSON! thanks this is the orientation i needed to get started. i'll start running some projects and digging into code. thanks again. all the best.