@rxap/plugin-open-api 16.1.1-dev.0 → 16.1.1-dev.2
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/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,18 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [16.1.1-dev.2](https://gitlab.com/rxap/packages/compare/@rxap/plugin-open-api@16.1.1-dev.1...@rxap/plugin-open-api@16.1.1-dev.2) (2024-03-26)
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
- only generate index.ts if export is set to true ([89bb181](https://gitlab.com/rxap/packages/commit/89bb1816764e1f23bc317b2dd9f6f7c0601b947d))
|
|
11
|
+
|
|
12
|
+
## [16.1.1-dev.1](https://gitlab.com/rxap/packages/compare/@rxap/plugin-open-api@16.1.1-dev.0...@rxap/plugin-open-api@16.1.1-dev.1) (2024-03-26)
|
|
13
|
+
|
|
14
|
+
### Bug Fixes
|
|
15
|
+
|
|
16
|
+
- reduce the code duplication when generating the open api client sdk files ([1ea4ac1](https://gitlab.com/rxap/packages/commit/1ea4ac1beb38ddf9d404c72698d1a582bb8d9837)), closes [#36](https://gitlab.com/rxap/packages/issues/36)
|
|
17
|
+
|
|
6
18
|
## [16.1.1-dev.0](https://gitlab.com/rxap/packages/compare/@rxap/plugin-open-api@16.1.0...@rxap/plugin-open-api@16.1.1-dev.0) (2024-03-11)
|
|
7
19
|
|
|
8
20
|
**Note:** Version bump only for package @rxap/plugin-open-api
|
package/README.md
CHANGED
|
@@ -19,7 +19,7 @@ yarn add @rxap/plugin-open-api
|
|
|
19
19
|
```
|
|
20
20
|
**Install peer dependencies:**
|
|
21
21
|
```bash
|
|
22
|
-
yarn add @nx/devkit@^16.5.0 @rxap/generator-utilities@^1.1.1-dev.
|
|
22
|
+
yarn add @nx/devkit@^16.5.0 @rxap/generator-utilities@^1.1.1-dev.1 @rxap/node-utilities@^1.2.0-dev.0 @rxap/plugin-library@^16.1.0-dev.8 @rxap/plugin-utilities@^16.1.1-dev.3 @rxap/utilities@^16.1.0-dev.8 @rxap/workspace-open-api@^16.0.2-dev.2 @rxap/workspace-ts-morph@^16.0.2-dev.2 @rxap/workspace-utilities@^16.1.0-dev.4 tslib@2.6.2
|
|
23
23
|
```
|
|
24
24
|
# Generators
|
|
25
25
|
|
package/package.json
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "16.1.1-dev.
|
|
2
|
+
"version": "16.1.1-dev.2",
|
|
3
3
|
"name": "@rxap/plugin-open-api",
|
|
4
4
|
"license": "GPL-3.0-or-later",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@apidevtools/json-schema-ref-parser": "9.0.9",
|
|
7
|
+
"colors": "1.4.0",
|
|
7
8
|
"handlebars": "4.7.7",
|
|
8
9
|
"ignore": "5.2.4",
|
|
9
10
|
"openapi-types": "10.0.0",
|
|
@@ -15,18 +16,18 @@
|
|
|
15
16
|
},
|
|
16
17
|
"peerDependencies": {
|
|
17
18
|
"@nx/devkit": "^16.5.0",
|
|
18
|
-
"@rxap/generator-utilities": "^1.1.1-dev.
|
|
19
|
-
"@rxap/node-utilities": "^1.
|
|
20
|
-
"@rxap/plugin-library": "^16.1.0-dev.
|
|
21
|
-
"@rxap/plugin-utilities": "^16.1.1-dev.
|
|
22
|
-
"@rxap/utilities": "^16.1.0-dev.
|
|
23
|
-
"@rxap/workspace-open-api": "^16.0.2-dev.
|
|
24
|
-
"@rxap/workspace-ts-morph": "^16.0.2-dev.
|
|
25
|
-
"@rxap/workspace-utilities": "^16.1.0-dev.
|
|
19
|
+
"@rxap/generator-utilities": "^1.1.1-dev.1",
|
|
20
|
+
"@rxap/node-utilities": "^1.2.0-dev.0",
|
|
21
|
+
"@rxap/plugin-library": "^16.1.0-dev.8",
|
|
22
|
+
"@rxap/plugin-utilities": "^16.1.1-dev.3",
|
|
23
|
+
"@rxap/utilities": "^16.1.0-dev.8",
|
|
24
|
+
"@rxap/workspace-open-api": "^16.0.2-dev.2",
|
|
25
|
+
"@rxap/workspace-ts-morph": "^16.0.2-dev.2",
|
|
26
|
+
"@rxap/workspace-utilities": "^16.1.0-dev.4",
|
|
26
27
|
"tslib": "2.6.2",
|
|
27
28
|
"@rxap/generator-ts-morph": "1.0.2-dev.0",
|
|
28
|
-
"@rxap/json-schema-to-typescript": "16.0.1-dev.
|
|
29
|
-
"@rxap/ts-morph": "1.1.0-dev.
|
|
29
|
+
"@rxap/json-schema-to-typescript": "16.0.1-dev.5",
|
|
30
|
+
"@rxap/ts-morph": "1.1.0-dev.21"
|
|
30
31
|
},
|
|
31
32
|
"author": {
|
|
32
33
|
"name": "Merzough Münker",
|
|
@@ -51,35 +52,35 @@
|
|
|
51
52
|
"packageGroup": [
|
|
52
53
|
{
|
|
53
54
|
"package": "@rxap/generator-utilities",
|
|
54
|
-
"version": "1.1.
|
|
55
|
+
"version": "1.1.1-dev.1"
|
|
55
56
|
},
|
|
56
57
|
{
|
|
57
58
|
"package": "@rxap/node-utilities",
|
|
58
|
-
"version": "1.
|
|
59
|
+
"version": "1.2.0-dev.0"
|
|
59
60
|
},
|
|
60
61
|
{
|
|
61
62
|
"package": "@rxap/plugin-library",
|
|
62
|
-
"version": "16.0.
|
|
63
|
+
"version": "16.1.0-dev.8"
|
|
63
64
|
},
|
|
64
65
|
{
|
|
65
66
|
"package": "@rxap/plugin-utilities",
|
|
66
|
-
"version": "16.1.
|
|
67
|
+
"version": "16.1.1-dev.3"
|
|
67
68
|
},
|
|
68
69
|
{
|
|
69
70
|
"package": "@rxap/utilities",
|
|
70
|
-
"version": "16.0.
|
|
71
|
+
"version": "16.1.0-dev.8"
|
|
71
72
|
},
|
|
72
73
|
{
|
|
73
74
|
"package": "@rxap/workspace-open-api",
|
|
74
|
-
"version": "16.0.
|
|
75
|
+
"version": "16.0.2-dev.2"
|
|
75
76
|
},
|
|
76
77
|
{
|
|
77
78
|
"package": "@rxap/workspace-ts-morph",
|
|
78
|
-
"version": "16.0.
|
|
79
|
+
"version": "16.0.2-dev.2"
|
|
79
80
|
},
|
|
80
81
|
{
|
|
81
82
|
"package": "@rxap/workspace-utilities",
|
|
82
|
-
"version": "16.0.
|
|
83
|
+
"version": "16.1.0-dev.4"
|
|
83
84
|
}
|
|
84
85
|
]
|
|
85
86
|
},
|
|
@@ -93,7 +94,7 @@
|
|
|
93
94
|
"directory": "packages/plugin/open-api"
|
|
94
95
|
},
|
|
95
96
|
"type": "commonjs",
|
|
96
|
-
"gitHead": "
|
|
97
|
+
"gitHead": "4f547dc16bf9355ba0fe694be4983b103906d7ca",
|
|
97
98
|
"main": "./src/index.js",
|
|
98
99
|
"types": "./src/index.d.ts"
|
|
99
100
|
}
|
|
@@ -13,8 +13,8 @@ function generateGenerator(tree, options) {
|
|
|
13
13
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
14
14
|
console.log('loading openapi config');
|
|
15
15
|
const openapi = yield (0, workspace_open_api_1.LoadOpenApiConfig)(tree, options);
|
|
16
|
-
console.log('resolve all schema refs');
|
|
17
|
-
|
|
16
|
+
// console.log('resolve all schema refs');
|
|
17
|
+
// ResolveRef(openapi, openapi.paths);
|
|
18
18
|
if (options.inline !== false) {
|
|
19
19
|
options.inline = true;
|
|
20
20
|
}
|
|
@@ -67,7 +67,12 @@ function generateGenerator(tree, options) {
|
|
|
67
67
|
project: options.project,
|
|
68
68
|
entrypoint: options.packageName ? 'nest' : undefined,
|
|
69
69
|
}, project => (0, workspace_open_api_1.GenerateOperation)(openapi, project, options, nestGeneratorFunctionList));
|
|
70
|
-
|
|
70
|
+
if (options.export) {
|
|
71
|
+
yield (0, plugin_library_1.LibraryIndexExportGenerator)(tree, { projects: [options.project] });
|
|
72
|
+
}
|
|
73
|
+
else {
|
|
74
|
+
tree.write((0, path_1.join)((0, workspace_utilities_1.GetProjectSourceRoot)(tree, projectName), 'index.ts'), 'export {};');
|
|
75
|
+
}
|
|
71
76
|
});
|
|
72
77
|
}
|
|
73
78
|
exports.generateGenerator = generateGenerator;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../../../packages/plugin/open-api/src/generators/generate/generator.ts"],"names":[],"mappings":";;;;AACA,mEAAuD;AACvD,yDAAmE;AACnE,+CAA4C;AAC5C,
|
|
1
|
+
{"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../../../packages/plugin/open-api/src/generators/generate/generator.ts"],"names":[],"mappings":";;;;AACA,mEAAuD;AACvD,yDAAmE;AACnE,+CAA4C;AAC5C,iEAUkC;AAClC,iEAA0E;AAC1E,mEAKmC;AACnC,+BAA4B;AAG5B,SAAsB,iBAAiB,CACrC,IAAU,EACV,OAAgC;;QAGhC,OAAO,CAAC,GAAG,CAAC,wBAAwB,CAAC,CAAC;QACtC,MAAM,OAAO,GAAG,MAAM,IAAA,sCAAiB,EAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QACvD,0CAA0C;QAC1C,sCAAsC;QAEtC,IAAI,OAAO,CAAC,MAAM,KAAK,KAAK,EAAE;YAC5B,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;SACvB;QAED,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE;YACpB,OAAO,CAAC,OAAO,GAAG,UAAU,CAAC;SAC9B;QAED,IAAI,OAAO,CAAC,SAAS,EAAE;YACrB,OAAO,CAAC,SAAS,GAAG,OAAO,CAAC,SAAS,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,IAAA,qBAAS,EAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;SACzF;QAED,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE;YACnB,OAAO,CAAC,MAAM,GAAG,IAAA,gCAAU,EAAC,IAAI,EAAE,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