diff --git a/src/MenuBuilder.js b/src/MenuBuilder.js index c17fcf31..04b93b82 100644 --- a/src/MenuBuilder.js +++ b/src/MenuBuilder.js @@ -209,7 +209,7 @@ export default class MenuBuilder { const examples = methodObj.examples; if ((hasTag(methodObj, 'property') || hasTag(methodObj, 'property:readonly')) && !hasTag(methodObj, 'property:immutable')) { examples.push({ - name: CONSTANTS.SUBSCRIBE + ' ' + methodObj.name, + name: CONSTANTS.ADDITIONAL_SUBSCRIBE + ' ' + methodObj.name, schema: { type: 'number', }, diff --git a/src/MethodFilters.js b/src/MethodFilters.js index af715890..d05f077d 100644 --- a/src/MethodFilters.js +++ b/src/MethodFilters.js @@ -68,7 +68,7 @@ export default class MethodFilters { isSubscribeMethod(method) { let isSubscribe = false; - if (method.name && method.name.split(' ')[0] === CONSTANTS.SUBSCRIBE) { + if (method.name && method.name.startsWith(CONSTANTS.ADDITIONAL_SUBSCRIBE)) { isSubscribe = true; } return isSubscribe; diff --git a/src/constant.js b/src/constant.js index dbc62c97..d47d4425 100644 --- a/src/constant.js +++ b/src/constant.js @@ -130,6 +130,7 @@ export const CONSTANTS = { METHODS_TO_BE_EXCLUDED_ONLY_DEVICES: [], PUBSUB_ACK: { pubSubStatus: 'Connection successful' }, SUBSCRIBE: 'Subscribe', + ADDITIONAL_SUBSCRIBE: 'Subscribing additional methods', PROVIDER_REGISTRATION: 'provider registered successfully', PROVIDER_REGISTRATION_FAILED: 'Provider registeration failed', NO_PROVIDER_SPECIFIED: 'No provider has been specified',