@rxap/schematics-open-api 13.0.0-next.0 → 13.0.0-next.1
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 +11 -0
- package/package.json +4 -3
- package/src/lib/utilities/get-parameter-type.js +2 -2
- 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 +2 -2
- package/src/lib/utilities/get-request-body-type.js.map +1 -1
- package/src/lib/utilities/get-response-type.js +2 -2
- package/src/lib/utilities/get-response-type.js.map +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,17 @@
|
|
|
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
|
+
# [13.0.0-next.1](https://gitlab.com/rxap/packages/compare/@rxap/schematics-open-api@13.0.0-next.0...@rxap/schematics-open-api@13.0.0-next.1) (2022-03-23)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* remove rxap/utilities dependency ([d8dfe16](https://gitlab.com/rxap/packages/commit/d8dfe168f5d3afd5cd88d4fd143bd2c7b2c687b7))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
# [13.0.0-next.0](https://gitlab.com/rxap/packages/compare/@rxap/schematics-open-api@12.0.9...@rxap/schematics-open-api@13.0.0-next.0) (2022-02-19)
|
|
7
18
|
|
|
8
19
|
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rxap/schematics-open-api",
|
|
3
|
-
"version": "13.0.0-next.
|
|
3
|
+
"version": "13.0.0-next.1",
|
|
4
4
|
"dependencies": {
|
|
5
5
|
"@rxap/json-schema-to-typescript": "^12.0.9",
|
|
6
|
-
"@rxap/utilities": "^12.2.2",
|
|
7
6
|
"openapi-types": "^10.0.0",
|
|
8
|
-
"tslib": "^2.3.1"
|
|
7
|
+
"tslib": "^2.3.1",
|
|
8
|
+
"semver": "^7.3.5"
|
|
9
9
|
},
|
|
10
10
|
"schematics": "./schematics/collection.json",
|
|
11
11
|
"ng-update": {
|
|
@@ -38,6 +38,7 @@
|
|
|
38
38
|
"email": "incoming+rxap-packages-14898188-issue-@incoming.gitlab.com"
|
|
39
39
|
},
|
|
40
40
|
"peerDependencies": {
|
|
41
|
+
"@rxap/schematics-utilities": "^13.0.0-next.1",
|
|
41
42
|
"ts-morph": "^13.0.3"
|
|
42
43
|
},
|
|
43
44
|
"typings": "./src/index.d.ts"
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.GetParameterType = void 0;
|
|
4
|
-
const
|
|
4
|
+
const schematics_utilities_1 = require("@rxap/schematics-utilities");
|
|
5
5
|
const config_1 = require("../config");
|
|
6
6
|
function GetParameterType(operation) {
|
|
7
7
|
let parameterType = 'void';
|
|
8
8
|
if (operation.parameters && operation.parameters.length && operation.operationId) {
|
|
9
|
-
parameterType =
|
|
9
|
+
parameterType = schematics_utilities_1.classify([operation.operationId, config_1.PARAMETER_FILE_SUFFIX].join('-'));
|
|
10
10
|
}
|
|
11
11
|
return parameterType;
|
|
12
12
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-parameter-type.js","sourceRoot":"","sources":["../../../../../../libs/open-api/src/lib/utilities/get-parameter-type.ts"],"names":[],"mappings":";;;AACA
|
|
1
|
+
{"version":3,"file":"get-parameter-type.js","sourceRoot":"","sources":["../../../../../../libs/open-api/src/lib/utilities/get-parameter-type.ts"],"names":[],"mappings":";;;AACA,qEAAsD;AAEtD,sCAAkD;AAGlD,SAAgB,gBAAgB,CAAC,SAAoC;IAEnE,IAAI,aAAa,GAAG,MAAM,CAAC;IAE3B,IAAI,SAAS,CAAC,UAAU,IAAI,SAAS,CAAC,UAAU,CAAC,MAAM,IAAI,SAAS,CAAC,WAAW,EAAE;QAChF,aAAa,GAAG,+BAAQ,CAAC,CAAE,SAAS,CAAC,WAAW,EAAE,8BAAqB,CAAE,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;KACtF;IAED,OAAO,aAAa,CAAC;AAEvB,CAAC;AAVD,4CAUC"}
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.GetRequestBody = void 0;
|
|
4
4
|
const is_reference_object_1 = require("./is-reference-object");
|
|
5
|
-
const
|
|
5
|
+
const schematics_utilities_1 = require("@rxap/schematics-utilities");
|
|
6
6
|
function GetRequestBody(operation) {
|
|
7
7
|
if (operation.requestBody) {
|
|
8
8
|
if (is_reference_object_1.IsReferenceObject(operation.requestBody)) {
|
|
9
9
|
throw new Error('Reference object are not supported in operation requestBody!');
|
|
10
10
|
}
|
|
11
11
|
const requestBodies = operation.requestBody.content;
|
|
12
|
-
if (
|
|
12
|
+
if (schematics_utilities_1.IsRecord(requestBodies)) {
|
|
13
13
|
if (is_reference_object_1.IsReferenceObject(requestBodies)) {
|
|
14
14
|
console.warn('Reference object are not supported in operation requestBody!');
|
|
15
15
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-reqeust-body.js","sourceRoot":"","sources":["../../../../../../libs/open-api/src/lib/utilities/get-reqeust-body.ts"],"names":[],"mappings":";;;AAEA,+DAA0D;AAC1D
|
|
1
|
+
{"version":3,"file":"get-reqeust-body.js","sourceRoot":"","sources":["../../../../../../libs/open-api/src/lib/utilities/get-reqeust-body.ts"],"names":[],"mappings":";;;AAEA,+DAA0D;AAC1D,qEAAsD;AAEtD,SAAgB,cAAc,CAAC,SAAoC;IAEjE,IAAI,SAAS,CAAC,WAAW,EAAE;QAEzB,IAAI,uCAAiB,CAAC,SAAS,CAAC,WAAW,CAAC,EAAE;YAC5C,MAAM,IAAI,KAAK,CAAC,8DAA8D,CAAC,CAAC;SACjF;QAED,MAAM,aAAa,GAA0D,SAAS,CAAC,WAAW,CAAC,OAAO,CAAC;QAE3G,IAAI,+BAAQ,CAAC,aAAa,CAAC,EAAE;YAE3B,IAAI,uCAAiB,CAAC,aAAa,CAAC,EAAE;gBACpC,OAAO,CAAC,IAAI,CAAC,8DAA8D,CAAC,CAAC;aAC9E;iBAAM;gBACL,IAAI,aAAa,CAAC,cAAc,CAAC,kBAAkB,CAAC,EAAE;oBACpD,MAAM,MAAM,GAAG,aAAa,CAAE,kBAAkB,CAAE,CAAC,MAAM,CAAC;oBAC1D,IAAI,MAAM,EAAE;wBACV,OAAO,MAAM,CAAC;qBACf;iBACF;aACF;SAEF;KAEF;IAED,OAAO,IAAI,CAAC;AAEd,CAAC;AA7BD,wCA6BC"}
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.GetRequestBodyType = void 0;
|
|
4
4
|
const get_reqeust_body_1 = require("./get-reqeust-body");
|
|
5
5
|
const any_schema_object_1 = require("./any-schema-object");
|
|
6
|
-
const
|
|
6
|
+
const schematics_utilities_1 = require("@rxap/schematics-utilities");
|
|
7
7
|
const config_1 = require("../config");
|
|
8
8
|
function GetRequestBodyType(operation) {
|
|
9
9
|
let requestBodyType = 'void';
|
|
@@ -13,7 +13,7 @@ function GetRequestBodyType(operation) {
|
|
|
13
13
|
requestBodyType = 'void';
|
|
14
14
|
}
|
|
15
15
|
else if (!any_schema_object_1.IsAnySchemaObject(requestBody)) {
|
|
16
|
-
requestBodyType =
|
|
16
|
+
requestBodyType = schematics_utilities_1.classify([operation.operationId, config_1.REQUEST_BODY_FILE_SUFFIX].join('-'));
|
|
17
17
|
}
|
|
18
18
|
else {
|
|
19
19
|
requestBodyType = 'any';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-request-body-type.js","sourceRoot":"","sources":["../../../../../../libs/open-api/src/lib/utilities/get-request-body-type.ts"],"names":[],"mappings":";;;AAAA,yDAAoD;AACpD,2DAAwD;AACxD
|
|
1
|
+
{"version":3,"file":"get-request-body-type.js","sourceRoot":"","sources":["../../../../../../libs/open-api/src/lib/utilities/get-request-body-type.ts"],"names":[],"mappings":";;;AAAA,yDAAoD;AACpD,2DAAwD;AACxD,qEAAsD;AACtD,sCAAqD;AAGrD,SAAgB,kBAAkB,CAAC,SAAiC;IAElE,IAAI,eAAe,GAAG,MAAM,CAAC;IAE7B,IAAI,SAAS,CAAC,WAAW,EAAE;QAEzB,MAAM,WAAW,GAAG,iCAAc,CAAC,SAAS,CAAC,CAAC;QAE9C,IAAI,WAAW,KAAK,IAAI,EAAE;YACxB,eAAe,GAAG,MAAM,CAAC;SAC1B;aAAM,IAAI,CAAC,qCAAiB,CAAC,WAAW,CAAC,EAAE;YAC1C,eAAe,GAAG,+BAAQ,CAAC,CAAE,SAAS,CAAC,WAAW,EAAE,iCAAwB,CAAE,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;SAC3F;aAAM;YACL,eAAe,GAAG,KAAK,CAAC;SACzB;KAEF;IAED,OAAO,eAAe,CAAC;AAEzB,CAAC;AApBD,gDAoBC"}
|
|
@@ -4,14 +4,14 @@ exports.GetResponseType = void 0;
|
|
|
4
4
|
const config_1 = require("../config");
|
|
5
5
|
const any_schema_object_1 = require("./any-schema-object");
|
|
6
6
|
const get_response_1 = require("./get-response");
|
|
7
|
-
const
|
|
7
|
+
const schematics_utilities_1 = require("@rxap/schematics-utilities");
|
|
8
8
|
function GetResponseType(operation) {
|
|
9
9
|
let responseType = 'any';
|
|
10
10
|
if (operation.operationId) {
|
|
11
11
|
const response = get_response_1.GetResponse(operation);
|
|
12
12
|
// only generate the response interface if the type is not any
|
|
13
13
|
if (!any_schema_object_1.IsAnySchemaObject(response)) {
|
|
14
|
-
responseType =
|
|
14
|
+
responseType = schematics_utilities_1.classify([operation.operationId, config_1.RESPONSE_FILE_SUFFIX].join('-'));
|
|
15
15
|
}
|
|
16
16
|
else {
|
|
17
17
|
responseType = 'void';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-response-type.js","sourceRoot":"","sources":["../../../../../../libs/open-api/src/lib/utilities/get-response-type.ts"],"names":[],"mappings":";;;AACA,sCAAiD;AACjD,2DAAwD;AACxD,iDAA6C;AAC7C
|
|
1
|
+
{"version":3,"file":"get-response-type.js","sourceRoot":"","sources":["../../../../../../libs/open-api/src/lib/utilities/get-response-type.ts"],"names":[],"mappings":";;;AACA,sCAAiD;AACjD,2DAAwD;AACxD,iDAA6C;AAC7C,qEAAsD;AAEtD,SAAgB,eAAe,CAAC,SAAoC;IAElE,IAAI,YAAY,GAAG,KAAK,CAAC;IAEzB,IAAI,SAAS,CAAC,WAAW,EAAE;QAEzB,MAAM,QAAQ,GAAG,0BAAW,CAAC,SAAS,CAAC,CAAC;QAExC,8DAA8D;QAC9D,IAAI,CAAC,qCAAiB,CAAC,QAAQ,CAAC,EAAE;YAChC,YAAY,GAAG,+BAAQ,CAAC,CAAE,SAAS,CAAC,WAAW,EAAE,6BAAoB,CAAE,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;SACpF;aAAM;YACL,YAAY,GAAG,MAAM,CAAC;SACvB;KAEF;IAED,OAAO,YAAY,CAAC;AAEtB,CAAC;AAnBD,0CAmBC"}
|