typia 3.8.5 → 3.8.6-dev.20230511
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/lib/module.d.ts +1 -3
- package/lib/module.js.map +1 -1
- package/lib/programmers/ApplicationProgrammer.d.ts +1 -4
- package/lib/programmers/ApplicationProgrammer.js +2 -6
- package/lib/programmers/ApplicationProgrammer.js.map +1 -1
- package/lib/programmers/internal/JSON_SCHEMA_PREFIX.d.ts +1 -0
- package/lib/programmers/internal/JSON_SCHEMA_PREFIX.js +5 -0
- package/lib/programmers/internal/JSON_SCHEMA_PREFIX.js.map +1 -0
- package/lib/programmers/internal/application_array.js +6 -5
- package/lib/programmers/internal/application_array.js.map +1 -1
- package/lib/programmers/internal/application_boolean.js +1 -1
- package/lib/programmers/internal/application_boolean.js.map +1 -1
- package/lib/programmers/internal/application_constant.js +1 -1
- package/lib/programmers/internal/application_constant.js.map +1 -1
- package/lib/programmers/internal/application_default.js +3 -3
- package/lib/programmers/internal/application_default.js.map +1 -1
- package/lib/programmers/internal/application_native.js +15 -11
- package/lib/programmers/internal/application_native.js.map +1 -1
- package/lib/programmers/internal/application_number.js +8 -7
- package/lib/programmers/internal/application_number.js.map +1 -1
- package/lib/programmers/internal/application_object.js +18 -13
- package/lib/programmers/internal/application_object.js.map +1 -1
- package/lib/programmers/internal/application_schema.js +43 -63
- package/lib/programmers/internal/application_schema.js.map +1 -1
- package/lib/programmers/internal/application_string.js +29 -27
- package/lib/programmers/internal/application_string.js.map +1 -1
- package/lib/programmers/internal/application_templates.js +1 -1
- package/lib/programmers/internal/application_templates.js.map +1 -1
- package/lib/programmers/internal/application_tuple.js +3 -3
- package/lib/programmers/internal/application_tuple.js.map +1 -1
- package/lib/schemas/IJsonApplication.d.ts +3 -0
- package/lib/schemas/IJsonComponents.d.ts +7 -1
- package/lib/schemas/IJsonSchema.d.ts +4 -1
- package/lib/transformers/features/miscellaneous/ApplicationTransformer.js +0 -6
- package/lib/transformers/features/miscellaneous/ApplicationTransformer.js.map +1 -1
- package/package.json +1 -1
- package/src/module.ts +1 -6
- package/src/programmers/ApplicationProgrammer.ts +2 -8
- package/src/programmers/internal/JSON_SCHEMA_PREFIX.ts +1 -0
- package/src/programmers/internal/application_array.ts +4 -8
- package/src/programmers/internal/application_boolean.ts +6 -8
- package/src/programmers/internal/application_constant.ts +3 -7
- package/src/programmers/internal/application_default.ts +1 -1
- package/src/programmers/internal/application_native.ts +16 -12
- package/src/programmers/internal/application_number.ts +7 -9
- package/src/programmers/internal/application_object.ts +13 -6
- package/src/programmers/internal/application_schema.ts +36 -51
- package/src/programmers/internal/application_string.ts +28 -29
- package/src/programmers/internal/application_templates.ts +0 -1
- package/src/programmers/internal/application_tuple.ts +3 -7
- package/src/schemas/IJsonApplication.ts +4 -0
- package/src/schemas/IJsonComponents.ts +8 -1
- package/src/schemas/IJsonSchema.ts +5 -1
- package/src/transformers/features/miscellaneous/ApplicationTransformer.ts +0 -11
|
@@ -2,6 +2,7 @@ import { IJsonComponents } from "../../schemas/IJsonComponents";
|
|
|
2
2
|
|
|
3
3
|
import { IJsonSchema } from "../../module";
|
|
4
4
|
import { ApplicationProgrammer } from "../ApplicationProgrammer";
|
|
5
|
+
import { JSON_SCHEMA_PREFIX } from "./JSON_SCHEMA_PREFIX";
|
|
5
6
|
|
|
6
7
|
/**
|
|
7
8
|
* @internal
|
|
@@ -14,19 +15,22 @@ export const application_native =
|
|
|
14
15
|
nullable: boolean;
|
|
15
16
|
attribute: IJsonSchema.IAttribute;
|
|
16
17
|
}): IJsonSchema.IReference => {
|
|
17
|
-
const key: string =
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
}
|
|
18
|
+
const key: string =
|
|
19
|
+
options.purpose === "ajv"
|
|
20
|
+
? name
|
|
21
|
+
: `${name}${props.nullable ? ".Nullable" : ""}`;
|
|
22
|
+
components.schemas[key] ??= {
|
|
23
|
+
type: "object",
|
|
24
|
+
$id:
|
|
25
|
+
options.purpose === "ajv"
|
|
26
|
+
? `${JSON_SCHEMA_PREFIX}/${key}`
|
|
27
|
+
: undefined,
|
|
28
|
+
properties: {},
|
|
29
|
+
nullable:
|
|
30
|
+
options.purpose === "swagger" ? props.nullable : undefined,
|
|
31
|
+
};
|
|
28
32
|
return {
|
|
29
|
-
$ref: `#/components/schemas/${name}`,
|
|
30
33
|
...props.attribute,
|
|
34
|
+
$ref: `${JSON_SCHEMA_PREFIX}/${key}`,
|
|
31
35
|
};
|
|
32
36
|
};
|
|
@@ -4,16 +4,14 @@ import { application_default } from "./application_default";
|
|
|
4
4
|
/**
|
|
5
5
|
* @internal
|
|
6
6
|
*/
|
|
7
|
-
export const application_number = (
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}): IJsonSchema.INumber | IJsonSchema.IInteger => {
|
|
7
|
+
export const application_number = (
|
|
8
|
+
attribute: IJsonSchema.IAttribute,
|
|
9
|
+
): IJsonSchema.INumber | IJsonSchema.IInteger => {
|
|
11
10
|
const output: IJsonSchema.INumber | IJsonSchema.IInteger = {
|
|
11
|
+
...attribute,
|
|
12
12
|
type: "number" as "number" | "integer",
|
|
13
|
-
nullable: props.nullable,
|
|
14
|
-
...props.attribute,
|
|
15
13
|
};
|
|
16
|
-
for (const tag of
|
|
14
|
+
for (const tag of attribute["x-typia-metaTags"] ?? []) {
|
|
17
15
|
// CHECK TYPE
|
|
18
16
|
if (
|
|
19
17
|
tag.kind === "type" &&
|
|
@@ -37,7 +35,7 @@ export const application_number = (props: {
|
|
|
37
35
|
// WHEN UNSIGNED INT
|
|
38
36
|
if (
|
|
39
37
|
output.type === "integer" &&
|
|
40
|
-
(
|
|
38
|
+
(attribute["x-typia-metaTags"] ?? []).find(
|
|
41
39
|
(tag) => tag.kind === "type" && tag.value === "uint",
|
|
42
40
|
)
|
|
43
41
|
)
|
|
@@ -52,7 +50,7 @@ export const application_number = (props: {
|
|
|
52
50
|
}
|
|
53
51
|
|
|
54
52
|
// DEFAULT CONFIGURATION
|
|
55
|
-
output.default = application_default(
|
|
53
|
+
output.default = application_default(attribute)((str) => {
|
|
56
54
|
const value: number = Number(str);
|
|
57
55
|
const conditions: boolean[] = [!Number.isNaN(value)];
|
|
58
56
|
if (output.minimum !== undefined)
|
|
@@ -9,6 +9,7 @@ import { PatternUtil } from "../../utils/PatternUtil";
|
|
|
9
9
|
|
|
10
10
|
import { IJsonSchema } from "../../module";
|
|
11
11
|
import { ApplicationProgrammer } from "../ApplicationProgrammer";
|
|
12
|
+
import { JSON_SCHEMA_PREFIX } from "./JSON_SCHEMA_PREFIX";
|
|
12
13
|
import { application_schema } from "./application_schema";
|
|
13
14
|
import { metadata_to_pattern } from "./metadata_to_pattern";
|
|
14
15
|
|
|
@@ -19,10 +20,15 @@ export const application_object =
|
|
|
19
20
|
(options: ApplicationProgrammer.IOptions) =>
|
|
20
21
|
(components: IJsonComponents) =>
|
|
21
22
|
(obj: MetadataObject) =>
|
|
22
|
-
(
|
|
23
|
+
(nullable: boolean): string => {
|
|
24
|
+
const key =
|
|
25
|
+
options.purpose === "ajv"
|
|
26
|
+
? obj.name
|
|
27
|
+
: `${obj.name}${nullable ? ".Nullable" : ""}`;
|
|
28
|
+
|
|
23
29
|
// TEMPORARY ASSIGNMENT
|
|
24
|
-
if (components.schemas[
|
|
25
|
-
components.schemas[
|
|
30
|
+
if (components.schemas[key] !== undefined) return key;
|
|
31
|
+
components.schemas[key] = {} as any;
|
|
26
32
|
|
|
27
33
|
// ITERATE PROPERTIES
|
|
28
34
|
const properties: Record<string, any> = {};
|
|
@@ -99,13 +105,13 @@ export const application_object =
|
|
|
99
105
|
const schema: IJsonComponents.IObject = {
|
|
100
106
|
$id:
|
|
101
107
|
options.purpose === "ajv"
|
|
102
|
-
?
|
|
108
|
+
? `${JSON_SCHEMA_PREFIX}/${key}`
|
|
103
109
|
: undefined,
|
|
104
110
|
$recursiveAnchor:
|
|
105
111
|
(options.purpose === "ajv" && obj.recursive) || undefined,
|
|
106
112
|
type: "object",
|
|
107
113
|
properties,
|
|
108
|
-
nullable:
|
|
114
|
+
nullable: options.purpose === "swagger" ? nullable : undefined,
|
|
109
115
|
required: required.length ? required : undefined,
|
|
110
116
|
description: obj.description,
|
|
111
117
|
"x-typia-jsDocTags": obj.jsDocTags,
|
|
@@ -120,7 +126,8 @@ export const application_object =
|
|
|
120
126
|
join(options)(components)(extraMeta),
|
|
121
127
|
}),
|
|
122
128
|
};
|
|
123
|
-
components.schemas[
|
|
129
|
+
components.schemas[key] = schema;
|
|
130
|
+
return key;
|
|
124
131
|
};
|
|
125
132
|
|
|
126
133
|
const join =
|
|
@@ -4,6 +4,7 @@ import { IJsonSchema } from "../../schemas/IJsonSchema";
|
|
|
4
4
|
|
|
5
5
|
import { ApplicationProgrammer } from "../ApplicationProgrammer";
|
|
6
6
|
import { AtomicPredicator } from "../helpers/AtomicPredicator";
|
|
7
|
+
import { JSON_SCHEMA_PREFIX } from "./JSON_SCHEMA_PREFIX";
|
|
7
8
|
import { application_array } from "./application_array";
|
|
8
9
|
import { application_boolean } from "./application_boolean";
|
|
9
10
|
import { application_constant } from "./application_constant";
|
|
@@ -38,6 +39,20 @@ export const application_schema =
|
|
|
38
39
|
// GATHER UNION SCHEMAS
|
|
39
40
|
//----
|
|
40
41
|
const union: IJsonSchema[] = [];
|
|
42
|
+
if (meta.nullable && options.purpose !== "swagger")
|
|
43
|
+
union.push({
|
|
44
|
+
...attribute,
|
|
45
|
+
type: "null",
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
const insert =
|
|
49
|
+
meta.nullable && options.purpose === "swagger"
|
|
50
|
+
? (significant: IJsonSchema.ISignificant<any>) =>
|
|
51
|
+
union.push({
|
|
52
|
+
...significant,
|
|
53
|
+
nullable: true,
|
|
54
|
+
})
|
|
55
|
+
: (schema: IJsonSchema) => union.push(schema);
|
|
41
56
|
|
|
42
57
|
// toJSON() METHOD
|
|
43
58
|
if (meta.resolved !== null) {
|
|
@@ -49,7 +64,7 @@ export const application_schema =
|
|
|
49
64
|
|
|
50
65
|
// ATOMIC TYPES
|
|
51
66
|
if (meta.templates.length && AtomicPredicator.template(meta))
|
|
52
|
-
|
|
67
|
+
insert(application_templates(meta)(attribute));
|
|
53
68
|
for (const constant of meta.constants)
|
|
54
69
|
if (constant.type === "bigint") throw new Error(NO_BIGINT);
|
|
55
70
|
else if (
|
|
@@ -57,48 +72,27 @@ export const application_schema =
|
|
|
57
72
|
AtomicPredicator.constant(meta)(constant.type) === false
|
|
58
73
|
)
|
|
59
74
|
continue;
|
|
60
|
-
else
|
|
61
|
-
union.push(
|
|
62
|
-
application_constant(constant)({
|
|
63
|
-
nullable: meta.nullable,
|
|
64
|
-
attribute,
|
|
65
|
-
}),
|
|
66
|
-
);
|
|
75
|
+
else insert(application_constant(constant)(attribute));
|
|
67
76
|
for (const type of meta.atomics)
|
|
68
77
|
if (type === "bigint") throw new Error(NO_BIGINT);
|
|
69
78
|
else if (AtomicPredicator.atomic(meta)(type) === false) continue;
|
|
70
79
|
else
|
|
71
|
-
|
|
80
|
+
insert(
|
|
72
81
|
type === "string"
|
|
73
|
-
? application_string(meta
|
|
82
|
+
? application_string(meta)(attribute)
|
|
74
83
|
: type === "boolean"
|
|
75
|
-
? application_boolean(
|
|
76
|
-
|
|
77
|
-
attribute,
|
|
78
|
-
})
|
|
79
|
-
: application_number({
|
|
80
|
-
nullable: meta.nullable,
|
|
81
|
-
attribute,
|
|
82
|
-
}),
|
|
84
|
+
? application_boolean(attribute)
|
|
85
|
+
: application_number(attribute),
|
|
83
86
|
);
|
|
84
87
|
|
|
85
88
|
// ARRAY
|
|
86
89
|
for (const schema of meta.arrays.values())
|
|
87
|
-
|
|
88
|
-
application_array(options)(components)()(schema)({
|
|
89
|
-
nullable: meta.nullable,
|
|
90
|
-
attribute,
|
|
91
|
-
}),
|
|
92
|
-
);
|
|
90
|
+
insert(application_array(options)(components)()(schema)(attribute));
|
|
93
91
|
|
|
94
92
|
// TUPLE
|
|
95
93
|
for (const items of meta.tuples) {
|
|
96
|
-
const tuple: IJsonSchema.ITuple =
|
|
97
|
-
components
|
|
98
|
-
)(items)({
|
|
99
|
-
nullable: meta.nullable,
|
|
100
|
-
attribute,
|
|
101
|
-
});
|
|
94
|
+
const tuple: IJsonSchema.ITuple =
|
|
95
|
+
application_tuple(options)(components)(items)(attribute);
|
|
102
96
|
if (options.purpose === "swagger" && items.length === 0)
|
|
103
97
|
throw new Error(
|
|
104
98
|
"Error on typia.application(): swagger does not support zero length tuple type.",
|
|
@@ -107,17 +101,16 @@ export const application_schema =
|
|
|
107
101
|
options.purpose === "ajv" &&
|
|
108
102
|
!items[items.length - 1]?.rest
|
|
109
103
|
)
|
|
110
|
-
|
|
104
|
+
insert(tuple);
|
|
111
105
|
else {
|
|
112
106
|
// SWAGGER DOES NOT SUPPORT TUPLE TYPE YET
|
|
113
107
|
const merged: Metadata = items.reduce((x, y) =>
|
|
114
108
|
Metadata.merge(x, y),
|
|
115
109
|
);
|
|
116
|
-
|
|
117
|
-
application_array(options)(components)(tuple)(merged)(
|
|
118
|
-
nullable: merged?.nullable ?? false,
|
|
110
|
+
insert(
|
|
111
|
+
application_array(options)(components)(tuple)(merged)(
|
|
119
112
|
attribute,
|
|
120
|
-
|
|
113
|
+
),
|
|
121
114
|
);
|
|
122
115
|
}
|
|
123
116
|
}
|
|
@@ -125,18 +118,12 @@ export const application_schema =
|
|
|
125
118
|
// NATIVES
|
|
126
119
|
for (const native of meta.natives)
|
|
127
120
|
if (AtomicPredicator.native(native))
|
|
128
|
-
|
|
121
|
+
insert(
|
|
129
122
|
native === "String"
|
|
130
|
-
? application_string(meta
|
|
123
|
+
? application_string(meta)(attribute)
|
|
131
124
|
: native === "Boolean"
|
|
132
|
-
? application_boolean(
|
|
133
|
-
|
|
134
|
-
attribute,
|
|
135
|
-
})
|
|
136
|
-
: application_number({
|
|
137
|
-
nullable: meta.nullable,
|
|
138
|
-
attribute,
|
|
139
|
-
}),
|
|
125
|
+
? application_boolean(attribute)
|
|
126
|
+
: application_number(attribute),
|
|
140
127
|
);
|
|
141
128
|
else
|
|
142
129
|
union.push(
|
|
@@ -162,15 +149,13 @@ export const application_schema =
|
|
|
162
149
|
|
|
163
150
|
// OBJECT
|
|
164
151
|
for (const obj of meta.objects) {
|
|
165
|
-
const key: string = obj
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
nullable: meta.nullable,
|
|
169
|
-
});
|
|
152
|
+
const key: string = application_object(options)(components)(obj)(
|
|
153
|
+
meta.nullable,
|
|
154
|
+
);
|
|
170
155
|
union.push(
|
|
171
156
|
(options.purpose === "ajv" && obj.recursive
|
|
172
157
|
? recursive
|
|
173
|
-
: reference)(`${
|
|
158
|
+
: reference)(`${JSON_SCHEMA_PREFIX}/${key}`, attribute),
|
|
174
159
|
);
|
|
175
160
|
}
|
|
176
161
|
|
|
@@ -7,39 +7,38 @@ import { application_default_string } from "./application_default_string";
|
|
|
7
7
|
/**
|
|
8
8
|
* @internal
|
|
9
9
|
*/
|
|
10
|
-
export const application_string =
|
|
11
|
-
meta: Metadata
|
|
12
|
-
attribute: IJsonSchema.IAttribute
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
...attribute,
|
|
18
|
-
};
|
|
10
|
+
export const application_string =
|
|
11
|
+
(meta: Metadata) =>
|
|
12
|
+
(attribute: IJsonSchema.IAttribute): IJsonSchema.IString => {
|
|
13
|
+
const output: IJsonSchema.IString = {
|
|
14
|
+
...attribute,
|
|
15
|
+
type: "string",
|
|
16
|
+
};
|
|
19
17
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
18
|
+
// FORMAT TAG OF METADATA
|
|
19
|
+
const formatJsdocTag = attribute["x-typia-jsDocTags"]?.find(
|
|
20
|
+
(tag) => tag.name === "format",
|
|
21
|
+
);
|
|
22
|
+
if (formatJsdocTag?.text?.length)
|
|
23
|
+
output.format = formatJsdocTag?.text.map((t) => t.text).join(" ");
|
|
26
24
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
25
|
+
// REGULAR TAGS COMPATIBLE WITH JSON-SCHEMA
|
|
26
|
+
for (const tag of attribute["x-typia-metaTags"] ?? []) {
|
|
27
|
+
// RANGE
|
|
28
|
+
if (tag.kind === "minLength") output.minLength = tag.value;
|
|
29
|
+
else if (tag.kind === "maxLength") output.maxLength = tag.value;
|
|
30
|
+
// FORMAT AND PATTERN
|
|
31
|
+
else if (tag.kind === "format")
|
|
32
|
+
output.format = emendFormat(tag.value);
|
|
33
|
+
else if (tag.kind === "pattern") output.pattern = tag.value;
|
|
34
|
+
}
|
|
36
35
|
|
|
37
|
-
|
|
38
|
-
|
|
36
|
+
// DEFAULT CONFIGURATION
|
|
37
|
+
output.default = application_default_string(meta)(attribute)(output);
|
|
39
38
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
};
|
|
39
|
+
// RETURNS
|
|
40
|
+
return output;
|
|
41
|
+
};
|
|
43
42
|
|
|
44
43
|
const emendFormat = (tag: IMetadataTag.IFormat["value"]) =>
|
|
45
44
|
tag === "datetime" ? "date-time" : tag;
|
|
@@ -12,20 +12,16 @@ export const application_tuple =
|
|
|
12
12
|
(options: ApplicationProgrammer.IOptions) =>
|
|
13
13
|
(components: IJsonComponents) =>
|
|
14
14
|
(items: Array<Metadata>) =>
|
|
15
|
-
(
|
|
16
|
-
nullable: boolean;
|
|
17
|
-
attribute: IJsonSchema.IAttribute;
|
|
18
|
-
}): IJsonSchema.ITuple => ({
|
|
15
|
+
(attribute: IJsonSchema.IAttribute): IJsonSchema.ITuple => ({
|
|
19
16
|
type: "array",
|
|
20
17
|
items: items.map((meta, i) =>
|
|
21
18
|
application_schema(options)(false)(components)(meta.rest ?? meta)({
|
|
22
|
-
...
|
|
19
|
+
...attribute,
|
|
23
20
|
"x-typia-rest":
|
|
24
21
|
i === items.length - 1 ? meta.rest !== null : undefined,
|
|
25
22
|
"x-typia-required": meta.required,
|
|
26
23
|
"x-typia-optional": meta.optional,
|
|
27
24
|
}),
|
|
28
25
|
),
|
|
29
|
-
|
|
30
|
-
...props.attribute,
|
|
26
|
+
...attribute,
|
|
31
27
|
});
|
|
@@ -7,11 +7,18 @@ export interface IJsonComponents {
|
|
|
7
7
|
}
|
|
8
8
|
export namespace IJsonComponents {
|
|
9
9
|
export interface IObject {
|
|
10
|
+
/**
|
|
11
|
+
* Used only when ajv mode.
|
|
12
|
+
*/
|
|
10
13
|
$id?: string;
|
|
11
14
|
$recursiveAnchor?: boolean;
|
|
12
15
|
|
|
13
16
|
type: "object";
|
|
14
|
-
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Only when swagger mode.
|
|
20
|
+
*/
|
|
21
|
+
nullable?: boolean;
|
|
15
22
|
|
|
16
23
|
properties: Record<string, IJsonSchema>;
|
|
17
24
|
patternProperties?: Record<string, IJsonSchema>;
|
|
@@ -115,7 +115,11 @@ export namespace IJsonSchema {
|
|
|
115
115
|
|
|
116
116
|
export interface ISignificant<Literal extends string> extends IAttribute {
|
|
117
117
|
type: Literal;
|
|
118
|
-
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* Only when swagger mode.
|
|
121
|
+
*/
|
|
122
|
+
nullable?: boolean;
|
|
119
123
|
}
|
|
120
124
|
export interface IAttribute {
|
|
121
125
|
deprecated?: boolean;
|
|
@@ -42,16 +42,6 @@ export namespace ApplicationTransformer {
|
|
|
42
42
|
(str) => str === "swagger" || str === "ajv",
|
|
43
43
|
() => "swagger",
|
|
44
44
|
);
|
|
45
|
-
const prefix: string = get_parameter(
|
|
46
|
-
checker,
|
|
47
|
-
"Prefix",
|
|
48
|
-
expression.typeArguments[2],
|
|
49
|
-
() => true,
|
|
50
|
-
() =>
|
|
51
|
-
purpose === "swagger"
|
|
52
|
-
? "#/components/schemas"
|
|
53
|
-
: "components#/schemas",
|
|
54
|
-
);
|
|
55
45
|
|
|
56
46
|
//----
|
|
57
47
|
// GENERATORS
|
|
@@ -74,7 +64,6 @@ export namespace ApplicationTransformer {
|
|
|
74
64
|
// APPLICATION
|
|
75
65
|
const app: IJsonApplication = ApplicationProgrammer.write({
|
|
76
66
|
purpose,
|
|
77
|
-
prefix,
|
|
78
67
|
})(metadatas);
|
|
79
68
|
|
|
80
69
|
// RETURNS WITH LITERAL EXPRESSION
|