@microsoft/m365-spec-parser 0.2.7-alpha.820087596.0 → 0.2.7-alpha.84d482fe0.0
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/dist/index.esm2017.js +0 -1
- package/dist/index.esm2017.js.map +1 -1
- package/dist/index.esm2017.mjs +2 -11
- package/dist/index.esm2017.mjs.map +1 -1
- package/dist/index.esm5.js +0 -1
- package/dist/index.esm5.js.map +1 -1
- package/dist/index.node.cjs.js +3 -12
- package/dist/index.node.cjs.js.map +1 -1
- package/dist/src/adaptiveCardWrapper.d.ts +1 -1
- package/dist/src/index.d.ts +1 -1
- package/dist/src/interfaces.d.ts +1 -2
- package/dist/src/manifestUpdater.d.ts +1 -1
- package/dist/src/utils.d.ts +1 -1
- package/package.json +3 -3
package/dist/index.esm2017.mjs
CHANGED
|
@@ -3,7 +3,7 @@ import converter from 'swagger2openapi';
|
|
|
3
3
|
import jsyaml from 'js-yaml';
|
|
4
4
|
import fs from 'fs-extra';
|
|
5
5
|
import path from 'path';
|
|
6
|
-
import { ManifestUtil } from '@microsoft/
|
|
6
|
+
import { ManifestUtil } from '@microsoft/app-manifest';
|
|
7
7
|
import { createHash } from 'crypto';
|
|
8
8
|
|
|
9
9
|
// Copyright (c) Microsoft Corporation.
|
|
@@ -58,7 +58,6 @@ var WarningType;
|
|
|
58
58
|
WarningType["GenerateCardFailed"] = "generate-card-failed";
|
|
59
59
|
WarningType["OperationOnlyContainsOptionalParam"] = "operation-only-contains-optional-param";
|
|
60
60
|
WarningType["ConvertSwaggerToOpenAPI"] = "convert-swagger-to-openapi";
|
|
61
|
-
WarningType["FuncDescriptionTooLong"] = "function-description-too-long";
|
|
62
61
|
WarningType["OperationIdContainsSpecialCharacters"] = "operationid-contains-special-characters";
|
|
63
62
|
WarningType["UnsupportedAuthType"] = "unsupported-auth-type";
|
|
64
63
|
WarningType["GenerateJsonDataFailed"] = "generate-json-data-failed";
|
|
@@ -1799,15 +1798,7 @@ class ManifestUpdater {
|
|
|
1799
1798
|
const safeFunctionName = operationId.replace(/[^a-zA-Z0-9]/g, "_");
|
|
1800
1799
|
const description = (_a = operationItem.description) !== null && _a !== void 0 ? _a : "";
|
|
1801
1800
|
const summary = operationItem.summary;
|
|
1802
|
-
|
|
1803
|
-
if (funcDescription.length > ConstantString.FunctionDescriptionMaxLens) {
|
|
1804
|
-
warnings.push({
|
|
1805
|
-
type: WarningType.FuncDescriptionTooLong,
|
|
1806
|
-
content: Utils.format(ConstantString.FuncDescriptionTooLong, safeFunctionName, funcDescription.length.toString(), ConstantString.FunctionDescriptionMaxLens.toString()),
|
|
1807
|
-
data: safeFunctionName,
|
|
1808
|
-
});
|
|
1809
|
-
funcDescription = funcDescription.slice(0, ConstantString.FunctionDescriptionMaxLens);
|
|
1810
|
-
}
|
|
1801
|
+
const funcDescription = operationItem.description || operationItem.summary || "";
|
|
1811
1802
|
const funcObj = {
|
|
1812
1803
|
name: safeFunctionName,
|
|
1813
1804
|
description: funcDescription,
|