diff --git a/lib/cli.js b/lib/cli.js index b0c193d5..95a5d3d1 100755 --- a/lib/cli.js +++ b/lib/cli.js @@ -113,7 +113,7 @@ function convert(source) { }); stringifyStream(openapi, null, argv.pretty ? 4 : 0).pipe( - fs.createWriteStream(target) + fs.createWriteStream(target), ); if (messages.length > 0) console.dir(messages); diff --git a/lib/csdl2openapi.js b/lib/csdl2openapi.js index 3c890c84..db3e1a82 100644 --- a/lib/csdl2openapi.js +++ b/lib/csdl2openapi.js @@ -57,7 +57,7 @@ module.exports.csdl2openapi = function ( skipBatchPath = false, defaultTitle = null, defaultDescription = null, - } = {} + } = {}, ) { const serviceRoot = scheme + "://" + host + basePath; const queryOptionPrefix = csdl.$Version <= "4.0" ? "$" : ""; @@ -175,7 +175,7 @@ module.exports.csdl2openapi = function ( name, child, 0, - "" + "", ); } else if (child.$Action) { pathItemActionImport(paths, name, child); @@ -212,7 +212,7 @@ module.exports.csdl2openapi = function ( targetName, target, level, - navigationPath + navigationPath, ) { const name = prefix.substring(prefix.lastIndexOf("/") + 1); const type = model.element(element.$Type); @@ -233,7 +233,7 @@ module.exports.csdl2openapi = function ( level, restrictions, false, - nonExpandable + nonExpandable, ); if ( element.$Collection && @@ -247,7 +247,7 @@ module.exports.csdl2openapi = function ( targetName, target, level, - restrictions + restrictions, ); } @@ -257,7 +257,7 @@ module.exports.csdl2openapi = function ( prefix, prefixParameters, element, - sourceName + sourceName, ); if (element.$Collection) { @@ -274,7 +274,7 @@ module.exports.csdl2openapi = function ( level, navigationPath, restrictions, - nonExpandable + nonExpandable, ); } else { operationUpdate( @@ -284,7 +284,7 @@ module.exports.csdl2openapi = function ( sourceName, target, level, - restrictions + restrictions, ); if (element.$Nullable) { operationDelete( @@ -294,7 +294,7 @@ module.exports.csdl2openapi = function ( sourceName, target, level, - restrictions + restrictions, ); } pathItemsForBoundOperations( @@ -302,7 +302,7 @@ module.exports.csdl2openapi = function ( prefix, prefixParameters, element, - sourceName + sourceName, ); pathItemsWithNavigation( paths, @@ -312,7 +312,7 @@ module.exports.csdl2openapi = function ( root, sourceName, level, - navigationPath + navigationPath, ); } } @@ -331,7 +331,7 @@ module.exports.csdl2openapi = function ( target, level, - restrictions + restrictions, ); } } @@ -347,7 +347,7 @@ module.exports.csdl2openapi = function ( root[voc.Capabilities.NavigationRestrictions] || {}; return ( (navigationRestrictions.RestrictedProperties || []).find( - (item) => item.NavigationProperty == navigationPath + (item) => item.NavigationProperty == navigationPath, ) || {} ); } @@ -398,7 +398,7 @@ module.exports.csdl2openapi = function ( level, navigationPath, restrictions, - nonExpandable + nonExpandable, ) { const targetIndexable = target == null || target[voc.Capabilities.IndexableByKey] != false; @@ -425,7 +425,7 @@ module.exports.csdl2openapi = function ( level, restrictions, true, - nonExpandable + nonExpandable, ); operationUpdate( pathItem, @@ -434,7 +434,7 @@ module.exports.csdl2openapi = function ( sourceName, target, level, - restrictions + restrictions, ); operationDelete( pathItem, @@ -443,7 +443,7 @@ module.exports.csdl2openapi = function ( sourceName, target, level, - restrictions + restrictions, ); if ( Object.keys(pathItem).filter((i) => i !== "parameters").length === 0 @@ -456,7 +456,7 @@ module.exports.csdl2openapi = function ( parameters, type, name, - sourceName + sourceName, ); pathItemsForBoundOperations( paths, @@ -464,7 +464,7 @@ module.exports.csdl2openapi = function ( parameters, element, sourceName, - true + true, ); pathItemsWithNavigation( paths, @@ -474,7 +474,7 @@ module.exports.csdl2openapi = function ( root, sourceName, level, - navigationPath + navigationPath, ); } } @@ -499,7 +499,7 @@ module.exports.csdl2openapi = function ( targetName, target, level, - restrictions + restrictions, ) { const insertRestrictions = restrictions.InsertRestrictions || @@ -531,7 +531,7 @@ module.exports.csdl2openapi = function ( 201, "Created entity", { $Type: element.$Type }, - insertRestrictions.ErrorResponses + insertRestrictions.ErrorResponses, ), }; if (insertRestrictions.LongDescription) @@ -566,7 +566,7 @@ module.exports.csdl2openapi = function ( level, restrictions, byKey, - nonExpandable + nonExpandable, ) { const targetRestrictions = target?.[voc.Capabilities.ReadRestrictions]; const readRestrictions = @@ -608,7 +608,7 @@ module.exports.csdl2openapi = function ( { $Type: element.$Type, $Collection: collection }, byKey ? readByKeyRestrictions?.ErrorResponses - : readRestrictions?.ErrorResponses + : readRestrictions?.ErrorResponses, ), }; const deltaSupported = @@ -632,7 +632,7 @@ module.exports.csdl2openapi = function ( customParameters( operation, - byKey ? readByKeyRestrictions || readRestrictions : readRestrictions + byKey ? readByKeyRestrictions || readRestrictions : readRestrictions, ); if (collection) { @@ -744,7 +744,9 @@ module.exports.csdl2openapi = function ( targetRestrictions == null || targetRestrictions.Expandable != false; if (supported) { const expandItems = ["*"].concat( - navigationPaths(element).filter((path) => !nonExpandable.includes(path)) + navigationPaths(element).filter( + (path) => !nonExpandable.includes(path), + ), ); if (expandItems.length > 1) { if (csdl.$Version === "2.0") expandItems.shift(1); @@ -901,7 +903,7 @@ module.exports.csdl2openapi = function ( type.$Kind !== "NavigationProperty" && type.$Type && !type.$Type.startsWith("Edm.") && - !model.element(type.$Type) + !model.element(type.$Type), ); // Keep old logging @@ -1097,7 +1099,7 @@ module.exports.csdl2openapi = function ( sourceName, target, level, - restrictions + restrictions, ) { const updateRestrictions = restrictions.UpdateRestrictions || @@ -1135,7 +1137,7 @@ module.exports.csdl2openapi = function ( 204, "Success", undefined, - updateRestrictions.ErrorResponses + updateRestrictions.ErrorResponses, ), }; if (updateRestrictions.LongDescription) @@ -1164,7 +1166,7 @@ module.exports.csdl2openapi = function ( sourceName, target, level, - restrictions + restrictions, ) { const deleteRestrictions = restrictions.DeleteRestrictions || @@ -1184,7 +1186,7 @@ module.exports.csdl2openapi = function ( 204, "Success", undefined, - deleteRestrictions.ErrorResponses + deleteRestrictions.ErrorResponses, ), }; if (deleteRestrictions.LongDescription) @@ -1209,7 +1211,7 @@ module.exports.csdl2openapi = function ( prefixParameters, type, name, - sourceName + sourceName, ) { if (!type.$HasStream) return; @@ -1254,7 +1256,7 @@ module.exports.csdl2openapi = function ( root, sourceName, level, - navigationPrefix + navigationPrefix, ) { const navigationRestrictions = root[voc.Capabilities.NavigationRestrictions] || {}; @@ -1268,7 +1270,7 @@ module.exports.csdl2openapi = function ( for (const [name, property] of Object.entries(properties)) { const parentRestrictions = navigationPropertyRestrictions( root, - navigationPrefix + navigationPrefix, ); if (parentRestrictions.Navigability == "Single") return; @@ -1276,7 +1278,7 @@ module.exports.csdl2openapi = function ( navigationPrefix + (navigationPrefix.length > 0 ? "/" : "") + name; const restrictions = navigationPropertyRestrictions( root, - navigationPath + navigationPath, ); if ( ["Recursive", "Single"].includes(restrictions.Navigability) || @@ -1296,7 +1298,7 @@ module.exports.csdl2openapi = function ( targetSetName, target, level + 1, - navigationPath + navigationPath, ); } } @@ -1320,7 +1322,7 @@ module.exports.csdl2openapi = function ( model.element(property.$Type), map, prefix + name + "/", - level + 1 + level + 1, ); } } @@ -1478,7 +1480,7 @@ module.exports.csdl2openapi = function ( prefixParameters, element, sourceName, - byKey = false + byKey = false, ) { const overloads = //TODO: make method @@ -1493,7 +1495,7 @@ module.exports.csdl2openapi = function ( prefixParameters, item.name, item.overload, - sourceName + sourceName, ); else pathItemFunction( @@ -1502,7 +1504,7 @@ module.exports.csdl2openapi = function ( prefixParameters, item.name, item.overload, - sourceName + sourceName, ); } } @@ -1524,7 +1526,7 @@ module.exports.csdl2openapi = function ( child.$Action, overload, child.$EntitySet, - child + child, ); } @@ -1545,7 +1547,7 @@ module.exports.csdl2openapi = function ( actionName, overload, sourceName, - actionImport = {} + actionImport = {}, ) { const name = actionName.indexOf(".") === -1 ? actionName : nameParts(actionName).name; @@ -1561,13 +1563,13 @@ module.exports.csdl2openapi = function ( 200, "Success", overload.$ReturnType, - overload[voc.Capabilities.OperationRestrictions]?.ErrorResponses + overload[voc.Capabilities.OperationRestrictions]?.ErrorResponses, ) : response( 204, "Success", undefined, - overload[voc.Capabilities.OperationRestrictions]?.ErrorResponses + overload[voc.Capabilities.OperationRestrictions]?.ErrorResponses, ), }, }; @@ -1598,7 +1600,7 @@ module.exports.csdl2openapi = function ( } customParameters( pathItem.post, - overload[voc.Capabilities.OperationRestrictions] || {} + overload[voc.Capabilities.OperationRestrictions] || {}, ); paths[prefix] = pathItem; } @@ -1620,7 +1622,7 @@ module.exports.csdl2openapi = function ( child.$Function, overload, child.$EntitySet, - child + child, ); } } @@ -1642,7 +1644,7 @@ module.exports.csdl2openapi = function ( functionName, overload, sourceName, - functionImport = {} + functionImport = {}, ) { const name = functionName.indexOf(".") === -1 @@ -1733,7 +1735,7 @@ module.exports.csdl2openapi = function ( 200, "Success", overload.$ReturnType, - overload[voc.Capabilities.OperationRestrictions]?.ErrorResponses + overload[voc.Capabilities.OperationRestrictions]?.ErrorResponses, ), }, }; @@ -1744,7 +1746,7 @@ module.exports.csdl2openapi = function ( customParameters( pathItem.get, - overload[voc.Capabilities.OperationRestrictions] || {} + overload[voc.Capabilities.OperationRestrictions] || {}, ); paths[prefix + pathParameters] = pathItem; @@ -1771,7 +1773,7 @@ module.exports.csdl2openapi = function ( target, level, - restrictions + restrictions, ) { const name = prefix.substring(prefix.lastIndexOf("/") + 1); const path = prefix + "/$filter({filter_expression})/$each"; @@ -1829,7 +1831,7 @@ module.exports.csdl2openapi = function ( 204, "Success", undefined, - updateRestrictions.ErrorResponses + updateRestrictions.ErrorResponses, ), }; customParameters(pathItem.patch, updateRestrictions); @@ -1848,7 +1850,7 @@ module.exports.csdl2openapi = function ( 204, "Success", undefined, - deleteRestrictions.ErrorResponses + deleteRestrictions.ErrorResponses, ), }; customParameters(pathItem.delete, deleteRestrictions); @@ -1868,7 +1870,7 @@ module.exports.csdl2openapi = function ( batchSupport.Supported !== false; if (supported) { const firstEntitySet = model.resources.filter( - ([, resource]) => resource.$Collection + ([, resource]) => resource.$Collection, )[0]?.[0]; paths["/$batch"] = { post: { @@ -2035,7 +2037,7 @@ module.exports.csdl2openapi = function ( r.namespace, r.name, type, - r.suffix + r.suffix, ); break; case "EnumType": @@ -2411,7 +2413,7 @@ module.exports.csdl2openapi = function ( element, suffix = "", forParameter = false, - forFunction = false + forFunction = false, ) { let s = {}; switch (element.$Type) { diff --git a/lib/diagram.js b/lib/diagram.js index e9a2a4ee..37ef56fc 100644 --- a/lib/diagram.js +++ b/lib/diagram.js @@ -44,7 +44,7 @@ function resourceDiagram(model) { "]"; for (const [name, property] of model.directPropertiesOfStructuredType( - type + type, )) { const targetNP = nameParts(property.$Type ?? "Edm.String"); if ( diff --git a/lib/edm.js b/lib/edm.js index 629b98d6..f3a343f2 100644 --- a/lib/edm.js +++ b/lib/edm.js @@ -142,14 +142,14 @@ module.exports.EDM = class { const type = p.$Type || "Edm.String"; return p.$Collection ? `Collection(${type})` : type; }) - .join(",") + .join(","), ); } if (!element) { messages.push(`Invalid annotation target '${target}'`); } else if (Array.isArray(element)) { messages.push( - `Ignoring annotations targeting all overloads of '${target}'` + `Ignoring annotations targeting all overloads of '${target}'`, ); //TODO: action or function: //- loop over all overloads @@ -166,7 +166,7 @@ module.exports.EDM = class { Object.assign(element.$ReturnType, annotations); } else { const parameter = element.$Parameter.find( - (p) => p.$Name == segments[1] + (p) => p.$Name == segments[1], ); Object.assign(parameter, annotations); } @@ -226,7 +226,7 @@ module.exports.EDM = class { */ get resources() { return Object.entries(this.entityContainer ?? {}).filter(([name]) => - isIdentifier(name) + isIdentifier(name), ); } @@ -236,7 +236,7 @@ module.exports.EDM = class { */ get structuredTypes() { return Object.entries(this.#elements).filter(([, element]) => - ["EntityType", "ComplexType"].includes(element.$Kind) + ["EntityType", "ComplexType"].includes(element.$Kind), ); } diff --git a/lib/transform.js b/lib/transform.js index e150d72b..0738cfc7 100644 --- a/lib/transform.js +++ b/lib/transform.js @@ -43,7 +43,7 @@ fs.readdirSync(exampleFolder) fs.writeFileSync( exampleFolder + example + ".openapi3.json", - JSON.stringify(openapi, null, 4) + JSON.stringify(openapi, null, 4), ); if (messages.length > 0) console.dir(messages); diff --git a/package-lock.json b/package-lock.json index 487b6b2d..55a48b98 100644 --- a/package-lock.json +++ b/package-lock.json @@ -22,7 +22,7 @@ "ajv-draft-04": "^1.0.0", "ajv-formats": "^2.1.1", "c8": "^8.0.1", - "eslint": "^8.47.0", + "eslint": "^8.53.0", "mocha": "^10.2.0" }, "engines": { @@ -77,18 +77,18 @@ } }, "node_modules/@eslint-community/regexpp": { - "version": "4.6.2", - "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.6.2.tgz", - "integrity": "sha512-pPTNuaAG3QMH+buKyBIGJs3g/S5y0caxw0ygM3YyE6yJFySwiGGSzA+mM3KJ8QQvzeLh3blwgSonkFjgQdxzMw==", + "version": "4.10.0", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.10.0.tgz", + "integrity": "sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA==", "dev": true, "engines": { "node": "^12.0.0 || ^14.0.0 || >=16.0.0" } }, "node_modules/@eslint/eslintrc": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.2.tgz", - "integrity": "sha512-+wvgpDsrB1YqAMdEUCcnTlpfVBH7Vqn6A/NT3D8WVXFIaKMlErPIZT3oCIAVCOtarRpMtelZLqJeU3t7WY6X6g==", + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.3.tgz", + "integrity": "sha512-yZzuIG+jnVu6hNSzFEN07e8BxF3uAzYtQb6uDkaYZLo6oYZDCq454c5kB8zxnzfCYyP4MIuyBn10L0DqwujTmA==", "dev": true, "dependencies": { "ajv": "^6.12.4", @@ -131,21 +131,21 @@ "dev": true }, "node_modules/@eslint/js": { - "version": "8.47.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.47.0.tgz", - "integrity": "sha512-P6omY1zv5MItm93kLM8s2vr1HICJH8v0dvddDhysbIuZ+vcjOHg5Zbkf1mTkcmi2JA9oBG2anOkRnW8WJTS8Og==", + "version": "8.53.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.53.0.tgz", + "integrity": "sha512-Kn7K8dx/5U6+cT1yEhpX1w4PCSg0M+XyRILPgvwcEBjerFWCwQj5sbr3/VmxqV0JGHCBCzyd6LxypEuehypY1w==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, "node_modules/@humanwhocodes/config-array": { - "version": "0.11.10", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.10.tgz", - "integrity": "sha512-KVVjQmNUepDVGXNuoRRdmmEjruj0KfiGSbS8LVc12LMsWDQzRXJ0qdhN8L8uUigKpfEHRhlaQFY0ib1tnUbNeQ==", + "version": "0.11.13", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.13.tgz", + "integrity": "sha512-JSBDMiDKSzQVngfRjOdFXgFfklaXI4K9nLF49Auh21lmBWRLIK3+xTErTWD4KU54pb6coM6ESE7Awz/FNU3zgQ==", "dev": true, "dependencies": { - "@humanwhocodes/object-schema": "^1.2.1", + "@humanwhocodes/object-schema": "^2.0.1", "debug": "^4.1.1", "minimatch": "^3.0.5" }, @@ -167,9 +167,9 @@ } }, "node_modules/@humanwhocodes/object-schema": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz", - "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.1.tgz", + "integrity": "sha512-dvuCeX5fC9dXgJn9t+X5atfmgQAzUOWqS1254Gh0m6i8wKd10ebXkfNKiRK+1GWi/yTvvLDHpoxLr0xxxeslWw==", "dev": true }, "node_modules/@istanbuljs/schema": { @@ -197,9 +197,9 @@ "dev": true }, "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.19", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.19.tgz", - "integrity": "sha512-kf37QtfW+Hwx/buWGMPcR60iF9ziHa6r/CZJIHbmcm4+0qrXiVdxegAH0F6yddEVQ7zdkjcGCgCzUu+BcbhQxw==", + "version": "0.3.20", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.20.tgz", + "integrity": "sha512-R8LcPeWZol2zR8mmH3JeKQ6QRCFb7XgUhV9ZlGhHLGyg4wpPiPZNQOOWhFZhxKw8u//yTbNGI42Bx/3paXEQ+Q==", "dev": true, "dependencies": { "@jridgewell/resolve-uri": "^3.1.0", @@ -242,15 +242,21 @@ } }, "node_modules/@types/istanbul-lib-coverage": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.4.tgz", - "integrity": "sha512-z/QT1XN4K4KYuslS23k62yDIDLwLFkzxOuMplDtObz0+y7VqJCaO2o+SPwHCvLFZh7xazvvoor2tA/hPz9ee7g==", + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz", + "integrity": "sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w==", + "dev": true + }, + "node_modules/@ungap/structured-clone": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz", + "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==", "dev": true }, "node_modules/acorn": { - "version": "8.10.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.10.0.tgz", - "integrity": "sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==", + "version": "8.11.2", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.2.tgz", + "integrity": "sha512-nc0Axzp/0FILLEVsm4fNwLCwMttvhEI263QtVPQcbpfZZ3ts0hLsZGOpE6czNlid7CJ9MlyH8reXkpsf3YUY4w==", "dev": true, "bin": { "acorn": "bin/acorn" @@ -559,9 +565,9 @@ "dev": true }, "node_modules/convert-source-map": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz", - "integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", + "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", "dev": true }, "node_modules/cross-spawn": { @@ -662,18 +668,19 @@ } }, "node_modules/eslint": { - "version": "8.47.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.47.0.tgz", - "integrity": "sha512-spUQWrdPt+pRVP1TTJLmfRNJJHHZryFmptzcafwSvHsceV81djHOdnEeDmkdotZyLNjDhrOasNK8nikkoG1O8Q==", + "version": "8.53.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.53.0.tgz", + "integrity": "sha512-N4VuiPjXDUa4xVeV/GC/RV3hQW9Nw+Y463lkWaKKXKYMvmRiRDAtfpuPFLN+E1/6ZhyR8J2ig+eVREnYgUsiag==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.6.1", - "@eslint/eslintrc": "^2.1.2", - "@eslint/js": "^8.47.0", - "@humanwhocodes/config-array": "^0.11.10", + "@eslint/eslintrc": "^2.1.3", + "@eslint/js": "8.53.0", + "@humanwhocodes/config-array": "^0.11.13", "@humanwhocodes/module-importer": "^1.0.1", "@nodelib/fs.walk": "^1.2.8", + "@ungap/structured-clone": "^1.2.0", "ajv": "^6.12.4", "chalk": "^4.0.0", "cross-spawn": "^7.0.2", @@ -901,22 +908,23 @@ } }, "node_modules/flat-cache": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", - "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.1.1.tgz", + "integrity": "sha512-/qM2b3LUIaIgviBQovTLvijfyOQXPtSRnRK26ksj2J7rzPIecePUIpJsZ4T02Qg+xiAEKIs5K8dsHEd+VaKa/Q==", "dev": true, "dependencies": { - "flatted": "^3.1.0", + "flatted": "^3.2.9", + "keyv": "^4.5.3", "rimraf": "^3.0.2" }, "engines": { - "node": "^10.12.0 || >=12.0.0" + "node": ">=12.0.0" } }, "node_modules/flatted": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.7.tgz", - "integrity": "sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==", + "version": "3.2.9", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.9.tgz", + "integrity": "sha512-36yxDn5H7OFZQla0/jFJmbIKTdZAQHngCedGxiMmpNfEZM0sdEeT+WczLQrjK6D7o2aiyLYDnkw0R3JK0Qv1RQ==", "dev": true }, "node_modules/foreground-child": { @@ -939,9 +947,9 @@ "dev": true }, "node_modules/fsevents": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", - "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", "dev": true, "hasInstallScript": true, "optional": true, @@ -994,9 +1002,9 @@ } }, "node_modules/globals": { - "version": "13.21.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.21.0.tgz", - "integrity": "sha512-ybyme3s4yy/t/3s35bewwXKOf7cvzfreG2lH0lZl0JB7I4GxRP2ghxOK/Nb9EkRXdbBXZLfq/p/0W2JUONB/Gg==", + "version": "13.23.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.23.0.tgz", + "integrity": "sha512-XAmF0RjlrjY23MA51q3HltdlGxUpXPvg0GioKiD9X6HD28iMjo2dKC8Vqwm7lne4GNr78+RHTfliktR6ZH09wA==", "dev": true, "dependencies": { "type-fest": "^0.20.2" @@ -1176,9 +1184,9 @@ "dev": true }, "node_modules/istanbul-lib-coverage": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.0.tgz", - "integrity": "sha512-eOeJ5BHCmHYvQK7xt9GkdHuzuCGS1Y6g9Gvnx3Ym33fz/HpLRYxiS0wHNr+m/MBC8B647Xt608vCDEvhl9c6Mw==", + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.1.tgz", + "integrity": "sha512-opCrKqbthmq3SKZ10mFMQG9dk3fTa3quaOLD35kJa5ejwZHd9xAr+kLuziiZz2cG32s4lMZxNdmdcEQnTDP4+g==", "dev": true, "engines": { "node": ">=8" @@ -1223,6 +1231,12 @@ "js-yaml": "bin/js-yaml.js" } }, + "node_modules/json-buffer": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", + "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", + "dev": true + }, "node_modules/json-schema-traverse": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", @@ -1235,6 +1249,15 @@ "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", "dev": true }, + "node_modules/keyv": { + "version": "4.5.4", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", + "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", + "dev": true, + "dependencies": { + "json-buffer": "3.0.1" + } + }, "node_modules/levn": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", @@ -1615,9 +1638,9 @@ } }, "node_modules/punycode": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz", - "integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==", + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", "dev": true, "engines": { "node": ">=6" @@ -1760,9 +1783,9 @@ ] }, "node_modules/sax": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", - "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==" + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.3.0.tgz", + "integrity": "sha512-0s+oAmw9zLl1V1cS9BtZN7JAd0cW5e0QH4W3LWEK6a4LaLEA2OTpGYWDY+6XasBLtz6wkm3u1xRw95mRuJ59WA==" }, "node_modules/semver": { "version": "7.5.4", @@ -1931,14 +1954,14 @@ } }, "node_modules/v8-to-istanbul": { - "version": "9.1.0", - "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.1.0.tgz", - "integrity": "sha512-6z3GW9x8G1gd+JIIgQQQxXuiJtCXeAjp6RaPEPLv62mH3iPHPxV6W3robxtCzNErRo6ZwTmzWhsbNvjyEBKzKA==", + "version": "9.1.3", + "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.1.3.tgz", + "integrity": "sha512-9lDD+EVI2fjFsMWXc6dy5JJzBsVTcQ2fVkfBvncZ6xJWG9wtBhOldG+mHkSL0+V1K/xgZz0JDO5UT5hFwHUghg==", "dev": true, "dependencies": { "@jridgewell/trace-mapping": "^0.3.12", "@types/istanbul-lib-coverage": "^2.0.1", - "convert-source-map": "^1.6.0" + "convert-source-map": "^2.0.0" }, "engines": { "node": ">=10.12.0" diff --git a/package.json b/package.json index ae70f01b..c89c144b 100644 --- a/package.json +++ b/package.json @@ -30,7 +30,7 @@ "ajv-draft-04": "^1.0.0", "ajv-formats": "^2.1.1", "c8": "^8.0.1", - "eslint": "^8.47.0", + "eslint": "^8.53.0", "mocha": "^10.2.0" }, "scripts": { diff --git a/test/.eslintrc.json b/test/.eslintrc.json index 4668ae79..7eeefc33 100644 --- a/test/.eslintrc.json +++ b/test/.eslintrc.json @@ -1,5 +1,5 @@ { - "env": { - "mocha": true - } + "env": { + "mocha": true + } } diff --git a/test/csdl2openapi.test.js b/test/csdl2openapi.test.js index c62b002e..35bc3eeb 100644 --- a/test/csdl2openapi.test.js +++ b/test/csdl2openapi.test.js @@ -73,7 +73,7 @@ describe("Edge cases", function () { foo: { $Type: "Model.Foo" }, foos: { $Type: "Model.Foo", $Collection: true }, }, - "Entity container of CSDL input" + "Entity container of CSDL input", ); }); @@ -207,7 +207,7 @@ describe("Edge cases", function () { assert.deepStrictEqual( actual.components.schemas["this.entityType"], expected.components.schemas["this.entityType"], - "entityType schema" + "entityType schema", ); }); @@ -411,7 +411,7 @@ describe("Edge cases", function () { assert.deepStrictEqual( operations(actual), operations(expected), - "Operations" + "Operations", ); assert.deepStrictEqual(schemas(actual), schemas(expected), "Schemas"); }); @@ -490,7 +490,7 @@ describe("Edge cases", function () { assert.deepStrictEqual( openapi.paths["/sources"].get.parameters[4], - expected_sources_get_param + expected_sources_get_param, ); assert.deepStrictEqual( messages, @@ -498,7 +498,7 @@ describe("Edge cases", function () { // "Cycle detected this.complex1->this.complex2->this.complex1", // "Cycle detected this.complex2->this.complex1->this.complex2", ], - "messages" + "messages", ); }); @@ -568,7 +568,7 @@ describe("Edge cases", function () { "^[\\w\\.\\-\\/]+$": { type: "string" }, }, }, - "JSON property old-style" + "JSON property old-style", ); assert.deepStrictEqual( openapi.components.schemas["jsonExamples.typeDefinitionNew"], @@ -580,7 +580,7 @@ describe("Edge cases", function () { "^[\\w\\.\\-\\/]+$": { type: "string" }, }, }, - "JSON property new-style" + "JSON property new-style", ); assert.deepStrictEqual( openapi.components.schemas["jsonExamples.single"].properties.stream2, @@ -590,7 +590,7 @@ describe("Edge cases", function () { { $ref: "#/components/schemas/jsonExamples.typeDefinitionNew" }, ], }, - "MaxLength" + "MaxLength", ); assert.deepStrictEqual( openapi.paths["/f(first=@first,second=@second)"].get.parameters, @@ -621,13 +621,13 @@ describe("Edge cases", function () { schema: { type: "array", items: { type: "string" } }, }, ], - "stream parameters of function" + "stream parameters of function", ); assert.deepStrictEqual( openapi.paths["/f(first=@first,second=@second)"].get.responses[200] .content["application/json"], { schema: { type: "array" } }, - "stream return type of function" + "stream return type of function", ); }); @@ -679,7 +679,7 @@ describe("Edge cases", function () { "^[\\w\\.\\-\\/]+$": { type: "string" }, }, }, - "JSON property old-style" + "JSON property old-style", ); assert.deepStrictEqual( openapi.components.schemas["jsonExamples.typeDefinitionNew"], @@ -691,7 +691,7 @@ describe("Edge cases", function () { "^[\\w\\.\\-\\/]+$": { type: "string" }, }, }, - "JSON property new-style" + "JSON property new-style", ); }); @@ -714,7 +714,7 @@ describe("Edge cases", function () { assert.deepStrictEqual( operations(actual), operations(expected), - "Operations" + "Operations", ); }); @@ -737,7 +737,7 @@ describe("Edge cases", function () { assert.deepStrictEqual( operations(actual), operations(expected), - "Operations" + "Operations", ); }); @@ -761,7 +761,7 @@ describe("Edge cases", function () { assert.deepStrictEqual( operations(actual), operations(expected), - "Operations" + "Operations", ); }); @@ -795,7 +795,7 @@ describe("Edge cases", function () { assert.deepStrictEqual( operations(actual), operations(expected), - "Operations" + "Operations", ); }); @@ -843,17 +843,17 @@ describe("Edge cases", function () { assert.deepStrictEqual( operations(actual), operations(expected), - "Operations" + "Operations", ); assert.strictEqual( actual.paths["/$batch"].post.summary, "BatchSupport - Description", - "Batch summary" + "Batch summary", ); assert.strictEqual( actual.paths["/$batch"].post.description, 'BatchSupport - LongDescription\n\n*Please note that "Try it out" is not supported for this request.*', - "Batch description" + "Batch description", ); }); @@ -886,12 +886,12 @@ describe("Edge cases", function () { assert.deepStrictEqual( operations(actual), operations(expected), - "Operations" + "Operations", ); assert.equal( actual.paths["/fun()"].get.summary, "no parameters", - "function summary" + "function summary", ); }); @@ -1053,7 +1053,7 @@ describe("Edge cases", function () { assert.deepStrictEqual( operations(actual), operations(expected), - "Operations" + "Operations", ); assert.deepStrictEqual( actual.paths["/fun(string={string},stringNull={stringNull})"].get @@ -1080,7 +1080,7 @@ describe("Edge cases", function () { }, }, ], - "String function parameters" + "String function parameters", ); assert.deepStrictEqual( actual.paths["/fun(typedef={typedef},typedefNull={typedefNull})"].get @@ -1108,7 +1108,7 @@ describe("Edge cases", function () { }, }, ], - "TypeDefinition function parameters" + "TypeDefinition function parameters", ); assert.deepStrictEqual( actual.paths["/fun(guid={guid},guidNull={guidNull})"].get.parameters, @@ -1136,7 +1136,7 @@ describe("Edge cases", function () { }, }, ], - "Guid function parameters" + "Guid function parameters", ); assert.deepStrictEqual( actual.paths["/fun(int32={int32},int32Null={int32Null})"].get.parameters, @@ -1162,7 +1162,7 @@ describe("Edge cases", function () { }, }, ], - "Int32 function parameters" + "Int32 function parameters", ); assert.deepStrictEqual( actual.paths["/fun(binary={binary},binaryNull={binaryNull})"].get @@ -1189,7 +1189,7 @@ describe("Edge cases", function () { }, }, ], - "Binary function parameters" + "Binary function parameters", ); assert.deepStrictEqual( actual.paths["/fun(boolean={boolean},booleanNull={booleanNull})"].get @@ -1214,7 +1214,7 @@ describe("Edge cases", function () { }, }, ], - "Binary function parameters" + "Binary function parameters", ); assert.deepStrictEqual( actual.paths["/fun(decimal={decimal},decimalNull={decimalNull})"].get @@ -1243,7 +1243,7 @@ describe("Edge cases", function () { }, }, ], - "Decimal function parameters" + "Decimal function parameters", ); assert.deepStrictEqual( actual.paths["/fun(duration={duration},durationNull={durationNull})"].get @@ -1272,7 +1272,7 @@ describe("Edge cases", function () { }, }, ], - "Duration function parameters" + "Duration function parameters", ); }); @@ -1378,22 +1378,22 @@ describe("Edge cases", function () { assert.deepStrictEqual( operations(actual), operations(expected), - "Operations" + "Operations", ); assert.deepStrictEqual( actual.paths[path].get.parameters, expected.paths[path].get.parameters, - "complex function parameters" + "complex function parameters", ); assert.equal( actual.paths[path].get.summary, "foo", - "complex function summary" + "complex function summary", ); assert.deepStrictEqual( actual.paths["/funO"].get.parameters, expected.paths["/funO"].get.parameters, - "optional function parameters" + "optional function parameters", ); assert.deepStrictEqual( actual.info.description.split("\n"), @@ -1406,7 +1406,7 @@ describe("Edge cases", function () { "### Legend", "![Legend](https://yuml.me/diagram/plain;dir:TB;scale:60/class/[External.Type{bg:whitesmoke}],[ComplexType],[EntityType{bg:lightslategray}],[EntitySet/Singleton/Operation{bg:lawngreen}])", ], - "diagram" + "diagram", ); }); @@ -1481,17 +1481,17 @@ describe("Edge cases", function () { assert.deepStrictEqual( operations(actual), operations(expected), - "Operations" + "Operations", ); assert.deepStrictEqual( actual.paths["/fun()"].get.responses[200], expected.paths["/fun()"].get.responses[200], - "fun" + "fun", ); assert.deepStrictEqual( actual.paths["/fun(in={in})"].get.responses[200], expected.paths["/fun(in={in})"].get.responses[200], - "fun(in)" + "fun(in)", ); }); @@ -1548,13 +1548,13 @@ describe("Edge cases", function () { assert.deepStrictEqual( operations(actual), operations(expected), - "Operations" + "Operations", ); assert.deepStrictEqual( actual.paths["/Set"].get.responses[200].content["application/json"].schema .properties, expectedGetResponseProperties, - "get list with delta" + "get list with delta", ); }); @@ -1698,27 +1698,27 @@ describe("Edge cases", function () { assert.deepStrictEqual( operations(actual), operations(expected), - "Operations" + "Operations", ); assert.deepStrictEqual( actual.paths["/stuff"].get, expected.paths["/stuff"].get, - "GET set" + "GET set", ); assert.deepStrictEqual( actual.paths["/stuff"].post, expected.paths["/stuff"].post, - "POST set" + "POST set", ); assert.deepStrictEqual( actual.paths["/single"].get, expected.paths["/single"].get, - "GET single" + "GET single", ); assert.deepStrictEqual( actual.paths["/single"].patch, expected.paths["/single"].patch, - "PATCH single" + "PATCH single", ); }); @@ -1898,12 +1898,12 @@ describe("Edge cases", function () { assert.deepStrictEqual( operations(actual), operations(expected), - "Operations" + "Operations", ); assert.deepStrictEqual( actual.paths["/set"].get, expected.paths["/set"].get, - "GET set" + "GET set", ); }); @@ -2087,12 +2087,12 @@ describe("Edge cases", function () { assert.deepStrictEqual( operations(actual), operations(expected), - "Operations" + "Operations", ); assert.deepStrictEqual( actual.paths["/sources"].get, expected.paths["/sources"].get, - "GET sources" + "GET sources", ); }); @@ -2244,12 +2244,12 @@ describe("Edge cases", function () { assert.deepStrictEqual( operations(actual), operations(expected), - "Operations" + "Operations", ); assert.deepStrictEqual( actual.paths["/Categories"].get, expected.paths["/Categories"].get, - "GET Categories" + "GET Categories", ); }); @@ -2421,17 +2421,17 @@ describe("Edge cases", function () { assert.deepStrictEqual( operations(actual), operations(expected), - "Operations" + "Operations", ); assert.deepStrictEqual( actual.paths["/things"].get, expected.paths["/things"].get, - "GET things" + "GET things", ); assert.deepStrictEqual( actual.components.schemas["this.thing"].properties.one, { type: "string", default: "def" }, - "Property with default value" + "Property with default value", ); }); @@ -2524,10 +2524,10 @@ describe("Edge cases", function () { assert.deepStrictEqual(actualExpands, expectedExpands, "expands"); assert.strictEqual( actual.paths["/roots"].get.parameters.find( - (item) => item.name == "expand" + (item) => item.name == "expand", ).description, "Expanding has some restrictions here.", - "expand description" + "expand description", ); }); @@ -2650,12 +2650,12 @@ describe("Edge cases", function () { assert.deepStrictEqual( operations(actual), operations(expected), - "Operations" + "Operations", ); assert.deepStrictEqual( actual.paths["/roots/act"].post, expected.paths["/roots/act"].post, - "POST /roots/act" + "POST /roots/act", ); assert.deepStrictEqual( actual.info.description.split("\n"), @@ -2668,12 +2668,12 @@ describe("Edge cases", function () { "### Legend", "![Legend](https://yuml.me/diagram/plain;dir:TB;scale:60/class/[External.Type{bg:whitesmoke}],[ComplexType],[EntityType{bg:lightslategray}],[EntitySet/Singleton/Operation{bg:lawngreen}])", ], - "diagram" + "diagram", ); assert.deepStrictEqual( messages, ["Ignoring annotations targeting all overloads of 'this.act'"], - "messages" + "messages", ); }); @@ -2773,17 +2773,17 @@ describe("Edge cases", function () { assert.deepStrictEqual( operations(actual), operations(expected), - "Operations" + "Operations", ); assert.deepStrictEqual( actual.components.schemas["this.root-update"], expected.components.schemas["this.root-update"], - "root update structure" + "root update structure", ); assert.deepStrictEqual( actual.components.schemas["this.child-update"], expected.components.schemas["this.child-update"], - "child update structure" + "child update structure", ); }); @@ -2848,12 +2848,12 @@ describe("Edge cases", function () { in: "header", }, }, - "security schemes" + "security schemes", ); assert.deepStrictEqual( messages, ["Unknown Authorization type foo"], - "messages" + "messages", ); }); @@ -2972,11 +2972,11 @@ describe("Edge cases", function () { type: "string", }, }, - "MaxLength" + "MaxLength", ); assert.equal( openapi.components.schemas["typeExamples.enumType"].description, - "description of enumeration type" + "description of enumeration type", ); assert.deepStrictEqual( messages, @@ -2989,7 +2989,7 @@ describe("Edge cases", function () { "Unknown type: Edm.kaputt", "Unknown type: Edm.kaputt", ], - "messages" + "messages", ); }); @@ -3118,7 +3118,7 @@ describe("Edge cases", function () { assert.deepStrictEqual( openapi.components.schemas["oas31.single"].properties, properties, - "Schemas" + "Schemas", ); }); @@ -3259,7 +3259,7 @@ describe("Edge cases", function () { assert.deepStrictEqual( operations(actual), operations(expected), - "Operations" + "Operations", ); assert.deepStrictEqual(schemas(actual), schemas(expected), "Schemas"); }); diff --git a/test/examples.test.js b/test/examples.test.js index 4089ed2f..9d98fcd8 100644 --- a/test/examples.test.js +++ b/test/examples.test.js @@ -129,7 +129,7 @@ function check(actual, expected) { assert.deepStrictEqual( operations(actual), operations(expected), - "Operations" + "Operations", ); assert.deepStrictEqual(actual, expected, "OpenAPI document"); } diff --git a/test/funnyInput.test.js b/test/funnyInput.test.js index 8fbc7eb1..da51d4b6 100644 --- a/test/funnyInput.test.js +++ b/test/funnyInput.test.js @@ -60,14 +60,14 @@ describe("Funny input", function () { assert.deepStrictEqual( operations(actual), operations(expected), - "Operations" + "Operations", ); assert.deepStrictEqual(schemas(actual), schemas(expected), "Schemas"); assert.deepStrictEqual(messages, [], "messages"); assert.equal( actual.components.schemas["other.et"].title, - "should end up in title" + "should end up in title", ); }); @@ -128,7 +128,7 @@ describe("Funny input", function () { assert.deepStrictEqual( operations(actual), operations(expected), - "Operations" + "Operations", ); assert.deepStrictEqual(schemas(actual), schemas(expected), "Schemas"); assert.deepStrictEqual(messages, [], "messages"); diff --git a/test/utilities.js b/test/utilities.js index b159a1e4..6366ca1c 100644 --- a/test/utilities.js +++ b/test/utilities.js @@ -8,7 +8,7 @@ function operations(openapi) { const p = {}; Object.keys(openapi.paths).forEach((template) => { p[template] = Object.keys(openapi.paths[template]).filter( - (op) => op != "parameters" + (op) => op != "parameters", ); }); return p;