@kubb/agent 5.0.0-alpha.3 → 5.0.0-alpha.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.output/nitro.json +2 -2
- package/.output/server/chunks/nitro/nitro.mjs +12276 -10302
- package/.output/server/chunks/nitro/nitro.mjs.map +1 -1
- package/.output/server/chunks/routes/api/health.get.mjs +7 -11
- package/.output/server/chunks/routes/api/health.get.mjs.map +1 -1
- package/.output/server/index.mjs +7 -11
- package/.output/server/index.mjs.map +1 -1
- package/.output/server/node_modules/.nitro/@readme/openapi-parser@6.0.1/dist/chunk-IYQ77VVR.js +25 -0
- package/.output/server/node_modules/.nitro/@readme/openapi-parser@6.0.1/dist/index.js +923 -0
- package/.output/server/node_modules/.nitro/@readme/openapi-parser@6.0.1/package.json +84 -0
- package/.output/server/node_modules/.nitro/{picomatch@4.0.3 → picomatch@4.0.4}/lib/constants.js +4 -0
- package/.output/server/node_modules/.nitro/{picomatch@4.0.3 → picomatch@4.0.4}/lib/parse.js +301 -0
- package/.output/server/node_modules/.nitro/{picomatch@4.0.3 → picomatch@4.0.4}/lib/picomatch.js +11 -3
- package/.output/server/node_modules/.nitro/{picomatch@4.0.3 → picomatch@4.0.4}/package.json +2 -3
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/add.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/addProp.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/allPass.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/anyPass.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/binarySearchCutoffIndex-CalebGhL.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/capitalize.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/ceil.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/chunk.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/clamp.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/clone.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/concat.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/conditional-CTEJD5TX.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/constant.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/countBy.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/debounce.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/defaultTo.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/difference.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/differenceWith.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/divide.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/doNothing.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/drop.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/dropFirstBy.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/dropLast.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/dropLastWhile.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/dropWhile.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/endsWith.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/entries.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/evolve.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/filter.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/find.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/findIndex.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/findLast.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/findLastIndex.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/first.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/firstBy.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/flat.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/flatMap.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/floor.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/forEach.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/forEachObj.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/fromEntries.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/fromKeys.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/funnel.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/groupBy.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/groupByProp.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/hasAtLeast.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/hasSubObject.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/heap-C8XIujMa.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/identity.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/index.js +1 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/indexBy.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/intersection.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/intersectionWith.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/invert.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/isArray.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/isBigInt.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/isBoolean.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/isDate.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/isDeepEqual.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/isDefined.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/isEmpty.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/isEmptyish.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/isError.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/isFunction.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/isIncludedIn.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/isNonNull.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/isNonNullish.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/isNot.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/isNullish.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/isNumber.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/isObjectType.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/isPlainObject.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/isPromise.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/isShallowEqual.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/isStrictEqual.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/isString.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/isSymbol.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/isTruthy.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/join.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/keys.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/last.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/lazyDataLastImpl-DtF3cihj.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/length.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/map.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/mapKeys.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/mapToObj.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/mapValues.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/mapWithFeedback.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/mean.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/meanBy.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/median.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/merge.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/mergeAll.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/mergeDeep.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/multiply.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/nthBy-DCn3SK1l.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/objOf.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/omit.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/omitBy.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/once.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/only.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/partialBind.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/partialLastBind.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/partition.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/pathOr.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/pick.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/pickBy.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/pipe.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/piped.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/product.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/prop.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/pullObject.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/purry.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/purryFromLazy-DELFL6Wm.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/purryOrderRules-BaB5mcHH.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/randomBigInt.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/randomInteger.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/randomString.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/range.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/rankBy.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/reduce.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/reverse.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/round.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/sample.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/set.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/setPath.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/shuffle.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/sliceString.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/sort.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/sortBy.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/sortedIndex.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/sortedIndexBy.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/sortedIndexWith.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/sortedLastIndex.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/sortedLastIndexBy.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/splice.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/split.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/splitAt.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/splitWhen.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/startsWith.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/stringToPath.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/subtract.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/sum.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/sumBy.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/swapInPlace-Bb1dcddf.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/swapIndices.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/swapProps.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/take.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/takeFirstBy.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/takeLast.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/takeLastWhile.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/takeWhile.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/tap.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/times.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/toCamelCase.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/toKebabCase.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/toLowerCase.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/toSingle-1Si1O88f.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/toSnakeCase.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/toTitleCase.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/toUpperCase.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/truncate.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/uncapitalize.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/unique.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/uniqueBy.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/uniqueWith.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/utilityEvaluators-Cb8x6-JZ.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/values.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/when.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/withPrecision-7nvi8hnb.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/words-OcG39_Hp.js +3 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/zip.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/zipWith.js +2 -0
- package/.output/server/node_modules/.nitro/remeda@2.33.7/package.json +90 -0
- package/.output/server/node_modules/.nitro/{ws@8.19.0 → ws@8.20.0}/lib/permessage-deflate.js +6 -6
- package/.output/server/node_modules/.nitro/{ws@8.19.0 → ws@8.20.0}/lib/websocket-server.js +5 -5
- package/.output/server/node_modules/.nitro/{ws@8.19.0 → ws@8.20.0}/lib/websocket.js +6 -6
- package/.output/server/node_modules/.nitro/{ws@8.19.0 → ws@8.20.0}/package.json +4 -3
- package/.output/server/node_modules/.nitro/ws@8.20.0/wrapper.mjs +21 -0
- package/.output/server/node_modules/@kubb/fabric-core/dist/{chunk-BVHe6Par.js → chunk-O_arW02_.js} +6 -11
- package/.output/server/node_modules/@kubb/fabric-core/dist/{defaultParser-BD_N68Bo.js → defaultParser-iCpMSYCp.js} +4 -5
- package/.output/server/node_modules/@kubb/fabric-core/dist/{getRelativePath-C4Au07ON.js → getRelativePath-NAm_Y-vp.js} +3 -6
- package/.output/server/node_modules/@kubb/fabric-core/dist/index.js +71 -89
- package/.output/server/node_modules/@kubb/fabric-core/dist/{onProcessExit-CnZym153.js → onProcessExit-Cput7j2c.js} +124 -138
- package/.output/server/node_modules/@kubb/fabric-core/dist/parsers/typescript.js +3 -4
- package/.output/server/node_modules/@kubb/fabric-core/dist/parsers.js +4 -5
- package/.output/server/node_modules/@kubb/fabric-core/dist/plugins.js +6 -12
- package/.output/server/node_modules/@kubb/fabric-core/package.json +2 -2
- package/.output/server/node_modules/@kubb/react-fabric/dist/{chunk-DbZtQ4qb.js → chunk-BGCRLu6H.js} +12 -21
- package/.output/server/node_modules/@kubb/react-fabric/dist/index.js +33 -35
- package/.output/server/node_modules/@kubb/react-fabric/dist/{react-C2cYsofv.js → jsx-runtime-Bl0DfUmV.js} +262 -7
- package/.output/server/node_modules/@kubb/react-fabric/dist/jsx-runtime.js +3 -5
- package/.output/server/node_modules/@kubb/react-fabric/dist/parsers.js +2 -3
- package/.output/server/node_modules/@kubb/react-fabric/dist/plugins.js +4 -7
- package/.output/server/node_modules/@kubb/react-fabric/dist/{reactPlugin-DGKBWjiR.js → reactPlugin-QQPrjNuQ.js} +13 -28
- package/.output/server/node_modules/@kubb/react-fabric/package.json +7 -2
- package/.output/server/node_modules/@redocly/config/lib/default-theme-config-schema.js +1 -0
- package/.output/server/node_modules/@redocly/config/lib/ex-theme-config-schemas.js +5 -1
- package/.output/server/node_modules/@redocly/config/lib/root-config-schema.js +24 -4
- package/.output/server/node_modules/@redocly/config/package.json +2 -2
- package/.output/server/node_modules/@redocly/openapi-core/lib/bundle/bundle-visitor.js +1 -1
- package/.output/server/node_modules/@redocly/openapi-core/lib/bundle/bundle.js +2 -2
- package/.output/server/node_modules/@redocly/openapi-core/lib/config/all.js +5 -0
- package/.output/server/node_modules/@redocly/openapi-core/lib/config/bundle-extends.js +1 -0
- package/.output/server/node_modules/@redocly/openapi-core/lib/config/config-resolvers.js +14 -5
- package/.output/server/node_modules/@redocly/openapi-core/lib/config/minimal.js +5 -0
- package/.output/server/node_modules/@redocly/openapi-core/lib/config/recommended-strict.js +5 -0
- package/.output/server/node_modules/@redocly/openapi-core/lib/config/recommended.js +5 -0
- package/.output/server/node_modules/@redocly/openapi-core/lib/config/spec.js +5 -0
- package/.output/server/node_modules/@redocly/openapi-core/lib/index.js +1 -0
- package/.output/server/node_modules/@redocly/openapi-core/lib/lint.js +1 -1
- package/.output/server/node_modules/@redocly/openapi-core/lib/ref-utils.js +7 -6
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/arazzo/index.js +2 -0
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/async2/index.js +2 -0
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/async3/index.js +2 -0
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/common/no-mixed-number-range-constraints.js +19 -0
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/oas3/index.js +2 -0
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/oas3/spec-discriminator-defaultMapping.js +39 -18
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/utils.js +10 -1
- package/.output/server/node_modules/@redocly/openapi-core/lib/types/json-schema-draft7.shared.js +1 -1
- package/.output/server/node_modules/@redocly/openapi-core/lib/types/oas2.js +1 -1
- package/.output/server/node_modules/@redocly/openapi-core/lib/types/oas3.js +1 -1
- package/.output/server/node_modules/@redocly/openapi-core/lib/types/oas3_2.js +9 -3
- package/.output/server/node_modules/@redocly/openapi-core/lib/types/redocly-yaml.js +4 -0
- package/.output/server/node_modules/@redocly/openapi-core/package.json +3 -3
- package/.output/server/node_modules/handlebars/dist/cjs/handlebars/base.js +2 -2
- package/.output/server/node_modules/handlebars/dist/cjs/handlebars/compiler/base.js +60 -1
- package/.output/server/node_modules/handlebars/dist/cjs/handlebars/compiler/javascript-compiler.js +25 -17
- package/.output/server/node_modules/handlebars/dist/cjs/handlebars/compiler/parser.js +2 -2
- package/.output/server/node_modules/handlebars/dist/cjs/handlebars/helpers.js +3 -2
- package/.output/server/node_modules/handlebars/dist/cjs/handlebars/internal/proto-access.js +17 -12
- package/.output/server/node_modules/handlebars/dist/cjs/handlebars/runtime.js +25 -18
- package/.output/server/node_modules/handlebars/package.json +5 -6
- package/.output/server/node_modules/oas-normalize/package.json +4 -4
- package/.output/server/package.json +11 -11
- package/package.json +22 -22
- package/.output/server/node_modules/.nitro/ws@8.19.0/wrapper.mjs +0 -8
- package/.output/server/node_modules/@kubb/react-fabric/dist/jsx-runtime-CZxrhUx8.js +0 -266
- package/.output/server/node_modules/handlebars/dist/cjs/handlebars/internal/create-new-lookup-object.js +0 -22
- /package/.output/server/node_modules/{@readme/openapi-parser → .nitro/@readme/openapi-parser@6.0.0}/dist/chunk-IYQ77VVR.js +0 -0
- /package/.output/server/node_modules/{@readme/openapi-parser → .nitro/@readme/openapi-parser@6.0.0}/dist/index.js +0 -0
- /package/.output/server/node_modules/{@readme/openapi-parser → .nitro/@readme/openapi-parser@6.0.0}/dist/lib/assertions.js +0 -0
- /package/.output/server/node_modules/{@readme/openapi-parser → .nitro/@readme/openapi-parser@6.0.0}/package.json +0 -0
- /package/.output/server/node_modules/.nitro/{picomatch@4.0.3 → picomatch@4.0.4}/index.js +0 -0
- /package/.output/server/node_modules/.nitro/{picomatch@4.0.3 → picomatch@4.0.4}/lib/scan.js +0 -0
- /package/.output/server/node_modules/.nitro/{picomatch@4.0.3 → picomatch@4.0.4}/lib/utils.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/add.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/addProp.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/allPass.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/anyPass.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/binarySearchCutoffIndex-CLQRwIY1.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/capitalize.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/ceil.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/chunk.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/clamp.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/clone.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/concat.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/conditional.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/constant.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/countBy.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/debounce.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/defaultTo.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/difference.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/differenceWith.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/divide.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/doNothing.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/drop.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/dropFirstBy.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/dropLast.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/dropLastWhile.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/dropWhile.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/endsWith.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/entries.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/evolve.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/filter.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/find.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/findIndex.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/findLast.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/findLastIndex.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/first.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/firstBy.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/flat.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/flatMap.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/floor.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/forEach.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/forEachObj.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/fromEntries.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/fromKeys.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/funnel.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/groupBy.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/groupByProp.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/hasAtLeast.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/hasSubObject.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/heap-OOe_F8_z.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/identity.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/index.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/indexBy.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/intersection.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/intersectionWith.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/invert.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/isArray.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/isBigInt.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/isBoolean.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/isDate.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/isDeepEqual.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/isDefined.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/isEmpty.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/isEmptyish.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/isError.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/isFunction.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/isIncludedIn.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/isNonNull.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/isNonNullish.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/isNot.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/isNullish.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/isNumber.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/isObjectType.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/isPlainObject.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/isPromise.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/isShallowEqual.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/isStrictEqual.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/isString.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/isSymbol.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/isTruthy.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/join.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/keys.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/last.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/lazyDataLastImpl-DtF3cihj.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/length.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/map.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/mapKeys.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/mapToObj.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/mapValues.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/mapWithFeedback.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/mean.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/meanBy.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/median.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/merge.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/mergeAll.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/mergeDeep.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/multiply.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/nthBy.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/objOf.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/omit.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/omitBy.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/once.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/only.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/partialBind.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/partialLastBind.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/partition.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/pathOr.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/pick.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/pickBy.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/pipe.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/piped.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/product.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/prop.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/pullObject.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/purry.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/purryFromLazy-B-_oTxzb.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/purryOn-D4wFIFMT.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/purryOrderRules-4JgY6z4X.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/quickSelect-B4eZ0JeB.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/randomBigInt.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/randomInteger.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/randomString.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/range.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/rankBy.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/reduce.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/reverse.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/round.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/sample.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/set.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/setPath.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/shuffle.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/sliceString.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/sort.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/sortBy.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/sortedIndex.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/sortedIndexBy.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/sortedIndexWith.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/sortedLastIndex.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/sortedLastIndexBy.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/splice.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/split.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/splitAt.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/splitWhen.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/startsWith.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/stringToPath.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/subtract.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/sum.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/sumBy.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/swapInPlace-BrVgf3c3.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/swapIndices.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/swapProps.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/take.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/takeFirstBy.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/takeLast.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/takeLastWhile.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/takeWhile.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/tap.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/times.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/toCamelCase.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/toKebabCase.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/toLowerCase.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/toSingle-qs9PC5sP.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/toSnakeCase.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/toTitleCase.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/toUpperCase.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/truncate.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/uncapitalize.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/unique.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/uniqueBy.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/uniqueWith.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/utilityEvaluators-BQqW5Ir5.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/values.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/when.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/withPrecision-CDZ-Oor7.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/words-Dv8LmnKC.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/zip.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/zipWith.js +0 -0
- /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/package.json +0 -0
- /package/.output/server/node_modules/.nitro/{ws@8.19.0 → ws@8.20.0}/lib/buffer-util.js +0 -0
- /package/.output/server/node_modules/.nitro/{ws@8.19.0 → ws@8.20.0}/lib/constants.js +0 -0
- /package/.output/server/node_modules/.nitro/{ws@8.19.0 → ws@8.20.0}/lib/event-target.js +0 -0
- /package/.output/server/node_modules/.nitro/{ws@8.19.0 → ws@8.20.0}/lib/extension.js +0 -0
- /package/.output/server/node_modules/.nitro/{ws@8.19.0 → ws@8.20.0}/lib/limiter.js +0 -0
- /package/.output/server/node_modules/.nitro/{ws@8.19.0 → ws@8.20.0}/lib/receiver.js +0 -0
- /package/.output/server/node_modules/.nitro/{ws@8.19.0 → ws@8.20.0}/lib/sender.js +0 -0
- /package/.output/server/node_modules/.nitro/{ws@8.19.0 → ws@8.20.0}/lib/stream.js +0 -0
- /package/.output/server/node_modules/.nitro/{ws@8.19.0 → ws@8.20.0}/lib/subprotocol.js +0 -0
- /package/.output/server/node_modules/.nitro/{ws@8.19.0 → ws@8.20.0}/lib/validation.js +0 -0
|
@@ -0,0 +1,923 @@
|
|
|
1
|
+
import {
|
|
2
|
+
isOpenAPI,
|
|
3
|
+
isOpenAPI30,
|
|
4
|
+
isOpenAPI31,
|
|
5
|
+
isOpenAPI32,
|
|
6
|
+
isSwagger
|
|
7
|
+
} from "./chunk-IYQ77VVR.js";
|
|
8
|
+
|
|
9
|
+
// src/index.ts
|
|
10
|
+
import { $RefParser, dereferenceInternal, MissingPointerError } from "@apidevtools/json-schema-ref-parser";
|
|
11
|
+
|
|
12
|
+
// src/util.ts
|
|
13
|
+
import { getJsonSchemaRefParserDefaultOptions } from "@apidevtools/json-schema-ref-parser";
|
|
14
|
+
|
|
15
|
+
// src/lib/index.ts
|
|
16
|
+
var pathParameterTemplateRegExp = /\{([^/}]+)}/g;
|
|
17
|
+
var supportedHTTPMethods = ["get", "post", "put", "delete", "patch", "options", "head", "trace"];
|
|
18
|
+
var swaggerHTTPMethods = ["get", "put", "post", "delete", "options", "head", "patch"];
|
|
19
|
+
function getSpecificationName(api) {
|
|
20
|
+
return isSwagger(api) ? "Swagger" : "OpenAPI";
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
// src/repair.ts
|
|
24
|
+
function fixServers(server, path) {
|
|
25
|
+
if (server && "url" in server && server.url && server.url.startsWith("/")) {
|
|
26
|
+
try {
|
|
27
|
+
const inUrl = new URL(path);
|
|
28
|
+
server.url = `${inUrl.protocol}//${inUrl.hostname}${server.url}`;
|
|
29
|
+
} catch {
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
function fixOasRelativeServers(schema, filePath) {
|
|
34
|
+
if (!schema || !isOpenAPI(schema) || !filePath || !filePath.startsWith("http:") && !filePath.startsWith("https:")) {
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
if (schema.servers) {
|
|
38
|
+
schema.servers.map((server) => fixServers(server, filePath));
|
|
39
|
+
}
|
|
40
|
+
["paths", "webhooks"].forEach((component) => {
|
|
41
|
+
if (component in schema) {
|
|
42
|
+
const schemaElement = schema.paths || {};
|
|
43
|
+
Object.keys(schemaElement).forEach((path) => {
|
|
44
|
+
const pathItem = schemaElement[path] || {};
|
|
45
|
+
Object.keys(pathItem).forEach((opItem) => {
|
|
46
|
+
const pathItemElement = pathItem[opItem];
|
|
47
|
+
if (!pathItemElement) {
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
if (opItem === "servers" && Array.isArray(pathItemElement)) {
|
|
51
|
+
pathItemElement.forEach((server) => {
|
|
52
|
+
fixServers(server, filePath);
|
|
53
|
+
});
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
if (supportedHTTPMethods.includes(opItem) && typeof pathItemElement === "object" && "servers" in pathItemElement && Array.isArray(pathItemElement.servers)) {
|
|
57
|
+
pathItemElement.servers.forEach((server) => {
|
|
58
|
+
fixServers(server, filePath);
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
// src/util.ts
|
|
68
|
+
function repairSchema(schema, filePath) {
|
|
69
|
+
if (isOpenAPI(schema)) {
|
|
70
|
+
fixOasRelativeServers(schema, filePath);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
function normalizeArguments(api) {
|
|
74
|
+
return {
|
|
75
|
+
path: typeof api === "string" ? api : "",
|
|
76
|
+
schema: typeof api === "object" ? api : void 0
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
function convertOptionsForParser(options) {
|
|
80
|
+
const parserOptions = getJsonSchemaRefParserDefaultOptions();
|
|
81
|
+
return {
|
|
82
|
+
...parserOptions,
|
|
83
|
+
dereference: {
|
|
84
|
+
...parserOptions.dereference,
|
|
85
|
+
circular: options?.dereference && "circular" in options.dereference ? options.dereference.circular : parserOptions.dereference.circular,
|
|
86
|
+
onCircular: options?.dereference?.onCircular || parserOptions.dereference.onCircular,
|
|
87
|
+
onDereference: options?.dereference?.onDereference || parserOptions.dereference.onDereference,
|
|
88
|
+
// OpenAPI 3.1 allows for `summary` and `description` properties at the same level as a `$ref`
|
|
89
|
+
// pointer to be preserved when that `$ref` pointer is dereferenced. The default behavior of
|
|
90
|
+
// `json-schema-ref-parser` is to discard these properties but this option allows us to
|
|
91
|
+
// override that behavior.
|
|
92
|
+
preservedProperties: ["summary", "description"]
|
|
93
|
+
},
|
|
94
|
+
resolve: {
|
|
95
|
+
...parserOptions.resolve,
|
|
96
|
+
external: options?.resolve && "external" in options.resolve ? options.resolve.external : parserOptions.resolve.external,
|
|
97
|
+
file: options?.resolve && "file" in options.resolve ? options.resolve.file : parserOptions.resolve.file,
|
|
98
|
+
http: {
|
|
99
|
+
...typeof parserOptions.resolve.http === "object" ? parserOptions.resolve.http : {},
|
|
100
|
+
timeout: options?.resolve?.http && "timeout" in options.resolve.http ? options.resolve.http.timeout : 5e3
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
timeoutMs: options?.timeoutMs
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
// src/validators/schema.ts
|
|
108
|
+
import betterAjvErrors from "@readme/better-ajv-errors";
|
|
109
|
+
import { openapi } from "@readme/openapi-schemas";
|
|
110
|
+
import Ajv from "ajv/dist/2020.js";
|
|
111
|
+
import AjvDraft4 from "ajv-draft-04";
|
|
112
|
+
|
|
113
|
+
// src/lib/hasInvalidPaths.ts
|
|
114
|
+
function hasInvalidPaths(api) {
|
|
115
|
+
if (!api.paths || typeof api.paths !== "object" || Array.isArray(api.paths)) {
|
|
116
|
+
return false;
|
|
117
|
+
}
|
|
118
|
+
return Object.keys(api.paths).some((path) => !path.startsWith("/"));
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
// src/lib/reduceAjvErrors.ts
|
|
122
|
+
function reduceAjvErrors(errors) {
|
|
123
|
+
const flattened = /* @__PURE__ */ new Map();
|
|
124
|
+
errors.forEach((err) => {
|
|
125
|
+
if (["must have required property '$ref'", "must match exactly one schema in oneOf"].includes(err.message)) {
|
|
126
|
+
return;
|
|
127
|
+
}
|
|
128
|
+
if (!flattened.size) {
|
|
129
|
+
flattened.set(err.instancePath, err);
|
|
130
|
+
return;
|
|
131
|
+
} else if (flattened.has(err.instancePath)) {
|
|
132
|
+
return;
|
|
133
|
+
}
|
|
134
|
+
let shouldRecordError = true;
|
|
135
|
+
flattened.forEach((flat) => {
|
|
136
|
+
if (flat.instancePath.includes(err.instancePath)) {
|
|
137
|
+
shouldRecordError = false;
|
|
138
|
+
}
|
|
139
|
+
});
|
|
140
|
+
if (shouldRecordError) {
|
|
141
|
+
flattened.set(err.instancePath, err);
|
|
142
|
+
}
|
|
143
|
+
});
|
|
144
|
+
if (!flattened.size) {
|
|
145
|
+
return errors;
|
|
146
|
+
}
|
|
147
|
+
return [...flattened.values()];
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
// src/validators/schema.ts
|
|
151
|
+
var LARGE_SPEC_ERROR_CAP = 20;
|
|
152
|
+
var LARGE_SPEC_SIZE_CAP = 5e6;
|
|
153
|
+
function initializeAjv(draft04 = true) {
|
|
154
|
+
const opts = {
|
|
155
|
+
allErrors: true,
|
|
156
|
+
strict: false,
|
|
157
|
+
validateFormats: false
|
|
158
|
+
};
|
|
159
|
+
if (draft04) {
|
|
160
|
+
return new AjvDraft4(opts);
|
|
161
|
+
}
|
|
162
|
+
return new Ajv(opts);
|
|
163
|
+
}
|
|
164
|
+
function validateSchema(api, options = {}) {
|
|
165
|
+
if (hasInvalidPaths(api)) {
|
|
166
|
+
return {
|
|
167
|
+
valid: false,
|
|
168
|
+
errors: [
|
|
169
|
+
{
|
|
170
|
+
message: getSpecificationName(api) === "Swagger" ? "Entries in the Swagger `paths` object must begin with a leading slash." : "Entries in the OpenAPI `paths` object must begin with a leading slash."
|
|
171
|
+
}
|
|
172
|
+
],
|
|
173
|
+
warnings: [],
|
|
174
|
+
additionalErrors: 0,
|
|
175
|
+
specification: getSpecificationName(api)
|
|
176
|
+
};
|
|
177
|
+
}
|
|
178
|
+
let ajv;
|
|
179
|
+
let schema;
|
|
180
|
+
const specificationName = getSpecificationName(api);
|
|
181
|
+
if (isSwagger(api)) {
|
|
182
|
+
schema = openapi.v2;
|
|
183
|
+
ajv = initializeAjv();
|
|
184
|
+
} else if (isOpenAPI32(api)) {
|
|
185
|
+
throw new TypeError("OpenAPI 3.2 is currently unsupported.");
|
|
186
|
+
} else if (isOpenAPI31(api)) {
|
|
187
|
+
schema = openapi.v31legacy;
|
|
188
|
+
const schemaDynamicRef = schema.$defs.schema;
|
|
189
|
+
if ("$dynamicAnchor" in schemaDynamicRef) {
|
|
190
|
+
delete schemaDynamicRef.$dynamicAnchor;
|
|
191
|
+
}
|
|
192
|
+
schema.$defs.components.properties.schemas.additionalProperties = schemaDynamicRef;
|
|
193
|
+
schema.$defs.header.dependentSchemas.schema.properties.schema = schemaDynamicRef;
|
|
194
|
+
schema.$defs["media-type"].properties.schema = schemaDynamicRef;
|
|
195
|
+
schema.$defs.parameter.properties.schema = schemaDynamicRef;
|
|
196
|
+
ajv = initializeAjv(false);
|
|
197
|
+
} else {
|
|
198
|
+
schema = openapi.v3;
|
|
199
|
+
ajv = initializeAjv();
|
|
200
|
+
}
|
|
201
|
+
const isValid = ajv.validate(schema, api);
|
|
202
|
+
if (isValid) {
|
|
203
|
+
return { valid: true, warnings: [], specification: specificationName };
|
|
204
|
+
}
|
|
205
|
+
let additionalErrors = 0;
|
|
206
|
+
let reducedErrors = reduceAjvErrors(ajv.errors);
|
|
207
|
+
if (reducedErrors.length >= LARGE_SPEC_ERROR_CAP) {
|
|
208
|
+
try {
|
|
209
|
+
if (JSON.stringify(api).length >= LARGE_SPEC_SIZE_CAP) {
|
|
210
|
+
additionalErrors = reducedErrors.length - 20;
|
|
211
|
+
reducedErrors = reducedErrors.slice(0, 20);
|
|
212
|
+
}
|
|
213
|
+
} catch {
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
try {
|
|
217
|
+
const errors = betterAjvErrors(schema, api, reducedErrors, {
|
|
218
|
+
format: "cli-array",
|
|
219
|
+
colorize: options?.validate?.errors?.colorize || false,
|
|
220
|
+
indent: 2
|
|
221
|
+
});
|
|
222
|
+
return {
|
|
223
|
+
valid: false,
|
|
224
|
+
errors,
|
|
225
|
+
warnings: [],
|
|
226
|
+
additionalErrors,
|
|
227
|
+
specification: specificationName
|
|
228
|
+
};
|
|
229
|
+
} catch (err) {
|
|
230
|
+
return {
|
|
231
|
+
valid: false,
|
|
232
|
+
errors: [{ message: err.message }],
|
|
233
|
+
warnings: [],
|
|
234
|
+
additionalErrors,
|
|
235
|
+
specification: specificationName
|
|
236
|
+
};
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
// src/validators/spec/index.ts
|
|
241
|
+
var SpecificationValidator = class {
|
|
242
|
+
errors = [];
|
|
243
|
+
warnings = [];
|
|
244
|
+
reportError(message) {
|
|
245
|
+
this.errors.push({ message });
|
|
246
|
+
}
|
|
247
|
+
reportWarning(message) {
|
|
248
|
+
this.warnings.push({ message });
|
|
249
|
+
}
|
|
250
|
+
};
|
|
251
|
+
|
|
252
|
+
// src/validators/spec/openapi.ts
|
|
253
|
+
var OpenAPISpecificationValidator = class extends SpecificationValidator {
|
|
254
|
+
api;
|
|
255
|
+
rules;
|
|
256
|
+
constructor(api, rules) {
|
|
257
|
+
super();
|
|
258
|
+
this.api = api;
|
|
259
|
+
this.rules = rules;
|
|
260
|
+
}
|
|
261
|
+
run() {
|
|
262
|
+
const operationIds = [];
|
|
263
|
+
Object.keys(this.api.paths || {}).forEach((pathName) => {
|
|
264
|
+
const path = this.api.paths[pathName];
|
|
265
|
+
const pathId = `/paths${pathName}`;
|
|
266
|
+
if (path && pathName.startsWith("/")) {
|
|
267
|
+
this.validatePath(path, pathId, operationIds);
|
|
268
|
+
}
|
|
269
|
+
});
|
|
270
|
+
if (isOpenAPI30(this.api)) {
|
|
271
|
+
if (this.api.components) {
|
|
272
|
+
Object.keys(this.api.components).forEach((componentType) => {
|
|
273
|
+
Object.keys(this.api.components[componentType]).forEach((componentName) => {
|
|
274
|
+
if (!/^[a-zA-Z0-9.\-_]+$/.test(componentName)) {
|
|
275
|
+
const componentId = `/components/${componentType}/${componentName}`;
|
|
276
|
+
this.reportError(
|
|
277
|
+
`\`${componentId}\` has an invalid name. Component names should match against: /^[a-zA-Z0-9.-_]+$/`
|
|
278
|
+
);
|
|
279
|
+
}
|
|
280
|
+
});
|
|
281
|
+
});
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
if (isOpenAPI31(this.api)) {
|
|
285
|
+
if (!Object.keys(this.api.paths || {}).length && !Object.keys(this.api.webhooks || {}).length && !Object.keys(this.api.components || {}).length) {
|
|
286
|
+
this.reportError(
|
|
287
|
+
"OpenAPI 3.1 definitions must contain at least one entry in either `paths`, `webhooks`, or `components`."
|
|
288
|
+
);
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
/**
|
|
293
|
+
* Validates the given path.
|
|
294
|
+
*
|
|
295
|
+
*/
|
|
296
|
+
validatePath(path, pathId, operationIds) {
|
|
297
|
+
supportedHTTPMethods.forEach((operationName) => {
|
|
298
|
+
const operation = path[operationName];
|
|
299
|
+
const operationId = `${pathId}/${operationName}`;
|
|
300
|
+
if (operation) {
|
|
301
|
+
const declaredOperationId = operation.operationId;
|
|
302
|
+
if (declaredOperationId) {
|
|
303
|
+
if (!operationIds.includes(declaredOperationId)) {
|
|
304
|
+
operationIds.push(declaredOperationId);
|
|
305
|
+
} else if (this.rules["duplicate-operation-id"] === "warning") {
|
|
306
|
+
this.reportWarning(`The operationId \`${declaredOperationId}\` is duplicated and should be made unique.`);
|
|
307
|
+
} else {
|
|
308
|
+
this.reportError(`The operationId \`${declaredOperationId}\` is duplicated and must be made unique.`);
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
this.validateParameters(path, pathId, operation, operationId);
|
|
312
|
+
Object.keys(operation.responses || {}).forEach((responseCode) => {
|
|
313
|
+
const response = operation.responses[responseCode];
|
|
314
|
+
const responseId = `${operationId}/responses/${responseCode}`;
|
|
315
|
+
if (response && !("$ref" in response)) {
|
|
316
|
+
this.validateResponse(response, responseId);
|
|
317
|
+
}
|
|
318
|
+
});
|
|
319
|
+
}
|
|
320
|
+
});
|
|
321
|
+
}
|
|
322
|
+
/**
|
|
323
|
+
* Validates the parameters for the given operation.
|
|
324
|
+
*
|
|
325
|
+
*/
|
|
326
|
+
validateParameters(path, pathId, operation, operationId) {
|
|
327
|
+
const pathParams = path.parameters || [];
|
|
328
|
+
const operationParams = operation.parameters || [];
|
|
329
|
+
this.checkForDuplicates(pathParams, pathId);
|
|
330
|
+
this.checkForDuplicates(operationParams, operationId);
|
|
331
|
+
const params = pathParams.reduce((combinedParams, value) => {
|
|
332
|
+
const duplicate = combinedParams.some((param) => {
|
|
333
|
+
if ("$ref" in param || "$ref" in value) {
|
|
334
|
+
return false;
|
|
335
|
+
}
|
|
336
|
+
return param.in === value.in && param.name === value.name;
|
|
337
|
+
});
|
|
338
|
+
if (!duplicate) {
|
|
339
|
+
combinedParams.push(value);
|
|
340
|
+
}
|
|
341
|
+
return combinedParams;
|
|
342
|
+
}, operationParams.slice());
|
|
343
|
+
this.validatePathParameters(params, pathId, operationId);
|
|
344
|
+
this.validateParameterTypes(params, operationId);
|
|
345
|
+
}
|
|
346
|
+
/**
|
|
347
|
+
* Validates path parameters for the given path.
|
|
348
|
+
*
|
|
349
|
+
*/
|
|
350
|
+
validatePathParameters(params, pathId, operationId) {
|
|
351
|
+
const placeholders = [...new Set(pathId.match(pathParameterTemplateRegExp) || [])];
|
|
352
|
+
params.filter((param) => "in" in param).filter((param) => param.in === "path").forEach((param) => {
|
|
353
|
+
if (param.required !== true) {
|
|
354
|
+
if (this.rules["non-optional-path-parameters"] === "warning") {
|
|
355
|
+
this.reportWarning(
|
|
356
|
+
`Path parameters should not be optional. Set \`required=true\` for the \`${param.name}\` parameter at \`${operationId}\`.`
|
|
357
|
+
);
|
|
358
|
+
} else {
|
|
359
|
+
this.reportError(
|
|
360
|
+
`Path parameters cannot be optional. Set \`required=true\` for the \`${param.name}\` parameter at \`${operationId}\`.`
|
|
361
|
+
);
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
const match = placeholders.indexOf(`{${param.name}}`);
|
|
365
|
+
if (match === -1) {
|
|
366
|
+
const error = `\`${operationId}\` has a path parameter named \`${param.name}\`, but there is no corresponding \`{${param.name}}\` in the path string.`;
|
|
367
|
+
if (this.rules["path-parameters-not-in-path"] === "warning") {
|
|
368
|
+
this.reportWarning(error);
|
|
369
|
+
} else {
|
|
370
|
+
this.reportError(error);
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
placeholders.splice(match, 1);
|
|
374
|
+
});
|
|
375
|
+
if (placeholders.length > 0) {
|
|
376
|
+
const list = new Intl.ListFormat("en", { style: "long", type: "conjunction" }).format(
|
|
377
|
+
placeholders.map((placeholder) => `\`${placeholder}\``)
|
|
378
|
+
);
|
|
379
|
+
const error = `\`${operationId}\` is missing path parameter(s) for ${list}.`;
|
|
380
|
+
if (this.rules["path-parameters-not-in-parameters"] === "warning") {
|
|
381
|
+
this.reportWarning(error);
|
|
382
|
+
} else {
|
|
383
|
+
this.reportError(error);
|
|
384
|
+
}
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
/**
|
|
388
|
+
* Validates data types of parameters for the given operation.
|
|
389
|
+
*
|
|
390
|
+
*/
|
|
391
|
+
validateParameterTypes(params, operationId) {
|
|
392
|
+
params.forEach((param) => {
|
|
393
|
+
if ("$ref" in param) {
|
|
394
|
+
return;
|
|
395
|
+
}
|
|
396
|
+
const parameterId = `${operationId}/parameters/${param.name}`;
|
|
397
|
+
if (!param.schema && param.content) {
|
|
398
|
+
this.validateParameterContent(param.content, parameterId);
|
|
399
|
+
return;
|
|
400
|
+
} else if ("$ref" in param.schema) {
|
|
401
|
+
return;
|
|
402
|
+
}
|
|
403
|
+
this.validateSchema(param.schema, parameterId);
|
|
404
|
+
});
|
|
405
|
+
}
|
|
406
|
+
/**
|
|
407
|
+
* Validates parameter content object.
|
|
408
|
+
* Note: The requirement for exactly one media type is already enforced by the OpenAPI JSON schema.
|
|
409
|
+
*/
|
|
410
|
+
validateParameterContent(content, parameterId) {
|
|
411
|
+
const mediaTypes = Object.keys(content);
|
|
412
|
+
if (mediaTypes.length !== 1) {
|
|
413
|
+
this.reportError(
|
|
414
|
+
`\`${parameterId}\` must have exactly one media type in \`content\`, but found ${mediaTypes.length}.`
|
|
415
|
+
);
|
|
416
|
+
return;
|
|
417
|
+
}
|
|
418
|
+
const mediaType = mediaTypes[0];
|
|
419
|
+
const contentSchema = content[mediaType].schema;
|
|
420
|
+
if (contentSchema) {
|
|
421
|
+
if ("$ref" in contentSchema) {
|
|
422
|
+
return;
|
|
423
|
+
}
|
|
424
|
+
this.validateSchema(contentSchema, `${parameterId}/content/${mediaType}/schema`);
|
|
425
|
+
}
|
|
426
|
+
}
|
|
427
|
+
/**
|
|
428
|
+
* Validates the given response object.
|
|
429
|
+
*
|
|
430
|
+
*/
|
|
431
|
+
validateResponse(response, responseId) {
|
|
432
|
+
Object.keys(response.headers || {}).forEach((headerName) => {
|
|
433
|
+
const header = response.headers[headerName];
|
|
434
|
+
const headerId = `${responseId}/headers/${headerName}`;
|
|
435
|
+
if ("$ref" in header) {
|
|
436
|
+
return;
|
|
437
|
+
}
|
|
438
|
+
if (header.schema) {
|
|
439
|
+
if (!("$ref" in header.schema)) {
|
|
440
|
+
this.validateSchema(header.schema, headerId);
|
|
441
|
+
}
|
|
442
|
+
} else if (header.content) {
|
|
443
|
+
Object.keys(header.content).forEach((mediaType) => {
|
|
444
|
+
if (header.content[mediaType].schema) {
|
|
445
|
+
if (!("$ref" in header.content[mediaType].schema)) {
|
|
446
|
+
this.validateSchema(header.content[mediaType].schema || {}, `${headerId}/content/${mediaType}/schema`);
|
|
447
|
+
}
|
|
448
|
+
}
|
|
449
|
+
});
|
|
450
|
+
}
|
|
451
|
+
});
|
|
452
|
+
if (response.content) {
|
|
453
|
+
Object.keys(response.content).forEach((mediaType) => {
|
|
454
|
+
if (response.content[mediaType].schema) {
|
|
455
|
+
if (!("$ref" in response.content[mediaType].schema)) {
|
|
456
|
+
this.validateSchema(response.content[mediaType].schema || {}, `${responseId}/content/${mediaType}/schema`);
|
|
457
|
+
}
|
|
458
|
+
}
|
|
459
|
+
});
|
|
460
|
+
}
|
|
461
|
+
}
|
|
462
|
+
/**
|
|
463
|
+
* Validates the given Swagger schema object.
|
|
464
|
+
*
|
|
465
|
+
*/
|
|
466
|
+
validateSchema(schema, schemaId) {
|
|
467
|
+
if (schema.type === "array" && !schema.items) {
|
|
468
|
+
if (this.rules["array-without-items"] === "warning") {
|
|
469
|
+
this.reportWarning(`\`${schemaId}\` is an array, so it should include an \`items\` schema.`);
|
|
470
|
+
} else {
|
|
471
|
+
this.reportError(`\`${schemaId}\` is an array, so it must include an \`items\` schema.`);
|
|
472
|
+
}
|
|
473
|
+
}
|
|
474
|
+
}
|
|
475
|
+
/**
|
|
476
|
+
* Checks the given parameter list for duplicates.
|
|
477
|
+
*
|
|
478
|
+
*/
|
|
479
|
+
checkForDuplicates(params, schemaId) {
|
|
480
|
+
for (let i = 0; i < params.length - 1; i++) {
|
|
481
|
+
const outer = params[i];
|
|
482
|
+
for (let j = i + 1; j < params.length; j++) {
|
|
483
|
+
const inner = params[j];
|
|
484
|
+
if ("$ref" in outer || "$ref" in inner) {
|
|
485
|
+
continue;
|
|
486
|
+
}
|
|
487
|
+
if (outer.name === inner.name && outer.in === inner.in) {
|
|
488
|
+
const error = `Found multiple \`${outer.in}\` parameters named \`${outer.name}\` in \`${schemaId}\`.`;
|
|
489
|
+
if (this.rules["duplicate-non-request-body-parameters"] === "warning") {
|
|
490
|
+
this.reportWarning(error);
|
|
491
|
+
} else {
|
|
492
|
+
this.reportError(error);
|
|
493
|
+
}
|
|
494
|
+
}
|
|
495
|
+
}
|
|
496
|
+
}
|
|
497
|
+
}
|
|
498
|
+
};
|
|
499
|
+
|
|
500
|
+
// src/validators/spec/swagger.ts
|
|
501
|
+
var SwaggerSpecificationValidator = class extends SpecificationValidator {
|
|
502
|
+
api;
|
|
503
|
+
rules;
|
|
504
|
+
constructor(api, rules) {
|
|
505
|
+
super();
|
|
506
|
+
this.api = api;
|
|
507
|
+
this.rules = rules;
|
|
508
|
+
}
|
|
509
|
+
run() {
|
|
510
|
+
const operationIds = [];
|
|
511
|
+
Object.keys(this.api.paths || {}).forEach((pathName) => {
|
|
512
|
+
const path = this.api.paths[pathName];
|
|
513
|
+
const pathId = `/paths${pathName}`;
|
|
514
|
+
if (path && pathName.startsWith("/")) {
|
|
515
|
+
this.validatePath(path, pathId, operationIds);
|
|
516
|
+
}
|
|
517
|
+
});
|
|
518
|
+
Object.keys(this.api.definitions || {}).forEach((definitionName) => {
|
|
519
|
+
const definition = this.api.definitions[definitionName];
|
|
520
|
+
const definitionId = `/definitions/${definitionName}`;
|
|
521
|
+
if (!/^[a-zA-Z0-9.\-_]+$/.test(definitionName)) {
|
|
522
|
+
this.reportError(
|
|
523
|
+
`\`${definitionId}\` has an invalid name. Definition names should match against: /^[a-zA-Z0-9.-_]+$/`
|
|
524
|
+
);
|
|
525
|
+
}
|
|
526
|
+
this.validateRequiredPropertiesExist(definition, definitionId);
|
|
527
|
+
});
|
|
528
|
+
}
|
|
529
|
+
/**
|
|
530
|
+
* Validates the given path.
|
|
531
|
+
*
|
|
532
|
+
*/
|
|
533
|
+
validatePath(path, pathId, operationIds) {
|
|
534
|
+
swaggerHTTPMethods.forEach((operationName) => {
|
|
535
|
+
const operation = path[operationName];
|
|
536
|
+
const operationId = `${pathId}/${operationName}`;
|
|
537
|
+
if (operation) {
|
|
538
|
+
const declaredOperationId = operation.operationId;
|
|
539
|
+
if (declaredOperationId) {
|
|
540
|
+
if (!operationIds.includes(declaredOperationId)) {
|
|
541
|
+
operationIds.push(declaredOperationId);
|
|
542
|
+
} else if (this.rules["duplicate-operation-id"] === "warning") {
|
|
543
|
+
this.reportWarning(`The operationId \`${declaredOperationId}\` is duplicated and should be made unique.`);
|
|
544
|
+
} else {
|
|
545
|
+
this.reportError(`The operationId \`${declaredOperationId}\` is duplicated and must be made unique.`);
|
|
546
|
+
}
|
|
547
|
+
}
|
|
548
|
+
this.validateParameters(path, pathId, operation, operationId);
|
|
549
|
+
Object.keys(operation.responses || {}).forEach((responseName) => {
|
|
550
|
+
const response = operation.responses[responseName];
|
|
551
|
+
if ("$ref" in response || !response) {
|
|
552
|
+
return;
|
|
553
|
+
}
|
|
554
|
+
const responseId = `${operationId}/responses/${responseName}`;
|
|
555
|
+
this.validateResponse(responseName, response, responseId);
|
|
556
|
+
});
|
|
557
|
+
}
|
|
558
|
+
});
|
|
559
|
+
}
|
|
560
|
+
/**
|
|
561
|
+
* Validates the parameters for the given operation.
|
|
562
|
+
*
|
|
563
|
+
*/
|
|
564
|
+
validateParameters(path, pathId, operation, operationId) {
|
|
565
|
+
const pathParams = (path.parameters || []).filter((param) => !("$ref" in param));
|
|
566
|
+
const operationParams = (operation.parameters || []).filter(
|
|
567
|
+
(param) => !("$ref" in param)
|
|
568
|
+
);
|
|
569
|
+
this.checkForDuplicates(pathParams, pathId);
|
|
570
|
+
this.checkForDuplicates(operationParams, operationId);
|
|
571
|
+
const params = pathParams.reduce((combinedParams, value) => {
|
|
572
|
+
const duplicate = combinedParams.some((param) => {
|
|
573
|
+
if ("$ref" in param || "$ref" in value) {
|
|
574
|
+
return false;
|
|
575
|
+
}
|
|
576
|
+
return param.in === value.in && param.name === value.name;
|
|
577
|
+
});
|
|
578
|
+
if (!duplicate) {
|
|
579
|
+
combinedParams.push(value);
|
|
580
|
+
}
|
|
581
|
+
return combinedParams;
|
|
582
|
+
}, operationParams.slice());
|
|
583
|
+
this.validateBodyParameters(params, operationId);
|
|
584
|
+
this.validatePathParameters(params, pathId, operationId);
|
|
585
|
+
this.validateParameterTypes(params, operation, operationId);
|
|
586
|
+
}
|
|
587
|
+
/**
|
|
588
|
+
* Validates body and formData parameters for the given operation.
|
|
589
|
+
*
|
|
590
|
+
*/
|
|
591
|
+
validateBodyParameters(params, operationId) {
|
|
592
|
+
const bodyParams = params.filter((param) => param.in === "body");
|
|
593
|
+
const formParams = params.filter((param) => param.in === "formData");
|
|
594
|
+
if (bodyParams.length > 1) {
|
|
595
|
+
this.reportError(`\`${operationId}\` has ${bodyParams.length} body parameters. Only one is allowed.`);
|
|
596
|
+
} else if (bodyParams.length > 0 && formParams.length > 0) {
|
|
597
|
+
this.reportError(
|
|
598
|
+
`\`${operationId}\` has \`body\` and \`formData\` parameters. Only one or the other is allowed.`
|
|
599
|
+
);
|
|
600
|
+
}
|
|
601
|
+
}
|
|
602
|
+
/**
|
|
603
|
+
* Validates path parameters for the given path.
|
|
604
|
+
*
|
|
605
|
+
*/
|
|
606
|
+
validatePathParameters(params, pathId, operationId) {
|
|
607
|
+
const placeholders = pathId.match(pathParameterTemplateRegExp) || [];
|
|
608
|
+
for (let i = 0; i < placeholders.length; i++) {
|
|
609
|
+
for (let j = i + 1; j < placeholders.length; j++) {
|
|
610
|
+
if (placeholders[i] === placeholders[j]) {
|
|
611
|
+
this.reportError(`\`${operationId}\` has multiple path placeholders named \`${placeholders[i]}\`.`);
|
|
612
|
+
}
|
|
613
|
+
}
|
|
614
|
+
}
|
|
615
|
+
params.filter((param) => param.in === "path").forEach((param) => {
|
|
616
|
+
if (param.required !== true) {
|
|
617
|
+
if (this.rules["non-optional-path-parameters"] === "warning") {
|
|
618
|
+
this.reportWarning(
|
|
619
|
+
`Path parameters should not be optional. Set \`required=true\` for the \`${param.name}\` parameter at \`${operationId}\`.`
|
|
620
|
+
);
|
|
621
|
+
} else {
|
|
622
|
+
this.reportError(
|
|
623
|
+
`Path parameters cannot be optional. Set \`required=true\` for the \`${param.name}\` parameter at \`${operationId}\`.`
|
|
624
|
+
);
|
|
625
|
+
}
|
|
626
|
+
}
|
|
627
|
+
const match = placeholders.indexOf(`{${param.name}}`);
|
|
628
|
+
if (match === -1) {
|
|
629
|
+
const error = `\`${operationId}\` has a path parameter named \`${param.name}\`, but there is no corresponding \`{${param.name}}\` in the path string.`;
|
|
630
|
+
if (this.rules["path-parameters-not-in-path"] === "warning") {
|
|
631
|
+
this.reportWarning(error);
|
|
632
|
+
} else {
|
|
633
|
+
this.reportError(error);
|
|
634
|
+
}
|
|
635
|
+
}
|
|
636
|
+
placeholders.splice(match, 1);
|
|
637
|
+
});
|
|
638
|
+
if (placeholders.length > 0) {
|
|
639
|
+
const list = new Intl.ListFormat("en", { style: "long", type: "conjunction" }).format(
|
|
640
|
+
placeholders.map((placeholder) => `\`${placeholder}\``)
|
|
641
|
+
);
|
|
642
|
+
const error = `\`${operationId}\` is missing path parameter(s) for ${list}.`;
|
|
643
|
+
if (this.rules["path-parameters-not-in-parameters"] === "warning") {
|
|
644
|
+
this.reportWarning(error);
|
|
645
|
+
} else {
|
|
646
|
+
this.reportError(error);
|
|
647
|
+
}
|
|
648
|
+
}
|
|
649
|
+
}
|
|
650
|
+
/**
|
|
651
|
+
* Validates data types of parameters for the given operation.
|
|
652
|
+
*
|
|
653
|
+
*/
|
|
654
|
+
validateParameterTypes(params, operation, operationId) {
|
|
655
|
+
params.forEach((param) => {
|
|
656
|
+
const parameterId = `${operationId}/parameters/${param.name}`;
|
|
657
|
+
let schema;
|
|
658
|
+
switch (param.in) {
|
|
659
|
+
case "body":
|
|
660
|
+
schema = param.schema;
|
|
661
|
+
break;
|
|
662
|
+
case "formData":
|
|
663
|
+
schema = param;
|
|
664
|
+
break;
|
|
665
|
+
default:
|
|
666
|
+
schema = param;
|
|
667
|
+
}
|
|
668
|
+
this.validateSchema(schema, parameterId);
|
|
669
|
+
this.validateRequiredPropertiesExist(schema, parameterId);
|
|
670
|
+
if (schema.type === "file") {
|
|
671
|
+
const formData = /multipart\/(.*\+)?form-data/;
|
|
672
|
+
const urlEncoded = /application\/(.*\+)?x-www-form-urlencoded/;
|
|
673
|
+
const consumes = operation.consumes || this.api.consumes || [];
|
|
674
|
+
const hasValidMimeType = consumes.some((consume) => {
|
|
675
|
+
return formData.test(consume) || urlEncoded.test(consume);
|
|
676
|
+
});
|
|
677
|
+
if (!hasValidMimeType) {
|
|
678
|
+
this.reportError(
|
|
679
|
+
`\`${operationId}\` has a file parameter, so it must consume \`multipart/form-data\` or \`application/x-www-form-urlencoded\`.`
|
|
680
|
+
);
|
|
681
|
+
}
|
|
682
|
+
}
|
|
683
|
+
});
|
|
684
|
+
}
|
|
685
|
+
/**
|
|
686
|
+
* Validates the given response object.
|
|
687
|
+
*
|
|
688
|
+
*/
|
|
689
|
+
validateResponse(code, response, responseId) {
|
|
690
|
+
if (code !== "default") {
|
|
691
|
+
if (typeof code === "number" && (code < 100 || code > 599) || typeof code === "string" && (Number(code) < 100 || Number(code) > 599)) {
|
|
692
|
+
this.reportError(`\`${responseId}\` has an invalid response code: ${code}`);
|
|
693
|
+
}
|
|
694
|
+
}
|
|
695
|
+
Object.keys(response.headers || {}).forEach((headerName) => {
|
|
696
|
+
const header = response.headers[headerName];
|
|
697
|
+
const headerId = `${responseId}/headers/${headerName}`;
|
|
698
|
+
this.validateSchema(header, headerId);
|
|
699
|
+
});
|
|
700
|
+
if (response.schema) {
|
|
701
|
+
if ("$ref" in response.schema) {
|
|
702
|
+
return;
|
|
703
|
+
}
|
|
704
|
+
this.validateSchema(response.schema, `${responseId}/schema`);
|
|
705
|
+
}
|
|
706
|
+
}
|
|
707
|
+
/**
|
|
708
|
+
* Validates the given Swagger schema object.
|
|
709
|
+
*
|
|
710
|
+
*/
|
|
711
|
+
validateSchema(schema, schemaId) {
|
|
712
|
+
if (schema.type === "array" && !schema.items) {
|
|
713
|
+
if (this.rules["array-without-items"] === "warning") {
|
|
714
|
+
this.reportWarning(`\`${schemaId}\` is an array, so it should include an \`items\` schema.`);
|
|
715
|
+
} else {
|
|
716
|
+
this.reportError(`\`${schemaId}\` is an array, so it must include an \`items\` schema.`);
|
|
717
|
+
}
|
|
718
|
+
}
|
|
719
|
+
}
|
|
720
|
+
/**
|
|
721
|
+
* Validates that the declared properties of the given Swagger schema object actually exist.
|
|
722
|
+
*
|
|
723
|
+
*/
|
|
724
|
+
validateRequiredPropertiesExist(schema, schemaId) {
|
|
725
|
+
function collectProperties(schemaObj, props) {
|
|
726
|
+
if (schemaObj.properties) {
|
|
727
|
+
Object.keys(schemaObj.properties).forEach((property) => {
|
|
728
|
+
if (schemaObj.properties.hasOwnProperty(property)) {
|
|
729
|
+
props[property] = schemaObj.properties[property];
|
|
730
|
+
}
|
|
731
|
+
});
|
|
732
|
+
}
|
|
733
|
+
if (schemaObj.allOf) {
|
|
734
|
+
schemaObj.allOf.forEach((parent) => {
|
|
735
|
+
collectProperties(parent, props);
|
|
736
|
+
});
|
|
737
|
+
}
|
|
738
|
+
}
|
|
739
|
+
if (schema.required && Array.isArray(schema.required)) {
|
|
740
|
+
const props = {};
|
|
741
|
+
collectProperties(schema, props);
|
|
742
|
+
schema.required.forEach((requiredProperty) => {
|
|
743
|
+
if (!props[requiredProperty]) {
|
|
744
|
+
const error = `Property \`${requiredProperty}\` is listed as required but does not exist in \`${schemaId}\`.`;
|
|
745
|
+
if (this.rules["unknown-required-schema-property"] === "warning") {
|
|
746
|
+
this.reportWarning(error);
|
|
747
|
+
} else {
|
|
748
|
+
this.reportError(error);
|
|
749
|
+
}
|
|
750
|
+
}
|
|
751
|
+
});
|
|
752
|
+
}
|
|
753
|
+
}
|
|
754
|
+
/**
|
|
755
|
+
* Checks the given parameter list for duplicates.
|
|
756
|
+
*
|
|
757
|
+
*/
|
|
758
|
+
checkForDuplicates(params, schemaId) {
|
|
759
|
+
for (let i = 0; i < params.length - 1; i++) {
|
|
760
|
+
const outer = params[i];
|
|
761
|
+
for (let j = i + 1; j < params.length; j++) {
|
|
762
|
+
const inner = params[j];
|
|
763
|
+
if (outer.name === inner.name && outer.in === inner.in) {
|
|
764
|
+
const error = `Found multiple \`${outer.in}\` parameters named \`${outer.name}\` in \`${schemaId}\`.`;
|
|
765
|
+
if (this.rules["duplicate-non-request-body-parameters"] === "warning") {
|
|
766
|
+
this.reportWarning(error);
|
|
767
|
+
} else {
|
|
768
|
+
this.reportError(error);
|
|
769
|
+
}
|
|
770
|
+
}
|
|
771
|
+
}
|
|
772
|
+
}
|
|
773
|
+
}
|
|
774
|
+
};
|
|
775
|
+
|
|
776
|
+
// src/validators/spec.ts
|
|
777
|
+
function validateSpec(api, rules) {
|
|
778
|
+
let validator;
|
|
779
|
+
const specificationName = getSpecificationName(api);
|
|
780
|
+
if (isOpenAPI(api)) {
|
|
781
|
+
validator = new OpenAPISpecificationValidator(api, rules.openapi);
|
|
782
|
+
} else {
|
|
783
|
+
validator = new SwaggerSpecificationValidator(api, rules.swagger);
|
|
784
|
+
}
|
|
785
|
+
validator.run();
|
|
786
|
+
if (!validator.errors.length) {
|
|
787
|
+
return {
|
|
788
|
+
valid: true,
|
|
789
|
+
warnings: validator.warnings,
|
|
790
|
+
specification: specificationName
|
|
791
|
+
};
|
|
792
|
+
}
|
|
793
|
+
return {
|
|
794
|
+
valid: false,
|
|
795
|
+
errors: validator.errors,
|
|
796
|
+
warnings: validator.warnings,
|
|
797
|
+
additionalErrors: 0,
|
|
798
|
+
specification: specificationName
|
|
799
|
+
};
|
|
800
|
+
}
|
|
801
|
+
|
|
802
|
+
// src/index.ts
|
|
803
|
+
async function parse(api, options) {
|
|
804
|
+
const args = normalizeArguments(api);
|
|
805
|
+
const parserOptions = convertOptionsForParser(options);
|
|
806
|
+
const parser = new $RefParser();
|
|
807
|
+
const schema = await parser.parse(args.path, args.schema, parserOptions);
|
|
808
|
+
repairSchema(schema, args.path);
|
|
809
|
+
return schema;
|
|
810
|
+
}
|
|
811
|
+
async function bundle(api, options) {
|
|
812
|
+
const args = normalizeArguments(api);
|
|
813
|
+
const parserOptions = convertOptionsForParser(options);
|
|
814
|
+
const parser = new $RefParser();
|
|
815
|
+
await parser.bundle(args.path, args.schema, parserOptions);
|
|
816
|
+
repairSchema(parser.schema, args.path);
|
|
817
|
+
return parser.schema;
|
|
818
|
+
}
|
|
819
|
+
async function dereference(api, options) {
|
|
820
|
+
const args = normalizeArguments(api);
|
|
821
|
+
const parserOptions = convertOptionsForParser(options);
|
|
822
|
+
const parser = new $RefParser();
|
|
823
|
+
await parser.dereference(args.path, args.schema, parserOptions);
|
|
824
|
+
repairSchema(parser.schema, args.path);
|
|
825
|
+
return parser.schema;
|
|
826
|
+
}
|
|
827
|
+
async function validate(api, options) {
|
|
828
|
+
const args = normalizeArguments(api);
|
|
829
|
+
const parserOptions = convertOptionsForParser(options);
|
|
830
|
+
let result;
|
|
831
|
+
const circular$RefOption = parserOptions.dereference.circular;
|
|
832
|
+
parserOptions.dereference.circular = "ignore";
|
|
833
|
+
const parser = new $RefParser();
|
|
834
|
+
try {
|
|
835
|
+
await parser.dereference(args.path, args.schema, parserOptions);
|
|
836
|
+
} catch (err) {
|
|
837
|
+
if (err instanceof MissingPointerError) {
|
|
838
|
+
return {
|
|
839
|
+
valid: false,
|
|
840
|
+
errors: [{ message: err.message }],
|
|
841
|
+
warnings: [],
|
|
842
|
+
additionalErrors: 0,
|
|
843
|
+
specification: null
|
|
844
|
+
};
|
|
845
|
+
}
|
|
846
|
+
throw err;
|
|
847
|
+
}
|
|
848
|
+
if (!isSwagger(parser.schema) && !isOpenAPI(parser.schema)) {
|
|
849
|
+
return {
|
|
850
|
+
valid: false,
|
|
851
|
+
errors: [{ message: "Supplied schema is not a valid API definition." }],
|
|
852
|
+
warnings: [],
|
|
853
|
+
additionalErrors: 0,
|
|
854
|
+
specification: null
|
|
855
|
+
};
|
|
856
|
+
}
|
|
857
|
+
parserOptions.dereference.circular = circular$RefOption;
|
|
858
|
+
result = validateSchema(parser.schema, options);
|
|
859
|
+
if (!result.valid) {
|
|
860
|
+
return result;
|
|
861
|
+
}
|
|
862
|
+
if (parser.$refs?.circular) {
|
|
863
|
+
if (circular$RefOption === true) {
|
|
864
|
+
dereferenceInternal(parser, parserOptions);
|
|
865
|
+
} else if (circular$RefOption === false) {
|
|
866
|
+
throw new ReferenceError(
|
|
867
|
+
"The API contains circular references but the validator is configured to not permit them."
|
|
868
|
+
);
|
|
869
|
+
}
|
|
870
|
+
}
|
|
871
|
+
const openapiRules = options?.validate?.rules?.openapi;
|
|
872
|
+
const swaggerRules = options?.validate?.rules?.swagger;
|
|
873
|
+
result = validateSpec(parser.schema, {
|
|
874
|
+
openapi: {
|
|
875
|
+
"array-without-items": openapiRules?.["array-without-items"] || "error",
|
|
876
|
+
"duplicate-non-request-body-parameters": openapiRules?.["duplicate-non-request-body-parameters"] || "error",
|
|
877
|
+
"duplicate-operation-id": openapiRules?.["duplicate-operation-id"] || "error",
|
|
878
|
+
"non-optional-path-parameters": openapiRules?.["non-optional-path-parameters"] || "error",
|
|
879
|
+
"path-parameters-not-in-parameters": openapiRules?.["path-parameters-not-in-parameters"] || "error",
|
|
880
|
+
"path-parameters-not-in-path": openapiRules?.["path-parameters-not-in-path"] || "error"
|
|
881
|
+
},
|
|
882
|
+
swagger: {
|
|
883
|
+
"array-without-items": swaggerRules?.["array-without-items"] || "error",
|
|
884
|
+
"duplicate-non-request-body-parameters": swaggerRules?.["duplicate-non-request-body-parameters"] || "error",
|
|
885
|
+
"duplicate-operation-id": swaggerRules?.["duplicate-operation-id"] || "error",
|
|
886
|
+
"non-optional-path-parameters": swaggerRules?.["non-optional-path-parameters"] || "error",
|
|
887
|
+
"path-parameters-not-in-parameters": swaggerRules?.["path-parameters-not-in-parameters"] || "error",
|
|
888
|
+
"path-parameters-not-in-path": swaggerRules?.["path-parameters-not-in-path"] || "error",
|
|
889
|
+
"unknown-required-schema-property": swaggerRules?.["unknown-required-schema-property"] || "error"
|
|
890
|
+
}
|
|
891
|
+
});
|
|
892
|
+
return result;
|
|
893
|
+
}
|
|
894
|
+
function compileErrors(result) {
|
|
895
|
+
const specName = result.specification || "API definition";
|
|
896
|
+
const status = !result.valid ? "failed" : "succeeded, but with warnings";
|
|
897
|
+
const message = [`${specName} schema validation ${status}.`];
|
|
898
|
+
if (result.valid === false) {
|
|
899
|
+
if (result.errors.length) {
|
|
900
|
+
message.push(...result.errors.map((err) => err.message));
|
|
901
|
+
}
|
|
902
|
+
}
|
|
903
|
+
if (result.warnings.length) {
|
|
904
|
+
if (result.valid === false && result.errors.length) {
|
|
905
|
+
message.push("We have also found some additional warnings:");
|
|
906
|
+
}
|
|
907
|
+
message.push(...result.warnings.map((warn) => warn.message));
|
|
908
|
+
}
|
|
909
|
+
if (result.valid === false && result.additionalErrors > 0) {
|
|
910
|
+
message.push(
|
|
911
|
+
`Plus an additional ${result.additionalErrors} errors. Please resolve the above and re-run validation to see more.`
|
|
912
|
+
);
|
|
913
|
+
}
|
|
914
|
+
return message.join("\n\n");
|
|
915
|
+
}
|
|
916
|
+
export {
|
|
917
|
+
bundle,
|
|
918
|
+
compileErrors,
|
|
919
|
+
dereference,
|
|
920
|
+
parse,
|
|
921
|
+
validate
|
|
922
|
+
};
|
|
923
|
+
//# sourceMappingURL=index.js.map
|