You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+22-12
Original file line number
Diff line number
Diff line change
@@ -4,13 +4,11 @@ Render OpenAPI specs as documentation to your API developers.
4
4
5
5
## Overview
6
6
7
-
When you enable this module, it creates a new Drupal entity in your system named
7
+
When you enable this module, it creates a new content type named
8
8
"API Doc". You can add new API docs under __Content > API catalog__ in the admin menu.
9
9
10
10
Once added, the API name and description for each API Doc will be displayed in the
11
-
"APIs" menu item on the site using a Drupal view. Make sure to change the
12
-
"View published API docs" permissions if you want to allow registered or anonymous users
13
-
to be able to view published API documentation.
11
+
"APIs" menu item on the site using a Drupal view.
14
12
15
13
The OpenAPI spec by default is rendered using Apigee's SmartDocs custom field formatter.
16
14
@@ -26,27 +24,39 @@ To render the OpenAPI spec using Swagger UI:
26
24
3. Go to __Configuration > API docs > Manage display__ in the admin menu.
27
25
4. Change "OpenAPI specification" field format to use the Swagger UI field formatter.
28
26
29
-
The API Doc is an entity, you can configure it at __Structure > API docs__ in the admin
27
+
The API Doc is an node type, you can configure it at __Structure > Content types > API Doc__ in the admin
30
28
menu.
31
29
32
30
The "/apis" page ("APIs" menu link) is a view. You can modify it by editing the "API Catalog" view
33
31
under __Structure > Views__ in the admin menu.
34
32
33
+
## API Docs RBAC (Role based access control)
34
+
35
+
_API Docs_ are a node type, so any node access control module from contrib will work to restrict access and play well
36
+
with views.
37
+
38
+
To set up RBAC, we recommend ["Permissions by term"](https://www.drupal.org/project/permissions_by_term), which can
39
+
cover the most frequent scenarios. Refer to the online documentation (to be updated as part of
40
+
[#81](https://github.com/apigee/apigee-api-catalog-drupal/issues/81)) for a "How to" guide on setting up the RBAC:
41
+
https://www.drupal.org/node/3058344
42
+
35
43
## Planned Features
36
44
37
-
- Integration with Apigee API Products
45
+
- Integration with Apigee API Products.
38
46
- Add visual notifications when source URL specs have changed on the API Doc admin screen
39
47
40
48
### Known issues
41
49
50
+
-[Backwards compatibility with the version 1.x of this module is a separate issue](https://github.com/apigee/apigee-api-catalog-drupal/issues/80), you can subscribe to notifications to follow the status.
51
+
42
52
- The Apigee SmartDocs formatter can only render one OpenAPI spec per page and the URL pattern
43
-
must match `/api/{entityId}`. This means that the formatter will probably not work correctly if
44
-
you modify the default API Docs view or try to use this file Formatter on nodes or other entities.
53
+
must match `/api/{entityId}`. This means that the formatter will probably not work correctly if
54
+
you modify the default API Docs view or try to use this file Formatter on other node types or entities.
45
55
46
56
## Installing
47
57
48
58
This module must be installed on a Drupal site that is managed by Composer. Drupal.org has documentation on how to
49
-
[use Composer to manage Drupal site dependencies](https://www.drupal.org/docs/develop/using-composer/using-composer-to-manage-drupal-site-dependencies)
59
+
[use Composer to manage Drupal site dependencies](https://www.drupal.org/docs/develop/using-composer/using-composer-to-manage-drupal-site-dependencies)
50
60
to get you started quickly.
51
61
52
62
1. Install the module using [Composer](https://getcomposer.org/).
@@ -57,16 +67,16 @@ to get you started quickly.
57
67
cd /path/to/drupal/root
58
68
composer require drupal/apigee_api_catalog
59
69
```
60
-
For more information about installing contributed modules using Composer, read
70
+
For more information about installing contributed modules using Composer, read
61
71
[how to download contributed modules and themes using Composer](https://www.drupal.org/docs/develop/using-composer/using-composer-to-manage-drupal-site-dependencies#managing-contributed).
62
72
2. Choose **Extend** in the Drupal administration menu.
63
73
3. Select the **Apigee API catalog** module.
64
74
4. Choose **Install**.
65
75
66
76
## Development
67
77
68
-
Development is happening in our [GitHub repository](https://github.com/apigee/apigee-api-catalog-drupal). The Drupal.org issue
69
-
queue is disabled; we use the [Github issue queue](https://github.com/apigee/apigee-api-catalog-drupal) to coordinate
78
+
Development is happening in our [GitHub repository](https://github.com/apigee/apigee-api-catalog-drupal). The Drupal.org issue
79
+
queue is disabled; we use the [Github issue queue](https://github.com/apigee/apigee-api-catalog-drupal) to coordinate
70
80
development. See [CONTRIBUTING.md] for more information on contributing through development.
if (in_array($phase, ['update', 'runtime']) && $schemaVersion < 8801) {
45
+
return [
46
+
'apigee_api_catalog_update_unsupported' => [
47
+
'title' => t('Apigee API Catalog'),
48
+
'description' =>t('The <a href=":link_module">Apigee API Catalog</a> 1.x version is enabled on this site but the module has been replaced with a 2.x version on the filesystem. Currently there is no way to upgrade from 1.x to 2.x. You will need to revert to the latest 1.x version of the module or uninstall the Apigee API Catalog module which will remove the module\'s current content and configuration then install the 2.x version. If you want to upgrade you will need to follow <a href=":link_issue">issue #80</a> for updates on the upgrade path functionality.', [
0 commit comments