@skmtc/core 0.32.2 → 0.32.3
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/esm/parse/v3-0/operation/toOperationsV3.js +1 -2
- package/esm/parse/v3-0/server/toServerV3.js +16 -2
- package/esm/parse/v3-0/webhook/toWebhooksV3.js +1 -2
- package/esm/parse/v3-1/operation/toOperationsV3.js +1 -2
- package/esm/parse/v3-1/server/toServerV3.js +16 -2
- package/esm/parse/v3-1/webhook/toWebhooksV3.js +1 -2
- package/esm/parse/v3-2/operation/toOperationsV3.js +1 -2
- package/esm/parse/v3-2/server/toServerV3.js +16 -2
- package/esm/parse/v3-2/webhook/toWebhooksV3.js +1 -2
- package/package.json +1 -1
- package/script/parse/v3-0/operation/toOperationsV3.js +1 -2
- package/script/parse/v3-0/server/toServerV3.js +16 -2
- package/script/parse/v3-0/webhook/toWebhooksV3.js +1 -2
- package/script/parse/v3-1/operation/toOperationsV3.js +1 -2
- package/script/parse/v3-1/server/toServerV3.js +16 -2
- package/script/parse/v3-1/webhook/toWebhooksV3.js +1 -2
- package/script/parse/v3-2/operation/toOperationsV3.js +1 -2
- package/script/parse/v3-2/server/toServerV3.js +16 -2
- package/script/parse/v3-2/webhook/toWebhooksV3.js +1 -2
|
@@ -98,8 +98,7 @@ export const toOperationsV3 = ({ paths, stackTrail, context }) => {
|
|
|
98
98
|
}
|
|
99
99
|
catch (error) {
|
|
100
100
|
const normalized = error instanceof Error ? error : new Error(String(error));
|
|
101
|
-
context.
|
|
102
|
-
key: method,
|
|
101
|
+
context.logIssueNoKey({
|
|
103
102
|
parent: operation,
|
|
104
103
|
level: 'error',
|
|
105
104
|
message: normalized.message,
|
|
@@ -1,9 +1,23 @@
|
|
|
1
1
|
import { OasServer } from '../../../oas/server/Server.js';
|
|
2
2
|
import { toSpecificationExtensionsV3 } from '../specificationExtensions/toSpecificationExtensionsV3.js';
|
|
3
3
|
import { toOptionalServerVariablesV3 } from '../serverVariable/toServerVariableV3.js';
|
|
4
|
+
import { tryParseAt } from '../../../context/tryParseAt.js';
|
|
4
5
|
export const toServersV3 = ({ servers, stackTrail, context }) => {
|
|
5
|
-
return servers.
|
|
6
|
-
|
|
6
|
+
return servers.flatMap((server, index) => {
|
|
7
|
+
const parsed = tryParseAt({
|
|
8
|
+
stackTrail,
|
|
9
|
+
key: `${index}`,
|
|
10
|
+
context,
|
|
11
|
+
type: 'INVALID_OPERATION',
|
|
12
|
+
parent: servers,
|
|
13
|
+
fn: st => {
|
|
14
|
+
if (typeof server?.url !== 'string') {
|
|
15
|
+
throw new Error(`Expected a Server Object with a string url, got: ${JSON.stringify(server)}`);
|
|
16
|
+
}
|
|
17
|
+
return toServerV3({ server, stackTrail: st, context });
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
return parsed ? [parsed] : [];
|
|
7
21
|
});
|
|
8
22
|
};
|
|
9
23
|
export const toOptionalServersV3 = ({ servers, stackTrail, context }) => {
|
|
@@ -111,8 +111,7 @@ export const toWebhooksV3 = ({ webhooks, stackTrail, context }) => {
|
|
|
111
111
|
}
|
|
112
112
|
catch (error) {
|
|
113
113
|
const normalized = error instanceof Error ? error : new Error(String(error));
|
|
114
|
-
context.
|
|
115
|
-
key: method,
|
|
114
|
+
context.logIssueNoKey({
|
|
116
115
|
parent: operation,
|
|
117
116
|
level: 'error',
|
|
118
117
|
message: normalized.message,
|
|
@@ -101,8 +101,7 @@ export const toOperationsV3 = ({ paths, stackTrail, context }) => {
|
|
|
101
101
|
}
|
|
102
102
|
catch (error) {
|
|
103
103
|
const normalized = error instanceof Error ? error : new Error(String(error));
|
|
104
|
-
context.
|
|
105
|
-
key: method,
|
|
104
|
+
context.logIssueNoKey({
|
|
106
105
|
parent: operation,
|
|
107
106
|
level: 'error',
|
|
108
107
|
message: normalized.message,
|
|
@@ -1,9 +1,23 @@
|
|
|
1
1
|
import { OasServer } from '../../../oas/server/Server.js';
|
|
2
2
|
import { toSpecificationExtensionsV3 } from '../specificationExtensions/toSpecificationExtensionsV3.js';
|
|
3
3
|
import { toOptionalServerVariablesV3 } from '../serverVariable/toServerVariableV3.js';
|
|
4
|
+
import { tryParseAt } from '../../../context/tryParseAt.js';
|
|
4
5
|
export const toServersV3 = ({ servers, stackTrail, context }) => {
|
|
5
|
-
return servers.
|
|
6
|
-
|
|
6
|
+
return servers.flatMap((server, index) => {
|
|
7
|
+
const parsed = tryParseAt({
|
|
8
|
+
stackTrail,
|
|
9
|
+
key: `${index}`,
|
|
10
|
+
context,
|
|
11
|
+
type: 'INVALID_OPERATION',
|
|
12
|
+
parent: servers,
|
|
13
|
+
fn: st => {
|
|
14
|
+
if (typeof server?.url !== 'string') {
|
|
15
|
+
throw new Error(`Expected a Server Object with a string url, got: ${JSON.stringify(server)}`);
|
|
16
|
+
}
|
|
17
|
+
return toServerV3({ server, stackTrail: st, context });
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
return parsed ? [parsed] : [];
|
|
7
21
|
});
|
|
8
22
|
};
|
|
9
23
|
export const toOptionalServersV3 = ({ servers, stackTrail, context }) => {
|
|
@@ -111,8 +111,7 @@ export const toWebhooksV3 = ({ webhooks, stackTrail, context }) => {
|
|
|
111
111
|
}
|
|
112
112
|
catch (error) {
|
|
113
113
|
const normalized = error instanceof Error ? error : new Error(String(error));
|
|
114
|
-
context.
|
|
115
|
-
key: method,
|
|
114
|
+
context.logIssueNoKey({
|
|
116
115
|
parent: operation,
|
|
117
116
|
level: 'error',
|
|
118
117
|
message: normalized.message,
|
|
@@ -110,8 +110,7 @@ export const toOperationsV3 = ({ paths, stackTrail, context }) => {
|
|
|
110
110
|
}
|
|
111
111
|
catch (error) {
|
|
112
112
|
const normalized = error instanceof Error ? error : new Error(String(error));
|
|
113
|
-
context.
|
|
114
|
-
key: method,
|
|
113
|
+
context.logIssueNoKey({
|
|
115
114
|
parent: operation,
|
|
116
115
|
level: 'error',
|
|
117
116
|
message: normalized.message,
|
|
@@ -1,9 +1,23 @@
|
|
|
1
1
|
import { OasServer } from '../../../oas/server/Server.js';
|
|
2
2
|
import { toSpecificationExtensionsV3 } from '../specificationExtensions/toSpecificationExtensionsV3.js';
|
|
3
3
|
import { toOptionalServerVariablesV3 } from '../serverVariable/toServerVariableV3.js';
|
|
4
|
+
import { tryParseAt } from '../../../context/tryParseAt.js';
|
|
4
5
|
export const toServersV3 = ({ servers, stackTrail, context }) => {
|
|
5
|
-
return servers.
|
|
6
|
-
|
|
6
|
+
return servers.flatMap((server, index) => {
|
|
7
|
+
const parsed = tryParseAt({
|
|
8
|
+
stackTrail,
|
|
9
|
+
key: `${index}`,
|
|
10
|
+
context,
|
|
11
|
+
type: 'INVALID_OPERATION',
|
|
12
|
+
parent: servers,
|
|
13
|
+
fn: st => {
|
|
14
|
+
if (typeof server?.url !== 'string') {
|
|
15
|
+
throw new Error(`Expected a Server Object with a string url, got: ${JSON.stringify(server)}`);
|
|
16
|
+
}
|
|
17
|
+
return toServerV3({ server, stackTrail: st, context });
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
return parsed ? [parsed] : [];
|
|
7
21
|
});
|
|
8
22
|
};
|
|
9
23
|
export const toOptionalServersV3 = ({ servers, stackTrail, context }) => {
|
|
@@ -120,8 +120,7 @@ export const toWebhooksV3 = ({ webhooks, stackTrail, context }) => {
|
|
|
120
120
|
}
|
|
121
121
|
catch (error) {
|
|
122
122
|
const normalized = error instanceof Error ? error : new Error(String(error));
|
|
123
|
-
context.
|
|
124
|
-
key: method,
|
|
123
|
+
context.logIssueNoKey({
|
|
125
124
|
parent: operation,
|
|
126
125
|
level: 'error',
|
|
127
126
|
message: normalized.message,
|
package/package.json
CHANGED
|
@@ -102,8 +102,7 @@ const toOperationsV3 = ({ paths, stackTrail, context }) => {
|
|
|
102
102
|
}
|
|
103
103
|
catch (error) {
|
|
104
104
|
const normalized = error instanceof Error ? error : new Error(String(error));
|
|
105
|
-
context.
|
|
106
|
-
key: method,
|
|
105
|
+
context.logIssueNoKey({
|
|
107
106
|
parent: operation,
|
|
108
107
|
level: 'error',
|
|
109
108
|
message: normalized.message,
|
|
@@ -4,9 +4,23 @@ exports.toServerV3 = exports.toOptionalServersV3 = exports.toServersV3 = void 0;
|
|
|
4
4
|
const Server_js_1 = require("../../../oas/server/Server.js");
|
|
5
5
|
const toSpecificationExtensionsV3_js_1 = require("../specificationExtensions/toSpecificationExtensionsV3.js");
|
|
6
6
|
const toServerVariableV3_js_1 = require("../serverVariable/toServerVariableV3.js");
|
|
7
|
+
const tryParseAt_js_1 = require("../../../context/tryParseAt.js");
|
|
7
8
|
const toServersV3 = ({ servers, stackTrail, context }) => {
|
|
8
|
-
return servers.
|
|
9
|
-
|
|
9
|
+
return servers.flatMap((server, index) => {
|
|
10
|
+
const parsed = (0, tryParseAt_js_1.tryParseAt)({
|
|
11
|
+
stackTrail,
|
|
12
|
+
key: `${index}`,
|
|
13
|
+
context,
|
|
14
|
+
type: 'INVALID_OPERATION',
|
|
15
|
+
parent: servers,
|
|
16
|
+
fn: st => {
|
|
17
|
+
if (typeof server?.url !== 'string') {
|
|
18
|
+
throw new Error(`Expected a Server Object with a string url, got: ${JSON.stringify(server)}`);
|
|
19
|
+
}
|
|
20
|
+
return (0, exports.toServerV3)({ server, stackTrail: st, context });
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
return parsed ? [parsed] : [];
|
|
10
24
|
});
|
|
11
25
|
};
|
|
12
26
|
exports.toServersV3 = toServersV3;
|
|
@@ -115,8 +115,7 @@ const toWebhooksV3 = ({ webhooks, stackTrail, context }) => {
|
|
|
115
115
|
}
|
|
116
116
|
catch (error) {
|
|
117
117
|
const normalized = error instanceof Error ? error : new Error(String(error));
|
|
118
|
-
context.
|
|
119
|
-
key: method,
|
|
118
|
+
context.logIssueNoKey({
|
|
120
119
|
parent: operation,
|
|
121
120
|
level: 'error',
|
|
122
121
|
message: normalized.message,
|
|
@@ -105,8 +105,7 @@ const toOperationsV3 = ({ paths, stackTrail, context }) => {
|
|
|
105
105
|
}
|
|
106
106
|
catch (error) {
|
|
107
107
|
const normalized = error instanceof Error ? error : new Error(String(error));
|
|
108
|
-
context.
|
|
109
|
-
key: method,
|
|
108
|
+
context.logIssueNoKey({
|
|
110
109
|
parent: operation,
|
|
111
110
|
level: 'error',
|
|
112
111
|
message: normalized.message,
|
|
@@ -4,9 +4,23 @@ exports.toServerV3 = exports.toOptionalServersV3 = exports.toServersV3 = void 0;
|
|
|
4
4
|
const Server_js_1 = require("../../../oas/server/Server.js");
|
|
5
5
|
const toSpecificationExtensionsV3_js_1 = require("../specificationExtensions/toSpecificationExtensionsV3.js");
|
|
6
6
|
const toServerVariableV3_js_1 = require("../serverVariable/toServerVariableV3.js");
|
|
7
|
+
const tryParseAt_js_1 = require("../../../context/tryParseAt.js");
|
|
7
8
|
const toServersV3 = ({ servers, stackTrail, context }) => {
|
|
8
|
-
return servers.
|
|
9
|
-
|
|
9
|
+
return servers.flatMap((server, index) => {
|
|
10
|
+
const parsed = (0, tryParseAt_js_1.tryParseAt)({
|
|
11
|
+
stackTrail,
|
|
12
|
+
key: `${index}`,
|
|
13
|
+
context,
|
|
14
|
+
type: 'INVALID_OPERATION',
|
|
15
|
+
parent: servers,
|
|
16
|
+
fn: st => {
|
|
17
|
+
if (typeof server?.url !== 'string') {
|
|
18
|
+
throw new Error(`Expected a Server Object with a string url, got: ${JSON.stringify(server)}`);
|
|
19
|
+
}
|
|
20
|
+
return (0, exports.toServerV3)({ server, stackTrail: st, context });
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
return parsed ? [parsed] : [];
|
|
10
24
|
});
|
|
11
25
|
};
|
|
12
26
|
exports.toServersV3 = toServersV3;
|
|
@@ -115,8 +115,7 @@ const toWebhooksV3 = ({ webhooks, stackTrail, context }) => {
|
|
|
115
115
|
}
|
|
116
116
|
catch (error) {
|
|
117
117
|
const normalized = error instanceof Error ? error : new Error(String(error));
|
|
118
|
-
context.
|
|
119
|
-
key: method,
|
|
118
|
+
context.logIssueNoKey({
|
|
120
119
|
parent: operation,
|
|
121
120
|
level: 'error',
|
|
122
121
|
message: normalized.message,
|
|
@@ -114,8 +114,7 @@ const toOperationsV3 = ({ paths, stackTrail, context }) => {
|
|
|
114
114
|
}
|
|
115
115
|
catch (error) {
|
|
116
116
|
const normalized = error instanceof Error ? error : new Error(String(error));
|
|
117
|
-
context.
|
|
118
|
-
key: method,
|
|
117
|
+
context.logIssueNoKey({
|
|
119
118
|
parent: operation,
|
|
120
119
|
level: 'error',
|
|
121
120
|
message: normalized.message,
|
|
@@ -4,9 +4,23 @@ exports.toServerV3 = exports.toOptionalServersV3 = exports.toServersV3 = void 0;
|
|
|
4
4
|
const Server_js_1 = require("../../../oas/server/Server.js");
|
|
5
5
|
const toSpecificationExtensionsV3_js_1 = require("../specificationExtensions/toSpecificationExtensionsV3.js");
|
|
6
6
|
const toServerVariableV3_js_1 = require("../serverVariable/toServerVariableV3.js");
|
|
7
|
+
const tryParseAt_js_1 = require("../../../context/tryParseAt.js");
|
|
7
8
|
const toServersV3 = ({ servers, stackTrail, context }) => {
|
|
8
|
-
return servers.
|
|
9
|
-
|
|
9
|
+
return servers.flatMap((server, index) => {
|
|
10
|
+
const parsed = (0, tryParseAt_js_1.tryParseAt)({
|
|
11
|
+
stackTrail,
|
|
12
|
+
key: `${index}`,
|
|
13
|
+
context,
|
|
14
|
+
type: 'INVALID_OPERATION',
|
|
15
|
+
parent: servers,
|
|
16
|
+
fn: st => {
|
|
17
|
+
if (typeof server?.url !== 'string') {
|
|
18
|
+
throw new Error(`Expected a Server Object with a string url, got: ${JSON.stringify(server)}`);
|
|
19
|
+
}
|
|
20
|
+
return (0, exports.toServerV3)({ server, stackTrail: st, context });
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
return parsed ? [parsed] : [];
|
|
10
24
|
});
|
|
11
25
|
};
|
|
12
26
|
exports.toServersV3 = toServersV3;
|
|
@@ -124,8 +124,7 @@ const toWebhooksV3 = ({ webhooks, stackTrail, context }) => {
|
|
|
124
124
|
}
|
|
125
125
|
catch (error) {
|
|
126
126
|
const normalized = error instanceof Error ? error : new Error(String(error));
|
|
127
|
-
context.
|
|
128
|
-
key: method,
|
|
127
|
+
context.logIssueNoKey({
|
|
129
128
|
parent: operation,
|
|
130
129
|
level: 'error',
|
|
131
130
|
message: normalized.message,
|