![]() Server : Apache System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64 User : corals ( 1002) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/corals/rentpix.corals.io/vendor/swagger-api/swagger-ui/src/core/plugins/spec/ |
import get from "lodash/get" export const updateSpec = (ori, {specActions}) => (...args) => { ori(...args) specActions.parseToJson(...args) } export const updateJsonSpec = (ori, {specActions}) => (...args) => { ori(...args) specActions.invalidateResolvedSubtreeCache() // Trigger resolution of any path-level $refs. const [json] = args const pathItems = get(json, ["paths"]) || {} const pathItemKeys = Object.keys(pathItems) pathItemKeys.forEach(k => { const val = get(pathItems, [k]) if(val.$ref) { specActions.requestResolvedSubtree(["paths", k]) } }) // Trigger resolution of any securitySchemes-level $refs. specActions.requestResolvedSubtree(["components", "securitySchemes"]) } // Log the request ( just for debugging, shouldn't affect prod ) export const executeRequest = (ori, { specActions }) => (req) => { specActions.logRequest(req) return ori(req) } export const validateParams = (ori, { specSelectors }) => (req) => { return ori(req, specSelectors.isOAS3()) }