createOnlyOAS31SelectorWrapper =
  (selector) =>
  (oriSelector, system) =>
  (state, ...args) => {
    if (system.getSystem().specSelectors.isOAS31()) {
      const selectedValue = selector(state, ...args)
      return typeof selectedValue === "function"
        ? selectedValue(oriSelector, system)
        : selectedValue
    } else {
      return oriSelector(...args)
    }
  }
Creates selector wrapper that returns value of the passed
selector when spec is OpenAPI 3.1.0., calls original selector otherwise.


@param selector
@returns {function(*, *): function(*, ...[*]): (*)}