From a6f9a47eb8927a1cfd848e26763af52842595118 Mon Sep 17 00:00:00 2001 From: Lorna Mitchell Date: Wed, 2 Oct 2024 13:29:52 +0100 Subject: [PATCH] fix: update tag-sorting plugin to use new plugin syntax --- custom-plugin-decorators/tag-sorting/README.md | 12 +++++++----- custom-plugin-decorators/tag-sorting/tag-sorting.js | 13 +++++++------ 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/custom-plugin-decorators/tag-sorting/README.md b/custom-plugin-decorators/tag-sorting/README.md index 53dc40d..f8e4031 100644 --- a/custom-plugin-decorators/tag-sorting/README.md +++ b/custom-plugin-decorators/tag-sorting/README.md @@ -17,11 +17,13 @@ Here's the main plugin entrypoint, it's in `tag-sorting.js`: const SortTagsAlphabetically = require('./decorator-alpha'); -module.exports = { - id: 'tag-sorting', - decorators: { - oas3: { - 'alphabetical': SortTagsAlphabetically, +module.exports = function tagSortingPlugin() { + return { + id: 'tag-sorting', + decorators: { + oas3: { + 'alphabetical': SortTagsAlphabetically, + } } } } diff --git a/custom-plugin-decorators/tag-sorting/tag-sorting.js b/custom-plugin-decorators/tag-sorting/tag-sorting.js index ef5cec6..13c2a0c 100644 --- a/custom-plugin-decorators/tag-sorting/tag-sorting.js +++ b/custom-plugin-decorators/tag-sorting/tag-sorting.js @@ -1,11 +1,12 @@ const SortTagsAlphabetically = require('./decorator-alpha'); -module.exports = { - id: 'tag-sorting', - decorators: { - oas3: { - 'alphabetical': SortTagsAlphabetically, +module.exports = function tagSortingPlugin() { + return { + id: 'tag-sorting', + decorators: { + oas3: { + 'alphabetical': SortTagsAlphabetically, + } } } - }