@rxap/schematics-open-api 16.0.0-dev.2 → 16.0.0-dev.4
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 +73 -215
- package/README.md +7 -6
- package/collection.json +9 -0
- package/package.json +50 -34
- package/src/index.d.ts +2 -27
- package/src/index.js +2 -29
- package/src/index.js.map +1 -1
- package/src/lib/clear-operation.js.map +1 -1
- package/src/lib/coerce-open-api-project.js +3 -3
- package/src/lib/coerce-open-api-project.js.map +1 -1
- package/src/lib/config.js.map +1 -1
- package/src/lib/generate-components.js +4 -1
- package/src/lib/generate-components.js.map +1 -1
- package/src/lib/generate-index-exports.js +1 -1
- package/src/lib/generate-index-exports.js.map +1 -1
- package/src/lib/generate-operation.js.map +1 -1
- package/src/lib/generate-parameters.js +6 -2
- package/src/lib/generate-parameters.js.map +1 -1
- package/src/lib/generate-request-body.js +5 -1
- package/src/lib/generate-request-body.js.map +1 -1
- package/src/lib/generate-response.js +5 -1
- package/src/lib/generate-response.js.map +1 -1
- package/src/lib/index.d.ts +11 -0
- package/src/lib/index.js +15 -0
- package/src/lib/index.js.map +1 -0
- package/src/lib/load-open-api-config.js.map +1 -1
- package/src/lib/types.js.map +1 -1
- package/src/lib/utilities/any-schema-object.js +1 -1
- package/src/lib/utilities/any-schema-object.js.map +1 -1
- package/src/lib/utilities/get-parameter-type.js.map +1 -1
- package/src/lib/utilities/get-reqeust-body.js +2 -2
- package/src/lib/utilities/get-reqeust-body.js.map +1 -1
- package/src/lib/utilities/get-request-body-type.js.map +1 -1
- package/src/lib/utilities/get-response-type.js.map +1 -1
- package/src/lib/utilities/get-response.js +5 -5
- package/src/lib/utilities/get-response.js.map +1 -1
- package/src/lib/utilities/has-operation-paramters.js.map +1 -1
- package/src/lib/utilities/has-operation-request-body.js.map +1 -1
- package/src/lib/utilities/http-request.js +3 -1
- package/src/lib/utilities/http-request.js.map +1 -1
- package/src/lib/utilities/ignore-operation.js.map +1 -1
- package/src/lib/utilities/index.d.ts +16 -0
- package/src/lib/utilities/index.js +20 -0
- package/src/lib/utilities/index.js.map +1 -0
- package/src/lib/utilities/is-collection-response.js.map +1 -1
- package/src/lib/utilities/is-http-method.js.map +1 -1
- package/src/lib/utilities/is-open-api-schema-from-path.js +2 -1
- package/src/lib/utilities/is-open-api-schema-from-path.js.map +1 -1
- package/src/lib/utilities/is-operation-object.js +1 -1
- package/src/lib/utilities/is-operation-object.js.map +1 -1
- package/src/lib/utilities/is-reference-object.js +1 -1
- package/src/lib/utilities/is-reference-object.js.map +1 -1
- package/src/lib/utilities/is-without-parameters.js.map +1 -1
- package/src/schematics/generate/coerce-open-api-project.d.ts +5 -0
- package/src/schematics/generate/coerce-open-api-project.js +52 -0
- package/src/schematics/generate/coerce-open-api-project.js.map +1 -0
- package/src/schematics/generate/const.d.ts +4 -0
- package/src/schematics/generate/const.js +8 -0
- package/src/schematics/generate/const.js.map +1 -0
- package/src/schematics/generate/create-directive.d.ts +2 -0
- package/src/schematics/generate/create-directive.js +292 -0
- package/src/schematics/generate/create-directive.js.map +1 -0
- package/src/schematics/generate/generate-openapi-provider.d.ts +3 -0
- package/src/schematics/generate/generate-openapi-provider.js +41 -0
- package/src/schematics/generate/generate-openapi-provider.js.map +1 -0
- package/src/schematics/generate/generate-remote-method.d.ts +3 -0
- package/src/schematics/generate/generate-remote-method.js +176 -0
- package/src/schematics/generate/generate-remote-method.js.map +1 -0
- package/src/schematics/generate/index.d.ts +3 -0
- package/src/schematics/generate/index.js +100 -0
- package/src/schematics/generate/index.js.map +1 -0
- package/src/schematics/generate/options.d.ts +14 -0
- package/src/schematics/generate/options.js +3 -0
- package/src/schematics/generate/options.js.map +1 -0
- package/src/schematics/generate/schema.d.ts +23 -0
- package/src/schematics/generate/schema.json +116 -0
- package/LICENSE +0 -630
- package/migration.json +0 -4
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const schematics_1 = require("@angular-devkit/schematics");
|
|
5
|
+
const path_1 = require("path");
|
|
6
|
+
const ts_morph_1 = require("ts-morph");
|
|
7
|
+
const schematics_ts_morph_1 = require("@rxap/schematics-ts-morph");
|
|
8
|
+
const schematics_utilities_1 = require("@rxap/schematics-utilities");
|
|
9
|
+
const generate_remote_method_1 = require("./generate-remote-method");
|
|
10
|
+
const const_1 = require("./const");
|
|
11
|
+
const coerce_open_api_project_1 = require("./coerce-open-api-project");
|
|
12
|
+
const generate_openapi_provider_1 = require("./generate-openapi-provider");
|
|
13
|
+
const utilities_1 = require("../../lib/utilities");
|
|
14
|
+
const load_open_api_config_1 = require("../../lib/load-open-api-config");
|
|
15
|
+
const types_1 = require("../../lib/types");
|
|
16
|
+
const config_1 = require("../../lib/config");
|
|
17
|
+
const clear_operation_1 = require("../../lib/clear-operation");
|
|
18
|
+
const generate_index_exports_1 = require("../../lib/generate-index-exports");
|
|
19
|
+
const generate_operation_1 = require("../../lib/generate-operation");
|
|
20
|
+
function GetOperationIdList(openapi) {
|
|
21
|
+
const operationIdList = [];
|
|
22
|
+
for (const [_, methods] of Object.entries(openapi.paths)) {
|
|
23
|
+
if (methods) {
|
|
24
|
+
for (const method of Object.keys(methods).filter(utilities_1.IsHttpMethod)) {
|
|
25
|
+
const operation = methods[method];
|
|
26
|
+
if ((0, utilities_1.IsOperationObject)(operation)) {
|
|
27
|
+
if ((0, utilities_1.IgnoreOperation)(['hidden'])(operation)) {
|
|
28
|
+
console.log(`Ignore operation '${operation.operationId}'`);
|
|
29
|
+
}
|
|
30
|
+
else {
|
|
31
|
+
if ((0, types_1.HasOperationId)(operation)) {
|
|
32
|
+
operationIdList.push(operation.operationId);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
return operationIdList;
|
|
40
|
+
}
|
|
41
|
+
function default_1(options) {
|
|
42
|
+
return (host) => tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
43
|
+
var _a, _b;
|
|
44
|
+
const openapi = yield (0, load_open_api_config_1.LoadOpenApiConfig)(host, options);
|
|
45
|
+
const project = new ts_morph_1.Project({
|
|
46
|
+
manipulationSettings: {
|
|
47
|
+
indentationText: ts_morph_1.IndentationText.TwoSpaces,
|
|
48
|
+
quoteKind: ts_morph_1.QuoteKind.Single,
|
|
49
|
+
useTrailingCommas: true,
|
|
50
|
+
},
|
|
51
|
+
useInMemoryFileSystem: true,
|
|
52
|
+
});
|
|
53
|
+
if (!options.project) {
|
|
54
|
+
options.project = 'open-api';
|
|
55
|
+
}
|
|
56
|
+
if (options.directory) {
|
|
57
|
+
options.directory = options.directory.split('/').map(item => (0, schematics_utilities_1.dasherize)(item)).join('/');
|
|
58
|
+
}
|
|
59
|
+
const projectName = `${options.directory ?
|
|
60
|
+
options.directory.split('/').join('-') + '-' :
|
|
61
|
+
''}${options.project}`;
|
|
62
|
+
const projectBasePath = (0, schematics_utilities_1.HasProject)(host, projectName) ?
|
|
63
|
+
(0, schematics_utilities_1.GetProjectSourceRoot)(host, projectName) :
|
|
64
|
+
`libs/${options.directory ? options.directory + '/' : ''}${options.project}/src`;
|
|
65
|
+
const basePath = (0, path_1.join)(projectBasePath, 'lib');
|
|
66
|
+
options.prefix = (_b = (_a = options.prefix) !== null && _a !== void 0 ? _a : ((0, schematics_utilities_1.HasProject)(host, projectName) ? (0, schematics_utilities_1.GetProjectPrefix)(host, projectName) : (0, schematics_utilities_1.GetDefaultPrefix)(host))) !== null && _b !== void 0 ? _b : 'rxap';
|
|
67
|
+
if (!options.debug) {
|
|
68
|
+
// TODO : reset the hack after the schematic execution is finished
|
|
69
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
70
|
+
console.debug = function () { };
|
|
71
|
+
}
|
|
72
|
+
const generatorFunctionList = [];
|
|
73
|
+
const clearPathList = [];
|
|
74
|
+
if (!options.skipRemoteMethod) {
|
|
75
|
+
generatorFunctionList.push(generate_remote_method_1.GenerateRemoteMethod);
|
|
76
|
+
clearPathList.push(const_1.REMOTE_METHOD_BASE_PATH);
|
|
77
|
+
}
|
|
78
|
+
return (0, schematics_1.chain)([
|
|
79
|
+
(0, clear_operation_1.ClearOperation)([
|
|
80
|
+
config_1.COMPONENTS_BASE_PATH, config_1.PARAMETER_BASE_PATH, config_1.RESPONSE_BASE_PATH, config_1.REQUEST_BODY_BASE_PATH, ...clearPathList,
|
|
81
|
+
], basePath),
|
|
82
|
+
(0, coerce_open_api_project_1.CoerceOpenApiProject)(options.project, options.prefix, options.directory),
|
|
83
|
+
() => tslib_1.__awaiter(this, void 0, void 0, function* () { yield (0, generate_operation_1.GenerateOperation)(openapi, project, options, generatorFunctionList); }),
|
|
84
|
+
() => options.skipProvider ? (0, schematics_1.noop)() : (0, generate_openapi_provider_1.GenerateOpenapiProvider)(project, GetOperationIdList(openapi), options),
|
|
85
|
+
(0, schematics_ts_morph_1.ApplyTsMorphProject)(project, basePath),
|
|
86
|
+
(0, schematics_ts_morph_1.FixMissingImports)(),
|
|
87
|
+
(tree) => {
|
|
88
|
+
const indexFile = (0, path_1.join)(projectBasePath, 'index.ts');
|
|
89
|
+
if (options.export) {
|
|
90
|
+
(0, schematics_utilities_1.CoerceFile)(tree, indexFile, (0, generate_index_exports_1.GenerateIndexExports)(project));
|
|
91
|
+
}
|
|
92
|
+
else {
|
|
93
|
+
(0, schematics_utilities_1.CoerceFile)(tree, indexFile, 'export {};');
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
]);
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
exports.default = default_1;
|
|
100
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../packages/schematic/open-api/src/schematics/generate/index.ts"],"names":[],"mappings":";;;AAAA,2DAKoC;AACpC,+BAA4B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AA,6CAAoB,EAAC,OAAO,CAAC,CAAC,CAAC;iBAC5D;qBAAM;oBACL,IAAA,iCAAU,EAAC,IAAI,EAAE,SAAS,EAAE,YAAY,CAAC,CAAC;iBAC3C;YACH,CAAC;SACF,CAAC,CAAC;IACL,CAAC,CAAA,CAAC;AACJ,CAAC;AArED,4BAqEC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { SourceFile } from 'ts-morph';
|
|
2
|
+
export interface CreateDirectiveRuleOptions {
|
|
3
|
+
filePath: string;
|
|
4
|
+
name: string;
|
|
5
|
+
prefix: string;
|
|
6
|
+
parametersType: string;
|
|
7
|
+
returnType: string;
|
|
8
|
+
template: boolean;
|
|
9
|
+
collection: boolean;
|
|
10
|
+
}
|
|
11
|
+
export interface CreateDirectiveOptions extends CreateDirectiveRuleOptions {
|
|
12
|
+
sourceFile: SourceFile;
|
|
13
|
+
withoutParameters: boolean;
|
|
14
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"options.js","sourceRoot":"","sources":["../../../../../../../packages/schematic/open-api/src/schematics/generate/options.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export interface OpenApiSchemaBase {
|
|
2
|
+
project: string;
|
|
3
|
+
transport?: 'amplify';
|
|
4
|
+
debug?: boolean;
|
|
5
|
+
prefix: string;
|
|
6
|
+
export: boolean;
|
|
7
|
+
serverId?: string;
|
|
8
|
+
inline: boolean;
|
|
9
|
+
directory?: string;
|
|
10
|
+
skipRemoteMethod: boolean;
|
|
11
|
+
skipProvider: boolean;
|
|
12
|
+
skipDirectives: boolean;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export interface OpenApiSchemaFromPath extends OpenApiSchemaBase {
|
|
16
|
+
path: string;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export interface OpenApiSchemaFromUrl extends OpenApiSchemaBase {
|
|
20
|
+
url: string;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export type OpenApiSchema = OpenApiSchemaFromPath | OpenApiSchemaFromUrl;
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/schema",
|
|
3
|
+
"$id": "open-api",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"description": "",
|
|
6
|
+
"properties": {},
|
|
7
|
+
"oneOf": [
|
|
8
|
+
{
|
|
9
|
+
"properties": {
|
|
10
|
+
"path": {
|
|
11
|
+
"type": "string",
|
|
12
|
+
"description": "The path to the openapi config",
|
|
13
|
+
"format": "path"
|
|
14
|
+
},
|
|
15
|
+
"project": {
|
|
16
|
+
"type": "string",
|
|
17
|
+
"description": "The target project where the data sources and remote methods should be generated.",
|
|
18
|
+
"default": "open-api"
|
|
19
|
+
},
|
|
20
|
+
"directory": {
|
|
21
|
+
"type": "string",
|
|
22
|
+
"description": "A directory where the library is placed."
|
|
23
|
+
},
|
|
24
|
+
"prefix": {
|
|
25
|
+
"type": "string"
|
|
26
|
+
},
|
|
27
|
+
"transport": {
|
|
28
|
+
"type": "string",
|
|
29
|
+
"enum": [
|
|
30
|
+
"amplify"
|
|
31
|
+
]
|
|
32
|
+
},
|
|
33
|
+
"export": {
|
|
34
|
+
"type": "boolean",
|
|
35
|
+
"description": "If true the index.ts of the select project will replaced with export statement for each generate file",
|
|
36
|
+
"default": false
|
|
37
|
+
},
|
|
38
|
+
"inline": {
|
|
39
|
+
"type": "boolean",
|
|
40
|
+
"default": false
|
|
41
|
+
},
|
|
42
|
+
"skipRemoteMethod": {
|
|
43
|
+
"type": "boolean",
|
|
44
|
+
"default": false
|
|
45
|
+
},
|
|
46
|
+
"skipProvider": {
|
|
47
|
+
"type": "boolean",
|
|
48
|
+
"default": false
|
|
49
|
+
},
|
|
50
|
+
"skipDirectives": {
|
|
51
|
+
"type": "boolean",
|
|
52
|
+
"default": false
|
|
53
|
+
},
|
|
54
|
+
"serverId": {
|
|
55
|
+
"type": "string"
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
"required": [
|
|
59
|
+
"path"
|
|
60
|
+
]
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"properties": {
|
|
64
|
+
"url": {
|
|
65
|
+
"type": "string",
|
|
66
|
+
"description": "The url to the openapi config"
|
|
67
|
+
},
|
|
68
|
+
"project": {
|
|
69
|
+
"type": "string",
|
|
70
|
+
"description": "The target project where the data sources and remote methods should be generated.",
|
|
71
|
+
"default": "open-api"
|
|
72
|
+
},
|
|
73
|
+
"directory": {
|
|
74
|
+
"type": "string",
|
|
75
|
+
"description": "A directory where the library is placed."
|
|
76
|
+
},
|
|
77
|
+
"prefix": {
|
|
78
|
+
"type": "string"
|
|
79
|
+
},
|
|
80
|
+
"transport": {
|
|
81
|
+
"type": "string",
|
|
82
|
+
"enum": [
|
|
83
|
+
"amplify"
|
|
84
|
+
]
|
|
85
|
+
},
|
|
86
|
+
"export": {
|
|
87
|
+
"type": "boolean",
|
|
88
|
+
"description": "If true the index.ts of the select project will replaced with export statement for each generate file",
|
|
89
|
+
"default": false
|
|
90
|
+
},
|
|
91
|
+
"inline": {
|
|
92
|
+
"type": "boolean",
|
|
93
|
+
"default": false
|
|
94
|
+
},
|
|
95
|
+
"skipRemoteMethod": {
|
|
96
|
+
"type": "boolean",
|
|
97
|
+
"default": false
|
|
98
|
+
},
|
|
99
|
+
"skipProvider": {
|
|
100
|
+
"type": "boolean",
|
|
101
|
+
"default": false
|
|
102
|
+
},
|
|
103
|
+
"skipDirectives": {
|
|
104
|
+
"type": "boolean",
|
|
105
|
+
"default": false
|
|
106
|
+
},
|
|
107
|
+
"serverId": {
|
|
108
|
+
"type": "string"
|
|
109
|
+
}
|
|
110
|
+
},
|
|
111
|
+
"required": [
|
|
112
|
+
"url"
|
|
113
|
+
]
|
|
114
|
+
}
|
|
115
|
+
]
|
|
116
|
+
}
|