Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[3.2.1 backport] CBG-4307 fix redocly plugins #7154

Merged
merged 1 commit into from
Oct 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading