@trapi/swagger 1.0.0-alpha.11 → 1.0.0-alpha.12

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.
Files changed (57) hide show
  1. package/dist/config/index.d.ts +2 -2
  2. package/dist/config/index.js +24 -24
  3. package/dist/config/type.d.ts +82 -82
  4. package/dist/config/type.js +8 -8
  5. package/dist/config/utils.d.ts +2 -2
  6. package/dist/config/utils.js +53 -53
  7. package/dist/constants.d.ts +14 -14
  8. package/dist/constants.js +26 -26
  9. package/dist/generator/abstract.d.ts +34 -34
  10. package/dist/generator/abstract.js +251 -251
  11. package/dist/generator/index.d.ts +4 -4
  12. package/dist/generator/index.js +26 -26
  13. package/dist/generator/module.d.ts +13 -13
  14. package/dist/generator/module.js +34 -34
  15. package/dist/generator/v2/index.d.ts +1 -1
  16. package/dist/generator/v2/index.js +23 -23
  17. package/dist/generator/v2/module.d.ts +24 -24
  18. package/dist/generator/v2/module.js +516 -516
  19. package/dist/generator/v3/index.d.ts +1 -1
  20. package/dist/generator/v3/index.js +23 -23
  21. package/dist/generator/v3/module.d.ts +29 -29
  22. package/dist/generator/v3/module.js +498 -498
  23. package/dist/index.d.ts +7 -7
  24. package/dist/index.js +29 -29
  25. package/dist/metadata.d.ts +3 -3
  26. package/dist/metadata.js +13 -13
  27. package/dist/schema/constants.d.ts +27 -27
  28. package/dist/schema/constants.js +39 -39
  29. package/dist/schema/index.d.ts +4 -4
  30. package/dist/schema/index.js +26 -26
  31. package/dist/schema/type.d.ts +138 -138
  32. package/dist/schema/type.js +8 -8
  33. package/dist/schema/v2/constants.d.ts +7 -7
  34. package/dist/schema/v2/constants.js +17 -17
  35. package/dist/schema/v2/index.d.ts +2 -2
  36. package/dist/schema/v2/index.js +24 -24
  37. package/dist/schema/v2/type.d.ts +115 -115
  38. package/dist/schema/v2/type.js +8 -8
  39. package/dist/schema/v3/constants.d.ts +6 -6
  40. package/dist/schema/v3/constants.js +16 -16
  41. package/dist/schema/v3/index.d.ts +2 -2
  42. package/dist/schema/v3/index.js +24 -24
  43. package/dist/schema/v3/type.d.ts +158 -158
  44. package/dist/schema/v3/type.js +8 -8
  45. package/dist/type.d.ts +48 -48
  46. package/dist/type.js +8 -8
  47. package/dist/utils/character.d.ts +2 -2
  48. package/dist/utils/character.js +20 -20
  49. package/dist/utils/index.d.ts +4 -4
  50. package/dist/utils/index.js +26 -26
  51. package/dist/utils/object.d.ts +1 -1
  52. package/dist/utils/object.js +14 -14
  53. package/dist/utils/path.d.ts +1 -1
  54. package/dist/utils/path.js +20 -20
  55. package/dist/utils/value.d.ts +1 -1
  56. package/dist/utils/value.js +25 -25
  57. package/package.json +4 -4
package/dist/index.d.ts CHANGED
@@ -1,8 +1,8 @@
1
- export * from './config';
2
- export * from './constants';
3
- export * from './metadata';
4
- export * from './generator';
5
- export * from './schema';
6
- export * from './type';
7
- export * from './utils';
1
+ export * from './config';
2
+ export * from './constants';
3
+ export * from './metadata';
4
+ export * from './generator';
5
+ export * from './schema';
6
+ export * from './type';
7
+ export * from './utils';
8
8
  //# sourceMappingURL=index.d.ts.map
package/dist/index.js CHANGED
@@ -1,30 +1,30 @@
1
- "use strict";
2
- /*
3
- * Copyright (c) 2021.
4
- * Author Peter Placzek (tada5hi)
5
- * For the full copyright and license information,
6
- * view the LICENSE file that was distributed with this source code.
7
- */
8
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
9
- if (k2 === undefined) k2 = k;
10
- var desc = Object.getOwnPropertyDescriptor(m, k);
11
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
12
- desc = { enumerable: true, get: function() { return m[k]; } };
13
- }
14
- Object.defineProperty(o, k2, desc);
15
- }) : (function(o, m, k, k2) {
16
- if (k2 === undefined) k2 = k;
17
- o[k2] = m[k];
18
- }));
19
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
20
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
21
- };
22
- Object.defineProperty(exports, "__esModule", { value: true });
23
- __exportStar(require("./config"), exports);
24
- __exportStar(require("./constants"), exports);
25
- __exportStar(require("./metadata"), exports);
26
- __exportStar(require("./generator"), exports);
27
- __exportStar(require("./schema"), exports);
28
- __exportStar(require("./type"), exports);
29
- __exportStar(require("./utils"), exports);
1
+ "use strict";
2
+ /*
3
+ * Copyright (c) 2021.
4
+ * Author Peter Placzek (tada5hi)
5
+ * For the full copyright and license information,
6
+ * view the LICENSE file that was distributed with this source code.
7
+ */
8
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
9
+ if (k2 === undefined) k2 = k;
10
+ var desc = Object.getOwnPropertyDescriptor(m, k);
11
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
12
+ desc = { enumerable: true, get: function() { return m[k]; } };
13
+ }
14
+ Object.defineProperty(o, k2, desc);
15
+ }) : (function(o, m, k, k2) {
16
+ if (k2 === undefined) k2 = k;
17
+ o[k2] = m[k];
18
+ }));
19
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
20
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
21
+ };
22
+ Object.defineProperty(exports, "__esModule", { value: true });
23
+ __exportStar(require("./config"), exports);
24
+ __exportStar(require("./constants"), exports);
25
+ __exportStar(require("./metadata"), exports);
26
+ __exportStar(require("./generator"), exports);
27
+ __exportStar(require("./schema"), exports);
28
+ __exportStar(require("./type"), exports);
29
+ __exportStar(require("./utils"), exports);
30
30
  //# sourceMappingURL=index.js.map
@@ -1,4 +1,4 @@
1
- import { DecoratorConfig, DecoratorID, Metadata, Options as MetadataOptions, PresetSchema, TsCompilerOptions, TsConfig, generateMetadata, isMetadata } from '@trapi/metadata';
2
- import type { CacheOptions } from '@trapi/metadata';
3
- export { DecoratorConfig, DecoratorID, generateMetadata, isMetadata, CacheOptions, Metadata, MetadataOptions, PresetSchema, TsCompilerOptions, TsConfig, };
1
+ import { DecoratorConfig, DecoratorID, Metadata, Options as MetadataOptions, PresetSchema, TsCompilerOptions, TsConfig, generateMetadata, isMetadata } from '@trapi/metadata';
2
+ import type { CacheOptions } from '@trapi/metadata';
3
+ export { DecoratorConfig, DecoratorID, generateMetadata, isMetadata, CacheOptions, Metadata, MetadataOptions, PresetSchema, TsCompilerOptions, TsConfig, };
4
4
  //# sourceMappingURL=metadata.d.ts.map
package/dist/metadata.js CHANGED
@@ -1,14 +1,14 @@
1
- "use strict";
2
- /*
3
- * Copyright (c) 2021.
4
- * Author Peter Placzek (tada5hi)
5
- * For the full copyright and license information,
6
- * view the LICENSE file that was distributed with this source code.
7
- */
8
- Object.defineProperty(exports, "__esModule", { value: true });
9
- exports.isMetadata = exports.generateMetadata = exports.DecoratorID = void 0;
10
- const metadata_1 = require("@trapi/metadata");
11
- Object.defineProperty(exports, "DecoratorID", { enumerable: true, get: function () { return metadata_1.DecoratorID; } });
12
- Object.defineProperty(exports, "generateMetadata", { enumerable: true, get: function () { return metadata_1.generateMetadata; } });
13
- Object.defineProperty(exports, "isMetadata", { enumerable: true, get: function () { return metadata_1.isMetadata; } });
1
+ "use strict";
2
+ /*
3
+ * Copyright (c) 2021.
4
+ * Author Peter Placzek (tada5hi)
5
+ * For the full copyright and license information,
6
+ * view the LICENSE file that was distributed with this source code.
7
+ */
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.isMetadata = exports.generateMetadata = exports.DecoratorID = void 0;
10
+ const metadata_1 = require("@trapi/metadata");
11
+ Object.defineProperty(exports, "DecoratorID", { enumerable: true, get: function () { return metadata_1.DecoratorID; } });
12
+ Object.defineProperty(exports, "generateMetadata", { enumerable: true, get: function () { return metadata_1.generateMetadata; } });
13
+ Object.defineProperty(exports, "isMetadata", { enumerable: true, get: function () { return metadata_1.isMetadata; } });
14
14
  //# sourceMappingURL=metadata.js.map
@@ -1,28 +1,28 @@
1
- export declare enum TransferProtocol {
2
- HTTP = "http",
3
- HTTPS = "https",
4
- WS = "ws",
5
- WSS = "wss"
6
- }
7
- export declare enum DataFormatName {
8
- INT_32 = "int32",
9
- INT_64 = "int64",
10
- FLOAT = "float",
11
- DOUBLE = "double",
12
- BYTE = "byte",
13
- BINARY = "binary",
14
- DATE = "date",
15
- DATE_TIME = "date-time",
16
- PASSWORD = "password"
17
- }
18
- export declare enum DataTypeName {
19
- VOID = "void",
20
- INTEGER = "integer",
21
- NUMBER = "number",
22
- BOOLEAN = "boolean",
23
- STRING = "string",
24
- ARRAY = "array",
25
- OBJECT = "object",
26
- FILE = "file"
27
- }
1
+ export declare enum TransferProtocol {
2
+ HTTP = "http",
3
+ HTTPS = "https",
4
+ WS = "ws",
5
+ WSS = "wss"
6
+ }
7
+ export declare enum DataFormatName {
8
+ INT_32 = "int32",
9
+ INT_64 = "int64",
10
+ FLOAT = "float",
11
+ DOUBLE = "double",
12
+ BYTE = "byte",
13
+ BINARY = "binary",
14
+ DATE = "date",
15
+ DATE_TIME = "date-time",
16
+ PASSWORD = "password"
17
+ }
18
+ export declare enum DataTypeName {
19
+ VOID = "void",
20
+ INTEGER = "integer",
21
+ NUMBER = "number",
22
+ BOOLEAN = "boolean",
23
+ STRING = "string",
24
+ ARRAY = "array",
25
+ OBJECT = "object",
26
+ FILE = "file"
27
+ }
28
28
  //# sourceMappingURL=constants.d.ts.map
@@ -1,40 +1,40 @@
1
- "use strict";
2
- /*
3
- * Copyright (c) 2023.
4
- * Author Peter Placzek (tada5hi)
5
- * For the full copyright and license information,
6
- * view the LICENSE file that was distributed with this source code.
7
- */
8
- Object.defineProperty(exports, "__esModule", { value: true });
9
- exports.DataTypeName = exports.DataFormatName = exports.TransferProtocol = void 0;
10
- var TransferProtocol;
11
- (function (TransferProtocol) {
12
- TransferProtocol["HTTP"] = "http";
13
- TransferProtocol["HTTPS"] = "https";
14
- TransferProtocol["WS"] = "ws";
15
- TransferProtocol["WSS"] = "wss";
16
- })(TransferProtocol = exports.TransferProtocol || (exports.TransferProtocol = {}));
17
- var DataFormatName;
18
- (function (DataFormatName) {
19
- DataFormatName["INT_32"] = "int32";
20
- DataFormatName["INT_64"] = "int64";
21
- DataFormatName["FLOAT"] = "float";
22
- DataFormatName["DOUBLE"] = "double";
23
- DataFormatName["BYTE"] = "byte";
24
- DataFormatName["BINARY"] = "binary";
25
- DataFormatName["DATE"] = "date";
26
- DataFormatName["DATE_TIME"] = "date-time";
27
- DataFormatName["PASSWORD"] = "password";
28
- })(DataFormatName = exports.DataFormatName || (exports.DataFormatName = {}));
29
- var DataTypeName;
30
- (function (DataTypeName) {
31
- DataTypeName["VOID"] = "void";
32
- DataTypeName["INTEGER"] = "integer";
33
- DataTypeName["NUMBER"] = "number";
34
- DataTypeName["BOOLEAN"] = "boolean";
35
- DataTypeName["STRING"] = "string";
36
- DataTypeName["ARRAY"] = "array";
37
- DataTypeName["OBJECT"] = "object";
38
- DataTypeName["FILE"] = "file";
39
- })(DataTypeName = exports.DataTypeName || (exports.DataTypeName = {}));
1
+ "use strict";
2
+ /*
3
+ * Copyright (c) 2023.
4
+ * Author Peter Placzek (tada5hi)
5
+ * For the full copyright and license information,
6
+ * view the LICENSE file that was distributed with this source code.
7
+ */
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.DataTypeName = exports.DataFormatName = exports.TransferProtocol = void 0;
10
+ var TransferProtocol;
11
+ (function (TransferProtocol) {
12
+ TransferProtocol["HTTP"] = "http";
13
+ TransferProtocol["HTTPS"] = "https";
14
+ TransferProtocol["WS"] = "ws";
15
+ TransferProtocol["WSS"] = "wss";
16
+ })(TransferProtocol = exports.TransferProtocol || (exports.TransferProtocol = {}));
17
+ var DataFormatName;
18
+ (function (DataFormatName) {
19
+ DataFormatName["INT_32"] = "int32";
20
+ DataFormatName["INT_64"] = "int64";
21
+ DataFormatName["FLOAT"] = "float";
22
+ DataFormatName["DOUBLE"] = "double";
23
+ DataFormatName["BYTE"] = "byte";
24
+ DataFormatName["BINARY"] = "binary";
25
+ DataFormatName["DATE"] = "date";
26
+ DataFormatName["DATE_TIME"] = "date-time";
27
+ DataFormatName["PASSWORD"] = "password";
28
+ })(DataFormatName = exports.DataFormatName || (exports.DataFormatName = {}));
29
+ var DataTypeName;
30
+ (function (DataTypeName) {
31
+ DataTypeName["VOID"] = "void";
32
+ DataTypeName["INTEGER"] = "integer";
33
+ DataTypeName["NUMBER"] = "number";
34
+ DataTypeName["BOOLEAN"] = "boolean";
35
+ DataTypeName["STRING"] = "string";
36
+ DataTypeName["ARRAY"] = "array";
37
+ DataTypeName["OBJECT"] = "object";
38
+ DataTypeName["FILE"] = "file";
39
+ })(DataTypeName = exports.DataTypeName || (exports.DataTypeName = {}));
40
40
  //# sourceMappingURL=constants.js.map
@@ -1,5 +1,5 @@
1
- export * from './v2';
2
- export * from './v3';
3
- export * from './constants';
4
- export * from './type';
1
+ export * from './v2';
2
+ export * from './v3';
3
+ export * from './constants';
4
+ export * from './type';
5
5
  //# sourceMappingURL=index.d.ts.map
@@ -1,27 +1,27 @@
1
- "use strict";
2
- /*
3
- * Copyright (c) 2021.
4
- * Author Peter Placzek (tada5hi)
5
- * For the full copyright and license information,
6
- * view the LICENSE file that was distributed with this source code.
7
- */
8
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
9
- if (k2 === undefined) k2 = k;
10
- var desc = Object.getOwnPropertyDescriptor(m, k);
11
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
12
- desc = { enumerable: true, get: function() { return m[k]; } };
13
- }
14
- Object.defineProperty(o, k2, desc);
15
- }) : (function(o, m, k, k2) {
16
- if (k2 === undefined) k2 = k;
17
- o[k2] = m[k];
18
- }));
19
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
20
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
21
- };
22
- Object.defineProperty(exports, "__esModule", { value: true });
23
- __exportStar(require("./v2"), exports);
24
- __exportStar(require("./v3"), exports);
25
- __exportStar(require("./constants"), exports);
26
- __exportStar(require("./type"), exports);
1
+ "use strict";
2
+ /*
3
+ * Copyright (c) 2021.
4
+ * Author Peter Placzek (tada5hi)
5
+ * For the full copyright and license information,
6
+ * view the LICENSE file that was distributed with this source code.
7
+ */
8
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
9
+ if (k2 === undefined) k2 = k;
10
+ var desc = Object.getOwnPropertyDescriptor(m, k);
11
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
12
+ desc = { enumerable: true, get: function() { return m[k]; } };
13
+ }
14
+ Object.defineProperty(o, k2, desc);
15
+ }) : (function(o, m, k, k2) {
16
+ if (k2 === undefined) k2 = k;
17
+ o[k2] = m[k];
18
+ }));
19
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
20
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
21
+ };
22
+ Object.defineProperty(exports, "__esModule", { value: true });
23
+ __exportStar(require("./v2"), exports);
24
+ __exportStar(require("./v3"), exports);
25
+ __exportStar(require("./constants"), exports);
26
+ __exportStar(require("./type"), exports);
27
27
  //# sourceMappingURL=index.js.map
@@ -1,139 +1,139 @@
1
- import type { CollectionFormat } from '@trapi/metadata';
2
- import type { DataFormatName, DataTypeName } from './constants';
3
- import type { ParameterSourceV2 } from './v2';
4
- export interface BaseSpec {
5
- info: Info;
6
- tags?: Tag[];
7
- externalDocs?: ExternalDocs;
8
- }
9
- export type Info = {
10
- title: string;
11
- version: string;
12
- description?: string;
13
- termsOfService?: string;
14
- contact?: Contact;
15
- license?: License;
16
- };
17
- type Contact = {
18
- name?: string;
19
- email?: string;
20
- url?: string;
21
- };
22
- type License = {
23
- name: string;
24
- url?: string;
25
- };
26
- type ExternalDocs = {
27
- url: string;
28
- description?: string;
29
- };
30
- type Tag = {
31
- name: string;
32
- description?: string;
33
- externalDocs?: ExternalDocs;
34
- };
35
- export interface BaseResponse {
36
- description: string;
37
- }
38
- export interface BaseOperation<P, R> {
39
- responses: {
40
- [name: string]: R;
41
- };
42
- summary?: string;
43
- description?: string;
44
- externalDocs?: ExternalDocs;
45
- operationId?: string;
46
- consumes?: string[];
47
- parameters?: P[];
48
- schemes?: string[];
49
- deprecated?: boolean;
50
- security?: Record<string, string[]>[];
51
- tags?: string[];
52
- }
53
- export interface Example {
54
- value: unknown | unknown[];
55
- summary?: string;
56
- description?: string;
57
- }
58
- export interface BaseSchema<T> {
59
- type?: `${DataTypeName}`;
60
- format?: `${DataFormatName}`;
61
- title?: string;
62
- description?: string;
63
- default?: string | boolean | number | any;
64
- multipleOf?: number;
65
- maximum?: number;
66
- exclusiveMaximum?: number;
67
- minimum?: number;
68
- exclusiveMinimum?: number;
69
- maxLength?: number;
70
- minLength?: number;
71
- pattern?: string;
72
- maxItems?: number;
73
- minItems?: number;
74
- uniqueItems?: boolean;
75
- maxProperties?: number;
76
- minProperties?: number;
77
- enum?: Array<string | number | boolean>;
78
- 'x-enum-varnames'?: string[];
79
- items?: T | BaseSchema<T> | any;
80
- additionalProperties?: boolean | {
81
- [ref: string]: string;
82
- } | T;
83
- properties?: {
84
- [propertyName: string]: T;
85
- };
86
- discriminator?: string;
87
- readOnly?: boolean;
88
- xml?: XML;
89
- externalDocs?: ExternalDocs;
90
- example?: {
91
- [exampleName: string]: Example;
92
- } | unknown;
93
- required?: string[];
94
- $ref?: string;
95
- }
96
- interface XML {
97
- type?: string;
98
- namespace?: string;
99
- prefix?: string;
100
- attribute?: string;
101
- wrapped?: boolean;
102
- }
103
- export interface BaseParameter {
104
- name: string;
105
- in: `${ParameterSourceV2}`;
106
- required?: boolean;
107
- description?: string;
108
- }
109
- export interface BodyParameter extends BaseParameter {
110
- in: `${ParameterSourceV2.BODY}`;
111
- }
112
- export interface QueryParameter extends BaseParameter {
113
- in: `${ParameterSourceV2.QUERY}`;
114
- allowEmptyValue?: boolean;
115
- collectionFormat?: `${CollectionFormat}`;
116
- }
117
- export interface PathParameter extends BaseParameter {
118
- in: `${ParameterSourceV2.PATH}`;
119
- }
120
- export interface HeaderParameter extends BaseParameter {
121
- in: `${ParameterSourceV2.HEADER}`;
122
- }
123
- export interface FormDataParameter extends BaseParameter {
124
- in: `${ParameterSourceV2.FORM_DATA}`;
125
- collectionFormat?: `${CollectionFormat}`;
126
- }
127
- export interface Path<Operation, Parameter> {
128
- $ref?: string;
129
- get?: Operation;
130
- put?: Operation;
131
- post?: Operation;
132
- delete?: Operation;
133
- options?: Operation;
134
- head?: Operation;
135
- patch?: Operation;
136
- parameters?: Parameter[];
137
- }
138
- export {};
1
+ import type { CollectionFormat } from '@trapi/metadata';
2
+ import type { DataFormatName, DataTypeName } from './constants';
3
+ import type { ParameterSourceV2 } from './v2';
4
+ export interface BaseSpec {
5
+ info: Info;
6
+ tags?: Tag[];
7
+ externalDocs?: ExternalDocs;
8
+ }
9
+ export type Info = {
10
+ title: string;
11
+ version: string;
12
+ description?: string;
13
+ termsOfService?: string;
14
+ contact?: Contact;
15
+ license?: License;
16
+ };
17
+ type Contact = {
18
+ name?: string;
19
+ email?: string;
20
+ url?: string;
21
+ };
22
+ type License = {
23
+ name: string;
24
+ url?: string;
25
+ };
26
+ type ExternalDocs = {
27
+ url: string;
28
+ description?: string;
29
+ };
30
+ type Tag = {
31
+ name: string;
32
+ description?: string;
33
+ externalDocs?: ExternalDocs;
34
+ };
35
+ export interface BaseResponse {
36
+ description: string;
37
+ }
38
+ export interface BaseOperation<P, R> {
39
+ responses: {
40
+ [name: string]: R;
41
+ };
42
+ summary?: string;
43
+ description?: string;
44
+ externalDocs?: ExternalDocs;
45
+ operationId?: string;
46
+ consumes?: string[];
47
+ parameters?: P[];
48
+ schemes?: string[];
49
+ deprecated?: boolean;
50
+ security?: Record<string, string[]>[];
51
+ tags?: string[];
52
+ }
53
+ export interface Example {
54
+ value: unknown | unknown[];
55
+ summary?: string;
56
+ description?: string;
57
+ }
58
+ export interface BaseSchema<T> {
59
+ type?: `${DataTypeName}`;
60
+ format?: `${DataFormatName}`;
61
+ title?: string;
62
+ description?: string;
63
+ default?: string | boolean | number | any;
64
+ multipleOf?: number;
65
+ maximum?: number;
66
+ exclusiveMaximum?: number;
67
+ minimum?: number;
68
+ exclusiveMinimum?: number;
69
+ maxLength?: number;
70
+ minLength?: number;
71
+ pattern?: string;
72
+ maxItems?: number;
73
+ minItems?: number;
74
+ uniqueItems?: boolean;
75
+ maxProperties?: number;
76
+ minProperties?: number;
77
+ enum?: Array<string | number | boolean>;
78
+ 'x-enum-varnames'?: string[];
79
+ items?: T | BaseSchema<T> | any;
80
+ additionalProperties?: boolean | {
81
+ [ref: string]: string;
82
+ } | T;
83
+ properties?: {
84
+ [propertyName: string]: T;
85
+ };
86
+ discriminator?: string;
87
+ readOnly?: boolean;
88
+ xml?: XML;
89
+ externalDocs?: ExternalDocs;
90
+ example?: {
91
+ [exampleName: string]: Example;
92
+ } | unknown;
93
+ required?: string[];
94
+ $ref?: string;
95
+ }
96
+ interface XML {
97
+ type?: string;
98
+ namespace?: string;
99
+ prefix?: string;
100
+ attribute?: string;
101
+ wrapped?: boolean;
102
+ }
103
+ export interface BaseParameter {
104
+ name: string;
105
+ in: `${ParameterSourceV2}`;
106
+ required?: boolean;
107
+ description?: string;
108
+ }
109
+ export interface BodyParameter extends BaseParameter {
110
+ in: `${ParameterSourceV2.BODY}`;
111
+ }
112
+ export interface QueryParameter extends BaseParameter {
113
+ in: `${ParameterSourceV2.QUERY}`;
114
+ allowEmptyValue?: boolean;
115
+ collectionFormat?: `${CollectionFormat}`;
116
+ }
117
+ export interface PathParameter extends BaseParameter {
118
+ in: `${ParameterSourceV2.PATH}`;
119
+ }
120
+ export interface HeaderParameter extends BaseParameter {
121
+ in: `${ParameterSourceV2.HEADER}`;
122
+ }
123
+ export interface FormDataParameter extends BaseParameter {
124
+ in: `${ParameterSourceV2.FORM_DATA}`;
125
+ collectionFormat?: `${CollectionFormat}`;
126
+ }
127
+ export interface Path<Operation, Parameter> {
128
+ $ref?: string;
129
+ get?: Operation;
130
+ put?: Operation;
131
+ post?: Operation;
132
+ delete?: Operation;
133
+ options?: Operation;
134
+ head?: Operation;
135
+ patch?: Operation;
136
+ parameters?: Parameter[];
137
+ }
138
+ export {};
139
139
  //# sourceMappingURL=type.d.ts.map
@@ -1,9 +1,9 @@
1
- "use strict";
2
- /*
3
- * Copyright (c) 2021.
4
- * Author Peter Placzek (tada5hi)
5
- * For the full copyright and license information,
6
- * view the LICENSE file that was distributed with this source code.
7
- */
8
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ "use strict";
2
+ /*
3
+ * Copyright (c) 2021.
4
+ * Author Peter Placzek (tada5hi)
5
+ * For the full copyright and license information,
6
+ * view the LICENSE file that was distributed with this source code.
7
+ */
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
9
  //# sourceMappingURL=type.js.map
@@ -1,8 +1,8 @@
1
- export declare enum ParameterSourceV2 {
2
- BODY = "body",
3
- FORM_DATA = "formData",
4
- HEADER = "header",
5
- PATH = "path",
6
- QUERY = "query"
7
- }
1
+ export declare enum ParameterSourceV2 {
2
+ BODY = "body",
3
+ FORM_DATA = "formData",
4
+ HEADER = "header",
5
+ PATH = "path",
6
+ QUERY = "query"
7
+ }
8
8
  //# sourceMappingURL=constants.d.ts.map