@microsoft/m365-spec-parser 0.2.3-alpha.b8a9ab9fa.0 → 0.2.3-alpha.c3772a0e8.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.
@@ -1,8 +1,10 @@
1
1
  import { OpenAPIV3 } from "openapi-types";
2
2
  import { AdaptiveCard, ArrayElement, ImageElement, TextBlockElement } from "./interfaces";
3
3
  export declare class AdaptiveCardGenerator {
4
- static generateAdaptiveCard(operationItem: OpenAPIV3.OperationObject, allowMultipleMediaType?: boolean): [AdaptiveCard, string];
5
- static generateCardFromResponse(schema: OpenAPIV3.SchemaObject, name: string, parentArrayName?: string): Array<TextBlockElement | ImageElement | ArrayElement>;
4
+ static generateAdaptiveCard(operationItem: OpenAPIV3.OperationObject, allowMultipleMediaType?: boolean, maxElementCount?: number): [AdaptiveCard, string];
5
+ static generateCardFromResponse(schema: OpenAPIV3.SchemaObject, name: string, parentArrayName?: string, maxElementCount?: number, counter?: {
6
+ count: number;
7
+ }): Array<TextBlockElement | ImageElement | ArrayElement>;
6
8
  static getResponseJsonPathFromSchema(schema: OpenAPIV3.SchemaObject): string;
7
9
  static isImageUrlProperty(schema: OpenAPIV3.NonArraySchemaObject, name: string, parentArrayName: string): boolean;
8
10
  }
@@ -15,8 +15,10 @@ export declare class ConstantString {
15
15
  static readonly SwaggerNotSupported = "Swagger 2.0 is not supported. Please convert to OpenAPI 3.0 manually before proceeding.";
16
16
  static readonly SpecVersionNotSupported = "Unsupported OpenAPI version %s. Please use version 3.0.x.";
17
17
  static readonly MultipleAuthNotSupported = "Multiple authentication methods are unsupported. Ensure all selected APIs use identical authentication.";
18
+ static readonly OperationIdContainsSpecialCharacters = "Operation id '%s' in OpenAPI description document contained special characters and was renamed to '%s'.";
18
19
  static readonly UnsupportedSchema = "Unsupported schema in %s %s: %s";
19
20
  static readonly FuncDescriptionTooLong = "The description of the function '%s' is too long. The current length is %s characters, while the maximum allowed length is %s characters.";
21
+ static readonly GenerateJsonDataFailed = "Failed to generate JSON data for api: %s due to %s.";
20
22
  static readonly WrappedCardVersion = "devPreview";
21
23
  static readonly WrappedCardSchema = "https://developer.microsoft.com/json-schemas/teams/vDevPreview/MicrosoftTeams.ResponseRenderingTemplate.schema.json";
22
24
  static readonly WrappedCardResponseLayout = "list";
@@ -118,6 +118,8 @@ export declare enum WarningType {
118
118
  OperationOnlyContainsOptionalParam = "operation-only-contains-optional-param",
119
119
  ConvertSwaggerToOpenAPI = "convert-swagger-to-openapi",
120
120
  FuncDescriptionTooLong = "function-description-too-long",
121
+ OperationIdContainsSpecialCharacters = "operationid-contains-special-characters",
122
+ GenerateJsonDataFailed = "generate-json-data-failed",
121
123
  Unknown = "unknown"
122
124
  }
123
125
  /**
@@ -0,0 +1,6 @@
1
+ import { OpenAPIV3 } from "openapi-types";
2
+ export declare class JsonDataGenerator {
3
+ private static visitedSchemas;
4
+ static generate(schema: OpenAPIV3.SchemaObject): any;
5
+ static generateMockData(schema: OpenAPIV3.SchemaObject): any;
6
+ }
@@ -1,5 +1,5 @@
1
1
  import { OpenAPIV3 } from "openapi-types";
2
- import { AdaptiveCardBody, AuthInfo, AuthType, ErrorResult, ParseOptions } from "./interfaces";
2
+ import { AuthInfo, AuthType, ErrorResult, ParseOptions } from "./interfaces";
3
3
  import { IMessagingExtensionCommand, IParameter } from "@microsoft/teams-manifest";
4
4
  export declare class Utils {
5
5
  static hasNestedObjectInSchema(schema: OpenAPIV3.SchemaObject): boolean;
@@ -27,5 +27,4 @@ export declare class Utils {
27
27
  static format(str: string, ...args: string[]): string;
28
28
  static getSafeRegistrationIdEnvName(authName: string): string;
29
29
  static getServerObject(spec: OpenAPIV3.Document, method: string, path: string): OpenAPIV3.ServerObject | undefined;
30
- static limitACBodyProperties(body: AdaptiveCardBody, maxCount: number): AdaptiveCardBody;
31
30
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@microsoft/m365-spec-parser",
3
- "version": "0.2.3-alpha.b8a9ab9fa.0",
3
+ "version": "0.2.3-alpha.c3772a0e8.0",
4
4
  "description": "OpenAPI specification files Parser for M365 Apps",
5
5
  "main": "dist/index.node.cjs.js",
6
6
  "browser": "dist/index.esm2017.js",
@@ -39,7 +39,7 @@
39
39
  "sideEffects": false,
40
40
  "dependencies": {
41
41
  "@apidevtools/swagger-parser": "^10.1.0",
42
- "@microsoft/teams-manifest": "0.1.7-alpha.b8a9ab9fa.0",
42
+ "@microsoft/teams-manifest": "0.1.7-alpha.c3772a0e8.0",
43
43
  "fs-extra": "^11.2.0",
44
44
  "js-yaml": "^4.1.0",
45
45
  "openapi-types": "^7.2.3",
@@ -147,5 +147,5 @@
147
147
  "npx eslint --cache --fix --quiet"
148
148
  ]
149
149
  },
150
- "gitHead": "fe578371091d35cbd65a10053cd9b77a1caeaaee"
150
+ "gitHead": "2bea3543923e5862a726522e1fee8e7170991c40"
151
151
  }