Skip to content
This repository has been archived by the owner on Nov 16, 2018. It is now read-only.

support question. could waterwheel.js be renamed openapi.js? #71

Open
laurencefass opened this issue Feb 2, 2018 · 4 comments
Open

Comments

@laurencefass
Copy link

laurencefass commented Feb 2, 2018

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?

@laurencefass laurencefass changed the title support question. is waterwheel.js (conceptually) openapi.js? support question. could waterwheel.js be renamed openapi.js? Feb 2, 2018
@richgerdes
Copy link

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.

@laurencefass
Copy link
Author

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?

@richgerdes
Copy link

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.

@laurencefass
Copy link
Author

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants