Skip to content

Commit

Permalink
DOC-12637 Fix redocly plugins (#7153)
Browse files Browse the repository at this point in the history
  • Loading branch information
osfameron authored Oct 14, 2024
1 parent 9e08472 commit 0868626
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
3 changes: 3 additions & 0 deletions .redocly.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ apis:
admin-capella:
root: "./docs/api/admin-capella.yaml"
decorators:
plugin/excise-rbac-capella: on
filter-out:
property: x-capella
value: false
Expand All @@ -36,6 +37,8 @@ apis:
value: false
info-override:
description: "App Services manages access and synchronization between Couchbase Lite and Couchbase Capella"
title: "App Services"
plugin/excise-rbac-capella: on
plugin/replace-description-capella: on
plugin/replace-server-capella:
serverUrl: 'https://{hostname}:4984'
Expand Down
2 changes: 1 addition & 1 deletion docs/api/plugins/decorators/excise-rbac-capella.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ function ExciseRBACCapella() {
Operation: {
leave(Operation) {
// remove all text after first regex match
idx = Operation.description.search(re);
idx = (Operation.description || '').search(re);
if (idx > 0) {
Operation.description = Operation.description.substr(0, idx);
}
Expand Down
10 changes: 6 additions & 4 deletions docs/api/plugins/decorators/replace-description-capella.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,12 @@ function ReplaceDescriptionCapella() {
return {
Operation: {
leave(Operation) {
Operation.description = Operation.description.replace(
"Sync Gateway",
"App Services",
);
if (Operation.description) {
Operation.description = Operation.description.replace(
"Sync Gateway",
"App Services",
);
}
},
},
};
Expand Down

0 comments on commit 0868626

Please sign in to comment.