Active
Project:
OpenAPI
Version:
8.x-1.x-dev
Component:
User interface
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
19 Jun 2017 at 07:35 UTC
Updated:
12 Jan 2019 at 19:12 UTC
Jump to comment: Most recent
Drupal doesn't have versioning for APIs. Hence ReDoc puts "(Versioning not supported)" front and center.
Comments
Comment #2
richgerdesSince Drupal doesn't support versioning, its not something this module is going to support. One way to implement versioning is to stand up separate version of the api when breaking changes are made (removing a field). This offers an interesting problem of how to handle the cross platform data, which is out of scope for this project. However, a solution would be to write handlers the then map the first api onto the second. These api versions would then need to be marked, per site. This could be done through a module which simply allows the user to set the current version of the api in each instance.
For now, this is out of scope for openapi until this is handled by another part of the Drupal Ecosystem. However this bring up the question of the sensibility of this api. There are currently no alter hooks or plugins, so a project cannot change the version message except for manipulating the services and routes. We should look into providing more extensible options for altering the schema documents.
Comment #3
richgerdesThinking more on the implementation of versioning. In theory, it could be helpful to document the changes of an api. A handy way to do this would be to periodically export snapshots of the openapi docs. This could even be stored within drupal using the Swagger UI Field Formatter (or rather the future openapi ui variant).
This however doesn't address the fact that the downstream modules (jsonapi and rest) don't support versioning and as a result the archived docs don't provide any use case.