From 7bdb605dcfd70ec996ab1851f9a8d6882b872cb5 Mon Sep 17 00:00:00 2001 From: Vladimir Gorej Date: Thu, 23 Mar 2023 11:05:26 +0100 Subject: [PATCH] docs(oas31): provide docs for createOnlyOAS31SelectorWrapper --- src/core/plugins/oas31/fn.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/core/plugins/oas31/fn.js b/src/core/plugins/oas31/fn.js index 53a3b610..ab5d203f 100644 --- a/src/core/plugins/oas31/fn.js +++ b/src/core/plugins/oas31/fn.js @@ -73,6 +73,14 @@ export const createSystemSelector = } /* eslint-disable react/jsx-filename-extension */ +/** + * Creates component wrapper that only wraps the component + * when spec is OpenAPI 3.1.0. Otherwise, returns original + * component with passed props. + * + * @param Component + * @returns {function(*, *): function(*): *} + */ export const createOnlyOAS31ComponentWrapper = (Component) => (Original, system) => (props) => { if (system.specSelectors.isOAS31()) {