@ama-sdk/schematics 9.1.0-alpha.2 → 9.1.0-alpha.21

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.
Files changed (28) hide show
  1. package/README.md +16 -0
  2. package/package.json +8 -7
  3. package/schematics/api-extension/schema.d.ts +2 -2
  4. package/schematics/api-extension/schema.d.ts.map +1 -1
  5. package/schematics/code-generator/open-api-cli-generator/open-api-cli.generator.d.ts.map +1 -1
  6. package/schematics/code-generator/open-api-cli-generator/open-api-cli.generator.js +2 -1
  7. package/schematics/code-generator/open-api-cli-generator/open-api-cli.options.d.ts +10 -1
  8. package/schematics/code-generator/open-api-cli-generator/open-api-cli.options.d.ts.map +1 -1
  9. package/schematics/code-generator/open-api-cli-generator/open-api-cli.options.js +2 -1
  10. package/schematics/java/client-core/schema.d.ts +3 -3
  11. package/schematics/java/client-core/schema.d.ts.map +1 -1
  12. package/schematics/java/client-core/swagger-codegen-java-client/target/javaClient-swagger-codegen-tests.jar +0 -0
  13. package/schematics/java/client-core/swagger-codegen-java-client/target/javaClient-swagger-codegen.jar +0 -0
  14. package/schematics/ng-add/schema.d.ts +3 -3
  15. package/schematics/ng-add/schema.d.ts.map +1 -1
  16. package/schematics/typescript/core/index.d.ts.map +1 -1
  17. package/schematics/typescript/core/index.js +2 -1
  18. package/schematics/typescript/core/openapi-codegen-typescript/target/typescriptFetch-openapi-generator-tests.jar +0 -0
  19. package/schematics/typescript/core/openapi-codegen-typescript/target/typescriptFetch-openapi-generator.jar +0 -0
  20. package/schematics/typescript/core/schema.d.ts +13 -5
  21. package/schematics/typescript/core/schema.d.ts.map +1 -1
  22. package/schematics/typescript/core/schema.json +5 -3
  23. package/schematics/typescript/mock/schema.d.ts +2 -2
  24. package/schematics/typescript/mock/schema.d.ts.map +1 -1
  25. package/schematics/typescript/shell/schema.d.ts +6 -6
  26. package/schematics/typescript/shell/schema.d.ts.map +1 -1
  27. package/schematics/typescript/shell/schema.json +4 -4
  28. package/schematics/typescript/shell/templates/base/package.json.template +1 -1
package/README.md CHANGED
@@ -75,3 +75,19 @@ yarn schematics @ama-sdk/schematics:java-client-core --spec-path ./swagger-spec.
75
75
  ```
76
76
 
77
77
  [Default swagger config](./schematics/java/client-core/swagger-codegen-java-client/config/swagger-codegen-config.json) will be used if `--swagger-config-path` is not provided.
78
+
79
+ ### Debug the typescript generator
80
+ The OpenApi generator extracts an enhanced JSON data model from the specification YAML and uses this data model to feed the templates to generate the code.
81
+ If there is an issue with the files generated with the spec provided, the generator provides debugging features that log this data model.
82
+
83
+ You can use global property options to pass one or both of the following options:
84
+ * debugModel - logs the full JSON structure used to generate models
85
+ * debugOperations - logs the full JSON structure used to generate operations
86
+
87
+ Example:
88
+ ```shell
89
+ yarn schematics @ama-sdk/schematics:typescript-core --spec-path ./swagger-spec.yaml --global-property debugModels,debugOperations
90
+ ```
91
+ You can also use npx instead of yarn in the command.
92
+
93
+ You can correlate this data model with the [templates](https://github.com/AmadeusITGroup/otter/tree/main/packages/%40ama-sdk/schematics/schematics/typescript/core/openapi-codegen-typescript/src/main/resources/typescriptFetch) used by the generator.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ama-sdk/schematics",
3
- "version": "9.1.0-alpha.2",
3
+ "version": "9.1.0-alpha.21",
4
4
  "description": "Swagger specification SDK Generator by schematics",
5
5
  "scripts": {
6
6
  "nx": "nx",
@@ -41,7 +41,7 @@
41
41
  }
42
42
  },
43
43
  "peerDependencies": {
44
- "@ama-sdk/core": "^9.1.0-alpha.2",
44
+ "@ama-sdk/core": "^9.1.0-alpha.21",
45
45
  "@angular-devkit/core": "~16.0.5",
46
46
  "@angular-devkit/schematics": "~16.0.5",
47
47
  "@angular-devkit/schematics-cli": "~16.0.5",
@@ -52,7 +52,7 @@
52
52
  "dependencies": {
53
53
  "@angular-devkit/core": "~16.0.5",
54
54
  "@angular-devkit/schematics": "~16.0.5",
55
- "@o3r/dev-tools": "^9.1.0-alpha.2",
55
+ "@o3r/dev-tools": "^9.1.0-alpha.21",
56
56
  "js-yaml": "^4.1.0",
57
57
  "minimatch": "^9.0.0",
58
58
  "rxjs": "^7.8.1",
@@ -61,14 +61,14 @@
61
61
  "tslib": "^2.5.3"
62
62
  },
63
63
  "devDependencies": {
64
- "@ama-sdk/core": "^9.1.0-alpha.2",
64
+ "@ama-sdk/core": "^9.1.0-alpha.21",
65
65
  "@angular-devkit/schematics-cli": "~16.0.5",
66
66
  "@angular-eslint/eslint-plugin": "~16.0.3",
67
67
  "@angular/cli": "~16.0.5",
68
68
  "@nx/jest": "~16.5.0",
69
- "@o3r/build-helpers": "^9.1.0-alpha.2",
70
- "@o3r/eslint-plugin": "^9.1.0-alpha.2",
71
- "@o3r/schematics": "^9.1.0-alpha.2",
69
+ "@o3r/build-helpers": "^9.1.0-alpha.21",
70
+ "@o3r/eslint-plugin": "^9.1.0-alpha.21",
71
+ "@o3r/schematics": "^9.1.0-alpha.21",
72
72
  "@openapitools/openapi-generator-cli": "~2.7.0",
73
73
  "@schematics/angular": "~16.0.5",
74
74
  "@types/jest": "~29.5.2",
@@ -89,6 +89,7 @@
89
89
  "eslint-plugin-unicorn": "^47.0.0",
90
90
  "isomorphic-fetch": "~3.0.0",
91
91
  "jest": "~29.6.0",
92
+ "jest-junit": "^16.0.0",
92
93
  "mem-fs": "^2.2.1",
93
94
  "npm-run-all": "^4.1.5",
94
95
  "nx": "~16.5.0",
@@ -1,5 +1,5 @@
1
- import { JsonObject } from '@angular-devkit/core';
2
- export interface NgGenerateApiExtensionSchematicsSchema extends JsonObject {
1
+ import type { SchematicOptionObject } from '@o3r/schematics';
2
+ export interface NgGenerateApiExtensionSchematicsSchema extends SchematicOptionObject {
3
3
  /** Extension Name */
4
4
  name: string;
5
5
  /** Type of the core API to extend */
@@ -1 +1 @@
1
- {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../schematics/api-extension/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAElD,MAAM,WAAW,sCAAuC,SAAQ,UAAU;IACxE,qBAAqB;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,qCAAqC;IACrC,QAAQ,EAAE,SAAS,GAAG,QAAQ,CAAC;IAC/B,wCAAwC;IACxC,WAAW,EAAE,MAAM,CAAC;CACrB"}
1
+ {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../schematics/api-extension/schema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAE7D,MAAM,WAAW,sCAAuC,SAAQ,qBAAqB;IACnF,qBAAqB;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,qCAAqC;IACrC,QAAQ,EAAE,SAAS,GAAG,QAAQ,CAAC;IAC/B,wCAAwC;IACxC,WAAW,EAAE,MAAM,CAAC;CACrB"}
@@ -1 +1 @@
1
- {"version":3,"file":"open-api-cli.generator.d.ts","sourceRoot":"","sources":["../../../../schematics/code-generator/open-api-cli-generator/open-api-cli.generator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,aAAa,EAAC,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAAoC,iBAAiB,EAAC,MAAM,wBAAwB,CAAC;AAI5F;;GAEG;AACH,qBAAa,mBAAoB,SAAQ,aAAa,CAAC,iBAAiB,CAAC;IAEvE,SAAS,CAAC,QAAQ,CAAC,cAAc,EAAE,KAAK,GAAG,MAAM,CAAC;IAClD,SAAS,KAAK,oBAAoB,IAAI,KAAK,GAAG,MAAM,CAEnD;IAED,kBAAkB;IAClB,SAAS,CAAC,QAAQ,CAAC,aAAa,6BAA6B;gBAEjD,OAAO,CAAC,EAAE;QAAE,cAAc,CAAC,EAAE,KAAK,GAAG,MAAM,GAAG,EAAE,CAAA;KAAE;IAK9D;;;;;OAKG;IACH,OAAO,CAAC,0BAA0B;IAelC;;;;;OAKG;IACH,OAAO,CAAC,YAAY;IAsBpB,kBAAkB;IAClB,SAAS,CAAC,iBAAiB,0BAA2C;IAEtE,kBAAkB;IAClB,SAAS,CAAC,uBAAuB,oBAAoB;QAAE,aAAa,CAAC,EAAE,MAAM,CAAA;KAAE,yBAI5C,iBAAiB,wBAclD;CACH"}
1
+ {"version":3,"file":"open-api-cli.generator.d.ts","sourceRoot":"","sources":["../../../../schematics/code-generator/open-api-cli-generator/open-api-cli.generator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,aAAa,EAAC,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAAoC,iBAAiB,EAAC,MAAM,wBAAwB,CAAC;AAI5F;;GAEG;AACH,qBAAa,mBAAoB,SAAQ,aAAa,CAAC,iBAAiB,CAAC;IAEvE,SAAS,CAAC,QAAQ,CAAC,cAAc,EAAE,KAAK,GAAG,MAAM,CAAC;IAClD,SAAS,KAAK,oBAAoB,IAAI,KAAK,GAAG,MAAM,CAEnD;IAED,kBAAkB;IAClB,SAAS,CAAC,QAAQ,CAAC,aAAa,6BAA6B;gBAEjD,OAAO,CAAC,EAAE;QAAE,cAAc,CAAC,EAAE,KAAK,GAAG,MAAM,GAAG,EAAE,CAAA;KAAE;IAK9D;;;;;OAKG;IACH,OAAO,CAAC,0BAA0B;IAelC;;;;;OAKG;IACH,OAAO,CAAC,YAAY;IAuBpB,kBAAkB;IAClB,SAAS,CAAC,iBAAiB,0BAA2C;IAEtE,kBAAkB;IAClB,SAAS,CAAC,uBAAuB,oBAAoB;QAAE,aAAa,CAAC,EAAE,MAAM,CAAA;KAAE,yBAI5C,iBAAiB,wBAclD;CACH"}
@@ -73,7 +73,8 @@ class OpenApiCliGenerator extends code_generator_1.CodeGenerator {
73
73
  '-g', generatorOptions.generatorName,
74
74
  '-i', generatorOptions.specPath,
75
75
  ...generatorOptions.specConfigPath ? ['-c', generatorOptions.specConfigPath] : [],
76
- '-o', generatorOptions.outputPath
76
+ '-o', generatorOptions.outputPath,
77
+ ...generatorOptions.globalProperty ? ['--global-property', generatorOptions.globalProperty] : []
77
78
  ];
78
79
  return new Promise((resolve, reject) => {
79
80
  (0, node_child_process_1.spawn)(this.packageManagerRunner, args, spawnOptions)
@@ -10,7 +10,7 @@ export type OpenApiCliOptions = CodegenTaskOptions & {
10
10
  * - the one defined in your openapitools.json
11
11
  * - the latest version if openapitools.json is missing
12
12
  *
13
- * @default null
13
+ * @default ''
14
14
  */
15
15
  generatorVersion: string;
16
16
  /**
@@ -25,6 +25,15 @@ export type OpenApiCliOptions = CodegenTaskOptions & {
25
25
  * @default path to our own custom typescript generator
26
26
  */
27
27
  generatorCustomPath: string;
28
+ /**
29
+ * Comma separated string of options to give to the openapi-generator-cli
30
+ *
31
+ * @example debugModels to log the full json structure used to generate models
32
+ * @example debugOperations to log the full json structure used to generate operations
33
+ *
34
+ * @default ''
35
+ */
36
+ globalProperty: string;
28
37
  };
29
38
  /**
30
39
  * Default options to run our custom typescript generator
@@ -1 +1 @@
1
- {"version":3,"file":"open-api-cli.options.d.ts","sourceRoot":"","sources":["../../../../schematics/code-generator/open-api-cli-generator/open-api-cli.options.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,kBAAkB,EAAC,MAAM,mBAAmB,CAAC;AAGrD;;;GAGG;AACH,MAAM,MAAM,iBAAiB,GAAG,kBAAkB,GAAG;IACnD;;;;;;;OAOG;IACH,gBAAgB,EAAE,MAAM,CAAC;IACzB;;;;OAIG;IACH,aAAa,EAAE,MAAM,CAAC;IACtB;;;;OAIG;IACH,mBAAmB,EAAE,MAAM,CAAC;CAC7B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,iCAAiC,EAAE,iBAO/C,CAAC"}
1
+ {"version":3,"file":"open-api-cli.options.d.ts","sourceRoot":"","sources":["../../../../schematics/code-generator/open-api-cli-generator/open-api-cli.options.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,kBAAkB,EAAC,MAAM,mBAAmB,CAAC;AAGrD;;;GAGG;AACH,MAAM,MAAM,iBAAiB,GAAG,kBAAkB,GAAG;IACnD;;;;;;;OAOG;IACH,gBAAgB,EAAE,MAAM,CAAC;IACzB;;;;OAIG;IACH,aAAa,EAAE,MAAM,CAAC;IACtB;;;;OAIG;IACH,mBAAmB,EAAE,MAAM,CAAC;IAC5B;;;;;;;OAOG;IACH,cAAc,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,iCAAiC,EAAE,iBAQ/C,CAAC"}
@@ -11,6 +11,7 @@ exports.defaultTypescriptGeneratorOptions = {
11
11
  generatorCustomPath: path.join(__dirname, '..', '..', 'typescript', 'core', 'openapi-codegen-typescript', 'target', 'typescriptFetch-openapi-generator.jar'),
12
12
  specPath: 'swagger-spec.yaml',
13
13
  outputPath: '.',
14
- specConfigPath: ''
14
+ specConfigPath: '',
15
+ globalProperty: ''
15
16
  };
16
17
  //# sourceMappingURL=open-api-cli.options.js.map
@@ -1,8 +1,8 @@
1
- import { JsonObject } from '@angular-devkit/core';
2
- export interface NgGenerateJavaClientCoreSchematicsSchema extends JsonObject {
1
+ import type { SchematicOptionObject } from '@o3r/schematics';
2
+ export interface NgGenerateJavaClientCoreSchematicsSchema extends SchematicOptionObject {
3
3
  /** Path to the swagger specification used to generate the SDK */
4
4
  specPath: string;
5
5
  /** Swagger config file */
6
- specConfigPath: string | null;
6
+ specConfigPath: string | undefined;
7
7
  }
8
8
  //# sourceMappingURL=schema.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../schematics/java/client-core/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAElD,MAAM,WAAW,wCAAyC,SAAQ,UAAU;IAC1E,iEAAiE;IACjE,QAAQ,EAAE,MAAM,CAAC;IAEjB,0BAA0B;IAC1B,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;CAC/B"}
1
+ {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../schematics/java/client-core/schema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAE7D,MAAM,WAAW,wCAAyC,SAAQ,qBAAqB;IACrF,iEAAiE;IACjE,QAAQ,EAAE,MAAM,CAAC;IAEjB,0BAA0B;IAC1B,cAAc,EAAE,MAAM,GAAG,SAAS,CAAC;CACpC"}
@@ -1,6 +1,6 @@
1
- import type { JsonObject } from '@angular-devkit/core';
2
- export interface NgAddSchematicsSchema extends JsonObject {
1
+ import type { SchematicOptionObject } from '@o3r/schematics';
2
+ export interface NgAddSchematicsSchema extends SchematicOptionObject {
3
3
  /** Project name */
4
- projectName: string | null;
4
+ projectName: string | undefined;
5
5
  }
6
6
  //# sourceMappingURL=schema.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../schematics/ng-add/schema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAEvD,MAAM,WAAW,qBAAsB,SAAQ,UAAU;IACvD,mBAAmB;IACnB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5B"}
1
+ {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../schematics/ng-add/schema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAE7D,MAAM,WAAW,qBAAsB,SAAQ,qBAAqB;IAClE,mBAAmB;IACnB,WAAW,EAAE,MAAM,GAAG,SAAS,CAAC;CACjC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../schematics/typescript/core/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAOL,IAAI,EAKL,MAAM,4BAA4B,CAAC;AASpC,OAAO,EAAE,2CAA2C,EAAE,MAAM,UAAU,CAAC;AAgBvE;;;;GAIG;AACH,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,2CAA2C,GAAG,IAAI,CA+GlG"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../schematics/typescript/core/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAOL,IAAI,EAKL,MAAM,4BAA4B,CAAC;AASpC,OAAO,EAAE,2CAA2C,EAAE,MAAM,UAAU,CAAC;AAgBvE;;;;GAIG;AACH,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,2CAA2C,GAAG,IAAI,CAgHlG"}
@@ -25,6 +25,7 @@ const getPathObjectTemplate = (pathObj) => {
25
25
  function ngGenerateTypescriptSDK(options) {
26
26
  const specPath = path.resolve(process.cwd(), options.specPath);
27
27
  const targetPath = options.directory || '/';
28
+ const globalProperty = options.globalProperty;
28
29
  const generateOperationFinder = async () => {
29
30
  const swayOptions = {
30
31
  definition: path.resolve(options.specPath)
@@ -100,7 +101,7 @@ function ngGenerateTypescriptSDK(options) {
100
101
  return () => tree;
101
102
  };
102
103
  const runGeneratorRule = (tree, context) => {
103
- const generatorOptions = { specPath };
104
+ const generatorOptions = { specPath, globalProperty };
104
105
  const packageJsonFile = JSON.parse(((0, node_fs_1.readFileSync)(path.join(__dirname, '..', '..', '..', 'package.json'))).toString());
105
106
  const packageOpenApiSupportedVersion = packageJsonFile.openApiSupportedVersion?.replace(/\^|~/, '');
106
107
  let openApiVersion = '';
@@ -1,12 +1,20 @@
1
- import type { JsonObject } from '@angular-devkit/core';
2
- export interface NgGenerateTypescriptSDKCoreSchematicsSchema extends JsonObject {
1
+ import type { SchematicOptionObject } from '@o3r/schematics';
2
+ export interface NgGenerateTypescriptSDKCoreSchematicsSchema extends SchematicOptionObject {
3
3
  /** Path to the swagger specification used to generate the SDK */
4
4
  specPath: string;
5
5
  /** Directory where to generate the SDK */
6
- directory: string | null;
6
+ directory: string | undefined;
7
7
  /** Package manager to be used in the generated SDK */
8
- packageManager: 'npm' | 'yarn' | '';
8
+ packageManager: 'npm' | 'yarn' | undefined;
9
9
  /** Path to the spec generation configuration */
10
- specConfigPath: string | null;
10
+ specConfigPath: string | undefined;
11
+ /**
12
+ * Comma separated string of options to give to the openapi-generator-cli
13
+ *
14
+ * @example debugModels to log the full json structure used to generate models
15
+ * @example debugOperations to log the full json structure used to generate operations
16
+ * @default ''
17
+ */
18
+ globalProperty: string | undefined;
11
19
  }
12
20
  //# sourceMappingURL=schema.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../schematics/typescript/core/schema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAEvD,MAAM,WAAW,2CAA4C,SAAQ,UAAU;IAC7E,iEAAiE;IACjE,QAAQ,EAAE,MAAM,CAAC;IAEjB,0CAA0C;IAC1C,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IAEzB,sDAAsD;IACtD,cAAc,EAAE,KAAK,GAAG,MAAM,GAAG,EAAE,CAAC;IAEpC,gDAAgD;IAChD,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;CAC/B"}
1
+ {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../schematics/typescript/core/schema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAE7D,MAAM,WAAW,2CAA4C,SAAQ,qBAAqB;IACxF,iEAAiE;IACjE,QAAQ,EAAE,MAAM,CAAC;IAEjB,0CAA0C;IAC1C,SAAS,EAAE,MAAM,GAAG,SAAS,CAAC;IAE9B,sDAAsD;IACtD,cAAc,EAAE,KAAK,GAAG,MAAM,GAAG,SAAS,CAAC;IAE3C,gDAAgD;IAChD,cAAc,EAAE,MAAM,GAAG,SAAS,CAAC;IAEnC;;;;;;OAMG;IACH,cAAc,EAAE,MAAM,GAAG,SAAS,CAAC;CACpC"}
@@ -24,12 +24,14 @@
24
24
  "packageManager": {
25
25
  "type": "string",
26
26
  "enum": [
27
- "",
28
27
  "npm",
29
28
  "yarn"
30
29
  ],
31
- "description": "Package manager to be used in the generated SDK",
32
- "default": ""
30
+ "description": "Package manager to be used in the generated SDK"
31
+ },
32
+ "globalProperty": {
33
+ "type": "string",
34
+ "description": "Comma separated string of options to give to the openapi-generator-cli"
33
35
  }
34
36
  },
35
37
  "additionalProperties": true,
@@ -1,5 +1,5 @@
1
- import type { JsonObject } from '@angular-devkit/core';
2
- export interface NgGenerateMockSchematicsSchema extends JsonObject {
1
+ import type { SchematicOptionObject } from '@o3r/schematics';
2
+ export interface NgGenerateMockSchematicsSchema extends SchematicOptionObject {
3
3
  /** Name of the api model to generate */
4
4
  apiModel: string;
5
5
  /** True if the api model has a property id */
@@ -1 +1 @@
1
- {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../schematics/typescript/mock/schema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,sBAAsB,CAAC;AAErD,MAAM,WAAW,8BAA+B,SAAQ,UAAU;IAChE,wCAAwC;IACxC,QAAQ,EAAE,MAAM,CAAC;IAEjB,8CAA8C;IAC9C,UAAU,EAAE,OAAO,CAAC;IAEpB,0DAA0D;IAC1D,IAAI,EAAE,MAAM,CAAC;IAEb,8BAA8B;IAC9B,WAAW,EAAE,MAAM,CAAC;CACrB"}
1
+ {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../schematics/typescript/mock/schema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAE7D,MAAM,WAAW,8BAA+B,SAAQ,qBAAqB;IAC3E,wCAAwC;IACxC,QAAQ,EAAE,MAAM,CAAC;IAEjB,8CAA8C;IAC9C,UAAU,EAAE,OAAO,CAAC;IAEpB,0DAA0D;IAC1D,IAAI,EAAE,MAAM,CAAC;IAEb,8BAA8B;IAC9B,WAAW,EAAE,MAAM,CAAC;CACrB"}
@@ -1,13 +1,13 @@
1
- import type { JsonObject } from '@angular-devkit/core';
2
- export interface NgGenerateTypescriptSDKShellSchematicsSchema extends JsonObject {
3
- /** Project name (NPM package scope) */
1
+ import type { SchematicOptionObject } from '@o3r/schematics';
2
+ export interface NgGenerateTypescriptSDKShellSchematicsSchema extends SchematicOptionObject {
3
+ /** Project name (NPM package scope, package.json name will be @{projectName}/{packageName}) */
4
4
  name: string;
5
- /** Package name */
5
+ /** Package name (package.json name will be @{projectName}/{packageName}) */
6
6
  package: string;
7
7
  /** Project description */
8
- description: string | null;
8
+ description: string | undefined;
9
9
  /** Directory where to generate the SDK */
10
- directory: string | null;
10
+ directory: string | undefined;
11
11
  /** Package manager to be used in the generated SDK */
12
12
  packageManager: 'npm' | 'yarn' | '';
13
13
  /** Skip NPM install */
@@ -1 +1 @@
1
- {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../schematics/typescript/shell/schema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAEvD,MAAM,WAAW,4CAA6C,SAAQ,UAAU;IAC9E,uCAAuC;IACvC,IAAI,EAAE,MAAM,CAAC;IAEb,mBAAmB;IACnB,OAAO,EAAE,MAAM,CAAC;IAEhB,0BAA0B;IAC1B,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAE3B,0CAA0C;IAC1C,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IAEzB,sDAAsD;IACtD,cAAc,EAAE,KAAK,GAAG,MAAM,GAAG,EAAE,CAAC;IAEpC,uBAAuB;IACvB,WAAW,EAAE,OAAO,CAAC;CACtB"}
1
+ {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../schematics/typescript/shell/schema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAE7D,MAAM,WAAW,4CAA6C,SAAQ,qBAAqB;IACzF,+FAA+F;IAC/F,IAAI,EAAE,MAAM,CAAC;IAEb,4EAA4E;IAC5E,OAAO,EAAE,MAAM,CAAC;IAEhB,0BAA0B;IAC1B,WAAW,EAAE,MAAM,GAAG,SAAS,CAAC;IAEhC,0CAA0C;IAC1C,SAAS,EAAE,MAAM,GAAG,SAAS,CAAC;IAE9B,sDAAsD;IACtD,cAAc,EAAE,KAAK,GAAG,MAAM,GAAG,EAAE,CAAC;IAEpC,uBAAuB;IACvB,WAAW,EAAE,OAAO,CAAC;CACtB"}
@@ -6,13 +6,13 @@
6
6
  "properties": {
7
7
  "name": {
8
8
  "type": "string",
9
- "description": "Project name (NPM package scope)",
10
- "x-prompt": "Project name (NPM package scope)?"
9
+ "description": "Project name (NPM package scope, package.json name will be @{projectName}/{packageName})",
10
+ "x-prompt": "Project name (NPM package scope, package.json name will be @{projectName}/{packageName})?"
11
11
  },
12
12
  "package": {
13
13
  "type": "string",
14
- "description": "Package name",
15
- "x-prompt": "Package name?",
14
+ "description": "Package name (package.json name will be @{projectName}/{packageName})",
15
+ "x-prompt": "Package name (package.json name will be @{projectName}/{packageName})?",
16
16
  "default": "sdk"
17
17
  },
18
18
  "description": {
@@ -100,7 +100,7 @@
100
100
  "jest-junit": "^16.0.0",
101
101
  "lint-staged": "^13.0.0",
102
102
  "minimist": "^1.2.6",
103
- "rimraf": "^5.0.0",
103
+ "rimraf": "^5.0.1",
104
104
  "standard-version": "^9.0.0",
105
105
  "ts-jest": "<%= versions['ts-jest'] %>",
106
106
  "typedoc": "~0.24.0",