openapi-resource-converter 0.0.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.
Files changed (124) hide show
  1. package/README.md +170 -0
  2. package/dist/converter/constant/convert-type.js +19 -0
  3. package/dist/converter/constant/convert-type.js.map +1 -0
  4. package/dist/converter/constant/i-convert-output.js +3 -0
  5. package/dist/converter/constant/i-convert-output.js.map +1 -0
  6. package/dist/converter/i-openapi-converter.js +3 -0
  7. package/dist/converter/i-openapi-converter.js.map +1 -0
  8. package/dist/converter/postman/postman-collection-converter.js +210 -0
  9. package/dist/converter/postman/postman-collection-converter.js.map +1 -0
  10. package/dist/converter/postman/postman-command-builder.js +73 -0
  11. package/dist/converter/postman/postman-command-builder.js.map +1 -0
  12. package/dist/converter/postman/postman-convert-configures.js +81 -0
  13. package/dist/converter/postman/postman-convert-configures.js.map +1 -0
  14. package/dist/index.js +36 -0
  15. package/dist/index.js.map +1 -0
  16. package/dist/parser/component-parser.js +96 -0
  17. package/dist/parser/component-parser.js.map +1 -0
  18. package/dist/parser/field-parser.js +6 -0
  19. package/dist/parser/field-parser.js.map +1 -0
  20. package/dist/parser/open-api-parser.js +136 -0
  21. package/dist/parser/open-api-parser.js.map +1 -0
  22. package/dist/parser/parameters-parser.js +42 -0
  23. package/dist/parser/parameters-parser.js.map +1 -0
  24. package/dist/parser/postman-config-parser.js +195 -0
  25. package/dist/parser/postman-config-parser.js.map +1 -0
  26. package/dist/parser/request-body-parser.js +73 -0
  27. package/dist/parser/request-body-parser.js.map +1 -0
  28. package/dist/type/open-api/api-specification.js +79 -0
  29. package/dist/type/open-api/api-specification.js.map +1 -0
  30. package/dist/type/open-api/constant/content-type.js +9 -0
  31. package/dist/type/open-api/constant/content-type.js.map +1 -0
  32. package/dist/type/open-api/constant/data-format.js +36 -0
  33. package/dist/type/open-api/constant/data-format.js.map +1 -0
  34. package/dist/type/open-api/constant/data-type.js +44 -0
  35. package/dist/type/open-api/constant/data-type.js.map +1 -0
  36. package/dist/type/open-api/constant/http-method.js +45 -0
  37. package/dist/type/open-api/constant/http-method.js.map +1 -0
  38. package/dist/type/open-api/constant/in-type.js +30 -0
  39. package/dist/type/open-api/constant/in-type.js.map +1 -0
  40. package/dist/type/open-api/constant/named-literal.js +17 -0
  41. package/dist/type/open-api/constant/named-literal.js.map +1 -0
  42. package/dist/type/open-api/constant/protocol-type.js +40 -0
  43. package/dist/type/open-api/constant/protocol-type.js.map +1 -0
  44. package/dist/type/open-api/open-api-specification.js +43 -0
  45. package/dist/type/open-api/open-api-specification.js.map +1 -0
  46. package/dist/type/open-api/project/contact.js +37 -0
  47. package/dist/type/open-api/project/contact.js.map +1 -0
  48. package/dist/type/open-api/project/project-information.js +49 -0
  49. package/dist/type/open-api/project/project-information.js.map +1 -0
  50. package/dist/type/open-api/protocol/empty-body.js +12 -0
  51. package/dist/type/open-api/protocol/empty-body.js.map +1 -0
  52. package/dist/type/open-api/protocol/open-api-request.js +44 -0
  53. package/dist/type/open-api/protocol/open-api-request.js.map +1 -0
  54. package/dist/type/open-api/protocol/parameters.js +28 -0
  55. package/dist/type/open-api/protocol/parameters.js.map +1 -0
  56. package/dist/type/open-api/protocol/request-body.js +39 -0
  57. package/dist/type/open-api/protocol/request-body.js.map +1 -0
  58. package/dist/type/open-api/sub/i-field.js +3 -0
  59. package/dist/type/open-api/sub/i-field.js.map +1 -0
  60. package/dist/type/open-api/sub/object-field.js +49 -0
  61. package/dist/type/open-api/sub/object-field.js.map +1 -0
  62. package/dist/type/open-api/sub/parameter.js +70 -0
  63. package/dist/type/open-api/sub/parameter.js.map +1 -0
  64. package/dist/type/open-api/sub/tag.js +32 -0
  65. package/dist/type/open-api/sub/tag.js.map +1 -0
  66. package/dist/type/open-api/sub/value-field.js +80 -0
  67. package/dist/type/open-api/sub/value-field.js.map +1 -0
  68. package/dist/type/open-api/sub/version.js +53 -0
  69. package/dist/type/open-api/sub/version.js.map +1 -0
  70. package/dist/type/path.js +62 -0
  71. package/dist/type/path.js.map +1 -0
  72. package/dist/type/postman/constant/case-mode.js +58 -0
  73. package/dist/type/postman/constant/case-mode.js.map +1 -0
  74. package/dist/type/postman/constant/default-value.js +69 -0
  75. package/dist/type/postman/constant/default-value.js.map +1 -0
  76. package/dist/type/postman/constant/request-mode.js +44 -0
  77. package/dist/type/postman/constant/request-mode.js.map +1 -0
  78. package/dist/type/postman/i-postman-node.js +3 -0
  79. package/dist/type/postman/i-postman-node.js.map +1 -0
  80. package/dist/type/postman/i-postman-object.js +3 -0
  81. package/dist/type/postman/i-postman-object.js.map +1 -0
  82. package/dist/type/postman/i-postman-request-body.js +3 -0
  83. package/dist/type/postman/i-postman-request-body.js.map +1 -0
  84. package/dist/type/postman/parsed-postman-option.js +72 -0
  85. package/dist/type/postman/parsed-postman-option.js.map +1 -0
  86. package/dist/type/postman/postman-body-wrapper.js +46 -0
  87. package/dist/type/postman/postman-body-wrapper.js.map +1 -0
  88. package/dist/type/postman/postman-directory.js +61 -0
  89. package/dist/type/postman/postman-directory.js.map +1 -0
  90. package/dist/type/postman/postman-formdata.js +21 -0
  91. package/dist/type/postman/postman-formdata.js.map +1 -0
  92. package/dist/type/postman/postman-header.js +32 -0
  93. package/dist/type/postman/postman-header.js.map +1 -0
  94. package/dist/type/postman/postman-import-file.js +17 -0
  95. package/dist/type/postman/postman-import-file.js.map +1 -0
  96. package/dist/type/postman/postman-info.js +52 -0
  97. package/dist/type/postman/postman-info.js.map +1 -0
  98. package/dist/type/postman/postman-options.js +29 -0
  99. package/dist/type/postman/postman-options.js.map +1 -0
  100. package/dist/type/postman/postman-path-variable.js +72 -0
  101. package/dist/type/postman/postman-path-variable.js.map +1 -0
  102. package/dist/type/postman/postman-query.js +49 -0
  103. package/dist/type/postman/postman-query.js.map +1 -0
  104. package/dist/type/postman/postman-request-body.js +3 -0
  105. package/dist/type/postman/postman-request-body.js.map +1 -0
  106. package/dist/type/postman/postman-request-wrapper-template.js +41 -0
  107. package/dist/type/postman/postman-request-wrapper-template.js.map +1 -0
  108. package/dist/type/postman/postman-request-wrapper.js +29 -0
  109. package/dist/type/postman/postman-request-wrapper.js.map +1 -0
  110. package/dist/type/postman/postman-request.js +52 -0
  111. package/dist/type/postman/postman-request.js.map +1 -0
  112. package/dist/type/postman/postman-url.js +71 -0
  113. package/dist/type/postman/postman-url.js.map +1 -0
  114. package/dist/type/postman/type-value.js +29 -0
  115. package/dist/type/postman/type-value.js.map +1 -0
  116. package/dist/util/collection-util.js +59 -0
  117. package/dist/util/collection-util.js.map +1 -0
  118. package/dist/util/file-util.js +34 -0
  119. package/dist/util/file-util.js.map +1 -0
  120. package/dist/util/object-util.js +160 -0
  121. package/dist/util/object-util.js.map +1 -0
  122. package/dist/util/string-util.js +20 -0
  123. package/dist/util/string-util.js.map +1 -0
  124. package/package.json +53 -0
@@ -0,0 +1,79 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ var path_1 = __importDefault(require("@/type/path"));
7
+ var object_util_1 = require("@/util/object-util");
8
+ var named_literal_1 = __importDefault(require("@/type/open-api/constant/named-literal"));
9
+ var ApiSpecification = /** @class */ (function () {
10
+ function ApiSpecification(request, requestBody, parameters) {
11
+ var self = request.metadata;
12
+ this._method = request.method;
13
+ this._path = new path_1.default(request.path);
14
+ this._tags = (0, object_util_1.getProp)(self.value, named_literal_1.default.TAGS);
15
+ this._summary = (0, object_util_1.getProp)(self.value, named_literal_1.default.SUMMARY);
16
+ this._operationId = (0, object_util_1.getProp)(self.value, named_literal_1.default.OPERATION_ID);
17
+ this._requestBody = requestBody;
18
+ this._parameters = parameters;
19
+ }
20
+ Object.defineProperty(ApiSpecification.prototype, "method", {
21
+ get: function () {
22
+ return this._method;
23
+ },
24
+ enumerable: false,
25
+ configurable: true
26
+ });
27
+ Object.defineProperty(ApiSpecification.prototype, "path", {
28
+ get: function () {
29
+ return this._path;
30
+ },
31
+ enumerable: false,
32
+ configurable: true
33
+ });
34
+ Object.defineProperty(ApiSpecification.prototype, "tags", {
35
+ get: function () {
36
+ return this._tags;
37
+ },
38
+ enumerable: false,
39
+ configurable: true
40
+ });
41
+ Object.defineProperty(ApiSpecification.prototype, "summary", {
42
+ get: function () {
43
+ return this._summary;
44
+ },
45
+ enumerable: false,
46
+ configurable: true
47
+ });
48
+ Object.defineProperty(ApiSpecification.prototype, "operationId", {
49
+ get: function () {
50
+ return this._operationId;
51
+ },
52
+ enumerable: false,
53
+ configurable: true
54
+ });
55
+ Object.defineProperty(ApiSpecification.prototype, "requestBody", {
56
+ get: function () {
57
+ return this._requestBody;
58
+ },
59
+ enumerable: false,
60
+ configurable: true
61
+ });
62
+ Object.defineProperty(ApiSpecification.prototype, "hasParameters", {
63
+ get: function () {
64
+ return this._parameters !== undefined;
65
+ },
66
+ enumerable: false,
67
+ configurable: true
68
+ });
69
+ Object.defineProperty(ApiSpecification.prototype, "parameters", {
70
+ get: function () {
71
+ return this._parameters;
72
+ },
73
+ enumerable: false,
74
+ configurable: true
75
+ });
76
+ return ApiSpecification;
77
+ }());
78
+ exports.default = ApiSpecification;
79
+ //# sourceMappingURL=api-specification.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api-specification.js","sourceRoot":"","sources":["../../../src/type/open-api/api-specification.ts"],"names":[],"mappings":";;;;;AACA,qDAA+B;AAG/B,kDAA2C;AAC3C,yFAAkE;AAIlE;IAUI,0BACI,OAAuB,EACvB,WAAoC,EACpC,UAAuB;QAEvB,IAAM,IAAI,GAAG,OAAO,CAAC,QAAQ,CAAC;QAC9B,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC;QAC9B,IAAI,CAAC,KAAK,GAAG,IAAI,cAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QACpC,IAAI,CAAC,KAAK,GAAG,IAAA,qBAAO,EAAgB,IAAI,CAAC,KAAK,EAAE,uBAAY,CAAC,IAAI,CAAC,CAAC;QACnE,IAAI,CAAC,QAAQ,GAAG,IAAA,qBAAO,EAAS,IAAI,CAAC,KAAK,EAAE,uBAAY,CAAC,OAAO,CAAC,CAAC;QAClE,IAAI,CAAC,YAAY,GAAG,IAAA,qBAAO,EAAS,IAAI,CAAC,KAAK,EAAE,uBAAY,CAAC,YAAY,CAAC,CAAC;QAC3E,IAAI,CAAC,YAAY,GAAG,WAAW,CAAC;QAChC,IAAI,CAAC,WAAW,GAAG,UAAU,CAAC;IAClC,CAAC;IAED,sBAAI,oCAAM;aAAV;YACI,OAAO,IAAI,CAAC,OAAO,CAAC;QACxB,CAAC;;;OAAA;IAED,sBAAI,kCAAI;aAAR;YACI,OAAO,IAAI,CAAC,KAAK,CAAC;QACtB,CAAC;;;OAAA;IAED,sBAAI,kCAAI;aAAR;YACI,OAAO,IAAI,CAAC,KAAK,CAAC;QACtB,CAAC;;;OAAA;IAED,sBAAI,qCAAO;aAAX;YACI,OAAO,IAAI,CAAC,QAAQ,CAAC;QACzB,CAAC;;;OAAA;IAED,sBAAI,yCAAW;aAAf;YACI,OAAO,IAAI,CAAC,YAAY,CAAC;QAC7B,CAAC;;;OAAA;IAED,sBAAI,yCAAW;aAAf;YACI,OAAO,IAAI,CAAC,YAAY,CAAC;QAC7B,CAAC;;;OAAA;IAED,sBAAI,2CAAa;aAAjB;YACI,OAAO,IAAI,CAAC,WAAW,KAAK,SAAS,CAAC;QAC1C,CAAC;;;OAAA;IAED,sBAAI,wCAAU;aAAd;YACI,OAAO,IAAI,CAAC,WAAW,CAAC;QAC5B,CAAC;;;OAAA;IACL,uBAAC;AAAD,CAAC,AAxDD,IAwDC"}
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ContentType = void 0;
4
+ var ContentType;
5
+ (function (ContentType) {
6
+ ContentType["APPLICATION_JSON"] = "application/json";
7
+ ContentType["APPLICATION_X_WWW_FORM_URLENCODED"] = "application/x-www-form-urlencoded";
8
+ })(ContentType || (exports.ContentType = ContentType = {}));
9
+ //# sourceMappingURL=content-type.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"content-type.js","sourceRoot":"","sources":["../../../../src/type/open-api/constant/content-type.ts"],"names":[],"mappings":";;;AAAA,IAAY,WAGX;AAHD,WAAY,WAAW;IACnB,oDAAqC,CAAA;IACrC,sFAAuE,CAAA;AAC3E,CAAC,EAHW,WAAW,2BAAX,WAAW,QAGtB"}
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ var collection_util_1 = require("@/util/collection-util");
4
+ var DataFormat = /** @class */ (function () {
5
+ function DataFormat(value) {
6
+ this._value = value;
7
+ }
8
+ Object.defineProperty(DataFormat.prototype, "value", {
9
+ get: function () {
10
+ return this._value;
11
+ },
12
+ enumerable: false,
13
+ configurable: true
14
+ });
15
+ DataFormat.values = function () {
16
+ return Array.of(DataFormat.INT32, DataFormat.INT64, DataFormat.FLOAT, DataFormat.DOUBLE, DataFormat.NONE);
17
+ };
18
+ DataFormat.fromValue = function (value) {
19
+ var _a;
20
+ return (_a = DataFormat.CACHED.get(value)) !== null && _a !== void 0 ? _a : DataFormat.NONE;
21
+ };
22
+ DataFormat.prototype.toJSON = function () {
23
+ return {
24
+ value: this._value
25
+ };
26
+ };
27
+ DataFormat.INT32 = new DataFormat("int32");
28
+ DataFormat.INT64 = new DataFormat("int64");
29
+ DataFormat.FLOAT = new DataFormat("float");
30
+ DataFormat.DOUBLE = new DataFormat("double");
31
+ DataFormat.NONE = new DataFormat("none");
32
+ DataFormat.CACHED = (0, collection_util_1.toMap)(DataFormat.values(), function (dataFormat) { return dataFormat.value; });
33
+ return DataFormat;
34
+ }());
35
+ exports.default = DataFormat;
36
+ //# sourceMappingURL=data-format.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"data-format.js","sourceRoot":"","sources":["../../../../src/type/open-api/constant/data-format.ts"],"names":[],"mappings":";;AAAA,0DAA+C;AAE/C;IAUI,oBAAY,KAAa;QACrB,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;IACxB,CAAC;IAED,sBAAI,6BAAK;aAAT;YACI,OAAO,IAAI,CAAC,MAAM,CAAC;QACvB,CAAC;;;OAAA;IAEM,iBAAM,GAAb;QACI,OAAO,KAAK,CAAC,EAAE,CACX,UAAU,CAAC,KAAK,EAChB,UAAU,CAAC,KAAK,EAChB,UAAU,CAAC,KAAK,EAChB,UAAU,CAAC,MAAM,EACjB,UAAU,CAAC,IAAI,CAClB,CAAA;IACL,CAAC;IAEM,oBAAS,GAAhB,UAAiB,KAAa;;QAC1B,OAAO,MAAA,UAAU,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,mCAAI,UAAU,CAAC,IAAI,CAAC;IAC3D,CAAC;IAEM,2BAAM,GAAb;QACI,OAAO;YACH,KAAK,EAAE,IAAI,CAAC,MAAM;SACrB,CAAA;IACL,CAAC;IAnCe,gBAAK,GAAG,IAAI,UAAU,CAAC,OAAO,CAAC,CAAC;IAChC,gBAAK,GAAG,IAAI,UAAU,CAAC,OAAO,CAAC,CAAC;IAChC,gBAAK,GAAG,IAAI,UAAU,CAAC,OAAO,CAAC,CAAC;IAChC,iBAAM,GAAG,IAAI,UAAU,CAAC,QAAQ,CAAC,CAAC;IAClC,eAAI,GAAG,IAAI,UAAU,CAAC,MAAM,CAAC,CAAC;IAGtB,iBAAM,GAAG,IAAA,uBAAK,EAAC,UAAU,CAAC,MAAM,EAAE,EAAE,UAAC,UAAU,IAAK,OAAA,UAAU,CAAC,KAAK,EAAhB,CAAgB,CAAC,CAAC;IA6BlG,iBAAC;CAAA,AArCD,IAqCC;kBArCoB,UAAU"}
@@ -0,0 +1,44 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ var collection_util_1 = require("@/util/collection-util");
4
+ var DataType = /** @class */ (function () {
5
+ function DataType(value) {
6
+ this._value = value;
7
+ }
8
+ Object.defineProperty(DataType.prototype, "value", {
9
+ get: function () {
10
+ return this._value;
11
+ },
12
+ enumerable: false,
13
+ configurable: true
14
+ });
15
+ DataType.values = function () {
16
+ return Array.of(DataType.STRING, DataType.NUMBER, DataType.INTEGER, DataType.BOOLEAN, DataType.OBJECT, DataType.ARRAY, DataType.NONE);
17
+ };
18
+ DataType.fromValue = function (value) {
19
+ var _a;
20
+ return (_a = DataType.CACHED.get(value)) !== null && _a !== void 0 ? _a : DataType.NONE;
21
+ };
22
+ DataType.prototype.equalsValue = function (value) {
23
+ return this._value === value;
24
+ };
25
+ DataType.prototype.toJSON = function () {
26
+ return {
27
+ value: this._value
28
+ };
29
+ };
30
+ DataType.prototype.isObject = function () {
31
+ return this._value === DataType.OBJECT.value;
32
+ };
33
+ DataType.STRING = new DataType("string");
34
+ DataType.NUMBER = new DataType("number");
35
+ DataType.INTEGER = new DataType("integer");
36
+ DataType.BOOLEAN = new DataType("boolean");
37
+ DataType.OBJECT = new DataType("object");
38
+ DataType.ARRAY = new DataType("array");
39
+ DataType.NONE = new DataType("none");
40
+ DataType.CACHED = (0, collection_util_1.toMap)(DataType.values(), function (dataType) { return dataType.value; });
41
+ return DataType;
42
+ }());
43
+ exports.default = DataType;
44
+ //# sourceMappingURL=data-type.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"data-type.js","sourceRoot":"","sources":["../../../../src/type/open-api/constant/data-type.ts"],"names":[],"mappings":";;AAAA,0DAA6C;AAE7C;IAYI,kBAAY,KAAa;QACrB,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;IACxB,CAAC;IAED,sBAAI,2BAAK;aAAT;YACI,OAAO,IAAI,CAAC,MAAM,CAAC;QACvB,CAAC;;;OAAA;IAEM,eAAM,GAAb;QACI,OAAO,KAAK,CAAC,EAAE,CACX,QAAQ,CAAC,MAAM,EACf,QAAQ,CAAC,MAAM,EACf,QAAQ,CAAC,OAAO,EAChB,QAAQ,CAAC,OAAO,EAChB,QAAQ,CAAC,MAAM,EACf,QAAQ,CAAC,KAAK,EACd,QAAQ,CAAC,IAAI,CAChB,CAAA;IACL,CAAC;IAEM,kBAAS,GAAhB,UAAiB,KAAa;;QAC1B,OAAO,MAAA,QAAQ,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,mCAAI,QAAQ,CAAC,IAAI,CAAC;IACvD,CAAC;IAEM,8BAAW,GAAlB,UAAmB,KAAa;QAC5B,OAAO,IAAI,CAAC,MAAM,KAAK,KAAK,CAAC;IACjC,CAAC;IAEM,yBAAM,GAAb;QACI,OAAO;YACH,KAAK,EAAE,IAAI,CAAC,MAAM;SACrB,CAAA;IACL,CAAC;IAEM,2BAAQ,GAAf;QACI,OAAO,IAAI,CAAC,MAAM,KAAK,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC;IACjD,CAAC;IA9CsB,eAAM,GAAG,IAAI,QAAQ,CAAC,QAAQ,CAAC,CAAC;IAChC,eAAM,GAAG,IAAI,QAAQ,CAAC,QAAQ,CAAC,CAAC;IAChC,gBAAO,GAAG,IAAI,QAAQ,CAAC,SAAS,CAAC,CAAC;IAClC,gBAAO,GAAG,IAAI,QAAQ,CAAC,SAAS,CAAC,CAAC;IAClC,eAAM,GAAG,IAAI,QAAQ,CAAC,QAAQ,CAAC,CAAC;IAChC,cAAK,GAAG,IAAI,QAAQ,CAAC,OAAO,CAAC,CAAC;IAC9B,aAAI,GAAG,IAAI,QAAQ,CAAC,MAAM,CAAC,CAAC;IAE3B,eAAM,GAAG,IAAA,uBAAK,EAAC,QAAQ,CAAC,MAAM,EAAE,EAAE,UAAC,QAAQ,IAAK,OAAA,QAAQ,CAAC,KAAK,EAAd,CAAc,CAAC,CAAC;IAuC5F,eAAC;CAAA,AAjDD,IAiDC;kBAjDoB,QAAQ"}
@@ -0,0 +1,45 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ var collection_util_1 = require("@/util/collection-util");
4
+ var HttpMethod = /** @class */ (function () {
5
+ function HttpMethod(value) {
6
+ this._value = value;
7
+ }
8
+ Object.defineProperty(HttpMethod.prototype, "value", {
9
+ get: function () {
10
+ return this._value;
11
+ },
12
+ enumerable: false,
13
+ configurable: true
14
+ });
15
+ Object.defineProperty(HttpMethod.prototype, "upperValue", {
16
+ get: function () {
17
+ return this._value.toUpperCase();
18
+ },
19
+ enumerable: false,
20
+ configurable: true
21
+ });
22
+ HttpMethod.hasValue = function (value) {
23
+ return HttpMethod.CACHED.has(value);
24
+ };
25
+ HttpMethod.fromValue = function (value) {
26
+ return HttpMethod.CACHED.get(value);
27
+ };
28
+ HttpMethod.values = function () {
29
+ return [HttpMethod.GET, HttpMethod.POST, HttpMethod.PUT, HttpMethod.DELETE, HttpMethod.PATCH, HttpMethod.HEAD, HttpMethod.OPTIONS];
30
+ };
31
+ HttpMethod.prototype.toString = function () {
32
+ return this._value;
33
+ };
34
+ HttpMethod.GET = new HttpMethod("get");
35
+ HttpMethod.POST = new HttpMethod("post");
36
+ HttpMethod.PUT = new HttpMethod("put");
37
+ HttpMethod.DELETE = new HttpMethod("delete");
38
+ HttpMethod.PATCH = new HttpMethod("patch");
39
+ HttpMethod.HEAD = new HttpMethod("head");
40
+ HttpMethod.OPTIONS = new HttpMethod("options");
41
+ HttpMethod.CACHED = (0, collection_util_1.toMap)(HttpMethod.values(), function (method) { return method.value; });
42
+ return HttpMethod;
43
+ }());
44
+ exports.default = HttpMethod;
45
+ //# sourceMappingURL=http-method.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"http-method.js","sourceRoot":"","sources":["../../../../src/type/open-api/constant/http-method.ts"],"names":[],"mappings":";;AAAA,0DAA+C;AAE/C;IAaI,oBAAoB,KAAa;QAC7B,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;IACxB,CAAC;IAED,sBAAI,6BAAK;aAAT;YACI,OAAO,IAAI,CAAC,MAAM,CAAC;QACvB,CAAC;;;OAAA;IAED,sBAAI,kCAAU;aAAd;YACI,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,EAAE,CAAC;QACrC,CAAC;;;OAAA;IAEM,mBAAQ,GAAf,UAAgB,KAAa;QACzB,OAAO,UAAU,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IACxC,CAAC;IAEM,oBAAS,GAAhB,UAAiB,KAAa;QAC1B,OAAO,UAAU,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,CAAE,CAAC;IACzC,CAAC;IAEM,iBAAM,GAAb;QACI,OAAO,CAAC,UAAU,CAAC,GAAG,EAAE,UAAU,CAAC,IAAI,EAAE,UAAU,CAAC,GAAG,EAAE,UAAU,CAAC,MAAM,EAAE,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,IAAI,EAAE,UAAU,CAAC,OAAO,CAAC,CAAC;IACvI,CAAC;IAEM,6BAAQ,GAAf;QACI,OAAO,IAAI,CAAC,MAAM,CAAC;IACvB,CAAC;IArCe,cAAG,GAAG,IAAI,UAAU,CAAC,KAAK,CAAC,CAAC;IAC5B,eAAI,GAAG,IAAI,UAAU,CAAC,MAAM,CAAC,CAAC;IAC9B,cAAG,GAAG,IAAI,UAAU,CAAC,KAAK,CAAC,CAAC;IAC5B,iBAAM,GAAG,IAAI,UAAU,CAAC,QAAQ,CAAC,CAAC;IAClC,gBAAK,GAAG,IAAI,UAAU,CAAC,OAAO,CAAC,CAAC;IAChC,eAAI,GAAG,IAAI,UAAU,CAAC,MAAM,CAAC,CAAC;IAC9B,kBAAO,GAAG,IAAI,UAAU,CAAC,SAAS,CAAC,CAAC;IAE5B,iBAAM,GAAG,IAAA,uBAAK,EAAC,UAAU,CAAC,MAAM,EAAE,EAAE,UAAC,MAAM,IAAK,OAAA,MAAM,CAAC,KAAK,EAAZ,CAAY,CAAC,CAAC;IA8B1F,iBAAC;CAAA,AAxCD,IAwCC;kBAxCoB,UAAU"}
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ var collection_util_1 = require("@/util/collection-util");
4
+ var InType = /** @class */ (function () {
5
+ function InType(value) {
6
+ this._value = value;
7
+ }
8
+ InType.fromValue = function (value) {
9
+ var _a;
10
+ return (_a = InType.CACHED.get(value)) !== null && _a !== void 0 ? _a : InType.NONE;
11
+ };
12
+ Object.defineProperty(InType.prototype, "value", {
13
+ get: function () {
14
+ return this._value;
15
+ },
16
+ enumerable: false,
17
+ configurable: true
18
+ });
19
+ InType.values = function () {
20
+ return [InType.QUERY, InType.PATH, InType.HEADER];
21
+ };
22
+ InType.NONE = new InType('');
23
+ InType.QUERY = new InType('query'); //Path variable
24
+ InType.PATH = new InType('path'); //Query Parameter
25
+ InType.HEADER = new InType('header');
26
+ InType.CACHED = (0, collection_util_1.toMap)(InType.values(), function (type) { return type.value; });
27
+ return InType;
28
+ }());
29
+ exports.default = InType;
30
+ //# sourceMappingURL=in-type.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"in-type.js","sourceRoot":"","sources":["../../../../src/type/open-api/constant/in-type.ts"],"names":[],"mappings":";;AAAA,0DAA+C;AAE/C;IASI,gBAAoB,KAAa;QAC7B,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;IACxB,CAAC;IAEM,gBAAS,GAAhB,UAAiB,KAAa;;QAC1B,OAAO,MAAA,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,mCAAI,MAAM,CAAC,IAAI,CAAC;IACnD,CAAC;IAED,sBAAI,yBAAK;aAAT;YACI,OAAO,IAAI,CAAC,MAAM,CAAC;QACvB,CAAC;;;OAAA;IAEM,aAAM,GAAb;QACI,OAAO,CAAC,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC;IACtD,CAAC;IArBe,WAAI,GAAG,IAAI,MAAM,CAAC,EAAE,CAAC,CAAC;IACtB,YAAK,GAAG,IAAI,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,eAAe;IAC5C,WAAI,GAAG,IAAI,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,iBAAiB;IAC5C,aAAM,GAAG,IAAI,MAAM,CAAC,QAAQ,CAAC,CAAC;IAEtB,aAAM,GAAG,IAAA,uBAAK,EAAC,MAAM,CAAC,MAAM,EAAE,EAAE,UAAC,IAAI,IAAK,OAAA,IAAI,CAAC,KAAK,EAAV,CAAU,CAAC,CAAC;IAiBlF,aAAC;CAAA,AAxBD,IAwBC;kBAxBoB,MAAM"}
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = {
4
+ TOKEN_PATH_DIVIDER: ".",
5
+ PATH_DIVIDER: "/",
6
+ REFERENCE_KEY: "$ref",
7
+ PROPERTIES: "properties",
8
+ HASH: "#",
9
+ TYPE: "type",
10
+ DESCRIPTION: "description",
11
+ FORMAT: "format",
12
+ EXAMPLE: "example",
13
+ SUMMARY: "summary",
14
+ TAGS: "tags",
15
+ OPERATION_ID: "operationId"
16
+ };
17
+ //# sourceMappingURL=named-literal.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"named-literal.js","sourceRoot":"","sources":["../../../../src/type/open-api/constant/named-literal.ts"],"names":[],"mappings":";;AAAA,kBAAe;IACX,kBAAkB,EAAE,GAAG;IACvB,YAAY,EAAE,GAAG;IACjB,aAAa,EAAE,MAAM;IACrB,UAAU,EAAE,YAAY;IACxB,IAAI,EAAE,GAAG;IACT,IAAI,EAAE,MAAM;IACZ,WAAW,EAAE,aAAa;IAC1B,MAAM,EAAE,QAAQ;IAChB,OAAO,EAAE,SAAS;IAClB,OAAO,EAAE,SAAS;IAClB,IAAI,EAAE,MAAM;IACZ,YAAY,EAAE,aAAa;CAC9B,CAAA"}
@@ -0,0 +1,40 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ var collection_util_1 = require("@/util/collection-util");
4
+ var ProtocolType = /** @class */ (function () {
5
+ function ProtocolType(value) {
6
+ this._value = value;
7
+ }
8
+ Object.defineProperty(ProtocolType.prototype, "value", {
9
+ get: function () {
10
+ return this._value;
11
+ },
12
+ enumerable: false,
13
+ configurable: true
14
+ });
15
+ ProtocolType.values = function () {
16
+ return [ProtocolType.REQUEST_BODY, ProtocolType.PARAMETERS, ProtocolType.URL_ENCODED];
17
+ };
18
+ ProtocolType.fromValue = function (value) {
19
+ return ProtocolType.CACHED.get(value);
20
+ };
21
+ ProtocolType.hasValue = function (value) {
22
+ return ProtocolType.CACHED.has(value);
23
+ };
24
+ ProtocolType.isProtocolFormat = function (name) {
25
+ return this.values().some(function (type) { return type.value === name; });
26
+ };
27
+ ProtocolType.prototype.toString = function () {
28
+ return this._value;
29
+ };
30
+ ProtocolType.NONE = new ProtocolType("none");
31
+ ProtocolType.SUMMARY = new ProtocolType("summary");
32
+ ProtocolType.REQUEST_BODY = new ProtocolType("requestBody");
33
+ ProtocolType.PARAMETERS = new ProtocolType("parameters");
34
+ ProtocolType.URL_ENCODED = new ProtocolType("urlencoded");
35
+ ProtocolType.TAGS = new ProtocolType("tags");
36
+ ProtocolType.CACHED = (0, collection_util_1.toMap)(ProtocolType.values(), function (type) { return type.value; });
37
+ return ProtocolType;
38
+ }());
39
+ exports.default = ProtocolType;
40
+ //# sourceMappingURL=protocol-type.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"protocol-type.js","sourceRoot":"","sources":["../../../../src/type/open-api/constant/protocol-type.ts"],"names":[],"mappings":";;AAAA,0DAA+C;AAE/C;IAWI,sBAAoB,KAAa;QAC7B,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;IACxB,CAAC;IAED,sBAAI,+BAAK;aAAT;YACI,OAAO,IAAI,CAAC,MAAM,CAAC;QACvB,CAAC;;;OAAA;IAEa,mBAAM,GAApB;QACI,OAAO,CAAC,YAAY,CAAC,YAAY,EAAE,YAAY,CAAC,UAAU,EAAE,YAAY,CAAC,WAAW,CAAC,CAAC;IAC1F,CAAC;IAEa,sBAAS,GAAvB,UAAwB,KAAa;QACjC,OAAO,YAAY,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IAC1C,CAAC;IAEa,qBAAQ,GAAtB,UAAuB,KAAa;QAChC,OAAO,YAAY,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IAC1C,CAAC;IAEa,6BAAgB,GAA9B,UAA+B,IAAY;QACvC,OAAO,IAAI,CAAC,MAAM,EAAE,CAAC,IAAI,CAAC,UAAC,IAAI,IAAK,OAAA,IAAI,CAAC,KAAK,KAAK,IAAI,EAAnB,CAAmB,CAAC,CAAC;IAC7D,CAAC;IAEM,+BAAQ,GAAf;QACI,OAAO,IAAI,CAAC,MAAM,CAAC;IACvB,CAAC;IAnCe,iBAAI,GAAG,IAAI,YAAY,CAAC,MAAM,CAAC,CAAC;IAChC,oBAAO,GAAG,IAAI,YAAY,CAAC,SAAS,CAAC,CAAC;IACtC,yBAAY,GAAG,IAAI,YAAY,CAAC,aAAa,CAAC,CAAC;IAC/C,uBAAU,GAAG,IAAI,YAAY,CAAC,YAAY,CAAC,CAAC;IAC5C,wBAAW,GAAG,IAAI,YAAY,CAAC,YAAY,CAAC,CAAC;IAC7C,iBAAI,GAAG,IAAI,YAAY,CAAC,MAAM,CAAC,CAAC;IAExB,mBAAM,GAAG,IAAA,uBAAK,EAAC,YAAY,CAAC,MAAM,EAAE,EAAE,UAAC,IAAI,IAAK,OAAA,IAAI,CAAC,KAAK,EAAV,CAAU,CAAC,CAAA;IA6BvF,mBAAC;CAAA,AAtCD,IAsCC;kBAtCoB,YAAY"}
@@ -0,0 +1,43 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ var OpenApiSpecification = /** @class */ (function () {
4
+ function OpenApiSpecification(version, info, tags, specs) {
5
+ this._version = version;
6
+ this._info = info;
7
+ this._tags = tags;
8
+ this._specs = specs;
9
+ }
10
+ Object.defineProperty(OpenApiSpecification.prototype, "version", {
11
+ get: function () {
12
+ return this._version;
13
+ },
14
+ enumerable: false,
15
+ configurable: true
16
+ });
17
+ Object.defineProperty(OpenApiSpecification.prototype, "info", {
18
+ get: function () {
19
+ return this._info;
20
+ },
21
+ enumerable: false,
22
+ configurable: true
23
+ });
24
+ Object.defineProperty(OpenApiSpecification.prototype, "tags", {
25
+ get: function () {
26
+ return this._tags;
27
+ },
28
+ enumerable: false,
29
+ configurable: true
30
+ });
31
+ Object.defineProperty(OpenApiSpecification.prototype, "specs", {
32
+ get: function () {
33
+ return this._specs;
34
+ },
35
+ enumerable: false,
36
+ configurable: true
37
+ });
38
+ OpenApiSpecification.prototype.toString = function () {
39
+ };
40
+ return OpenApiSpecification;
41
+ }());
42
+ exports.default = OpenApiSpecification;
43
+ //# sourceMappingURL=open-api-specification.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"open-api-specification.js","sourceRoot":"","sources":["../../../src/type/open-api/open-api-specification.ts"],"names":[],"mappings":";;AAKA;IAOI,8BAAY,OAAgB,EAAE,IAAwB,EAAE,IAAgB,EAAE,KAA8B;QACpG,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;QACxB,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;QAClB,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;QAClB,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;IACxB,CAAC;IAED,sBAAI,yCAAO;aAAX;YACI,OAAO,IAAI,CAAC,QAAQ,CAAC;QACzB,CAAC;;;OAAA;IAED,sBAAI,sCAAI;aAAR;YACI,OAAO,IAAI,CAAC,KAAK,CAAC;QACtB,CAAC;;;OAAA;IAED,sBAAI,sCAAI;aAAR;YACI,OAAO,IAAI,CAAC,KAAK,CAAC;QACtB,CAAC;;;OAAA;IAED,sBAAI,uCAAK;aAAT;YACI,OAAO,IAAI,CAAC,MAAM,CAAC;QACvB,CAAC;;;OAAA;IAEM,uCAAQ,GAAf;IAEA,CAAC;IACL,2BAAC;AAAD,CAAC,AAjCD,IAiCC"}
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ var Contact = /** @class */ (function () {
4
+ function Contact(email, name, url) {
5
+ this._email = email;
6
+ this._name = name;
7
+ this._url = url;
8
+ }
9
+ Object.defineProperty(Contact.prototype, "email", {
10
+ get: function () {
11
+ return this._email;
12
+ },
13
+ enumerable: false,
14
+ configurable: true
15
+ });
16
+ Object.defineProperty(Contact.prototype, "name", {
17
+ get: function () {
18
+ return this._name;
19
+ },
20
+ enumerable: false,
21
+ configurable: true
22
+ });
23
+ Object.defineProperty(Contact.prototype, "url", {
24
+ get: function () {
25
+ return this._url;
26
+ },
27
+ enumerable: false,
28
+ configurable: true
29
+ });
30
+ Contact.fromJson = function (json) {
31
+ var _a, _b, _c;
32
+ return new Contact((_a = json === null || json === void 0 ? void 0 : json.email) !== null && _a !== void 0 ? _a : '', (_b = json === null || json === void 0 ? void 0 : json.name) !== null && _b !== void 0 ? _b : '', (_c = json === null || json === void 0 ? void 0 : json.url) !== null && _c !== void 0 ? _c : '');
33
+ };
34
+ return Contact;
35
+ }());
36
+ exports.default = Contact;
37
+ //# sourceMappingURL=contact.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contact.js","sourceRoot":"","sources":["../../../../src/type/open-api/project/contact.ts"],"names":[],"mappings":";;AAAA;IAMI,iBAAY,KAAa,EAAE,IAAY,EAAE,GAAW;QAChD,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;QACpB,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;QAClB,IAAI,CAAC,IAAI,GAAG,GAAG,CAAC;IACpB,CAAC;IAED,sBAAI,0BAAK;aAAT;YACI,OAAO,IAAI,CAAC,MAAM,CAAC;QACvB,CAAC;;;OAAA;IAED,sBAAI,yBAAI;aAAR;YACI,OAAO,IAAI,CAAC,KAAK,CAAC;QACtB,CAAC;;;OAAA;IAED,sBAAI,wBAAG;aAAP;YACI,OAAO,IAAI,CAAC,IAAI,CAAC;QACrB,CAAC;;;OAAA;IAEM,gBAAQ,GAAf,UAAgB,IAAS;;QACrB,OAAO,IAAI,OAAO,CACd,MAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,KAAK,mCAAI,EAAE,EACjB,MAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,IAAI,mCAAI,EAAE,EAChB,MAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,GAAG,mCAAI,EAAE,CAClB,CAAC;IACN,CAAC;IACL,cAAC;AAAD,CAAC,AA/BD,IA+BC"}
@@ -0,0 +1,49 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ var contact_1 = __importDefault(require("@/type/open-api/project/contact"));
7
+ var ProjectInformation = /** @class */ (function () {
8
+ function ProjectInformation(contact, description, title, version) {
9
+ this._contact = contact;
10
+ this._description = description;
11
+ this._title = title;
12
+ this._version = version;
13
+ }
14
+ Object.defineProperty(ProjectInformation.prototype, "contact", {
15
+ get: function () {
16
+ return this._contact;
17
+ },
18
+ enumerable: false,
19
+ configurable: true
20
+ });
21
+ Object.defineProperty(ProjectInformation.prototype, "description", {
22
+ get: function () {
23
+ return this._description;
24
+ },
25
+ enumerable: false,
26
+ configurable: true
27
+ });
28
+ Object.defineProperty(ProjectInformation.prototype, "title", {
29
+ get: function () {
30
+ return this._title;
31
+ },
32
+ enumerable: false,
33
+ configurable: true
34
+ });
35
+ Object.defineProperty(ProjectInformation.prototype, "version", {
36
+ get: function () {
37
+ return this._version;
38
+ },
39
+ enumerable: false,
40
+ configurable: true
41
+ });
42
+ ProjectInformation.parse = function (jsonObject) {
43
+ var _a, _b, _c;
44
+ return new ProjectInformation(contact_1.default.fromJson(jsonObject === null || jsonObject === void 0 ? void 0 : jsonObject.contact), (_a = jsonObject === null || jsonObject === void 0 ? void 0 : jsonObject.description) !== null && _a !== void 0 ? _a : '', (_b = jsonObject === null || jsonObject === void 0 ? void 0 : jsonObject.title) !== null && _b !== void 0 ? _b : '', (_c = jsonObject === null || jsonObject === void 0 ? void 0 : jsonObject.version) !== null && _c !== void 0 ? _c : '');
45
+ };
46
+ return ProjectInformation;
47
+ }());
48
+ exports.default = ProjectInformation;
49
+ //# sourceMappingURL=project-information.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"project-information.js","sourceRoot":"","sources":["../../../../src/type/open-api/project/project-information.ts"],"names":[],"mappings":";;;;;AAAA,4EAAsD;AAEtD;IAQI,4BAAY,OAAgB,EAAE,WAAmB,EAAE,KAAa,EAAE,OAAe;QAC7E,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;QACxB,IAAI,CAAC,YAAY,GAAG,WAAW,CAAC;QAChC,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;QACpB,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;IAC5B,CAAC;IAED,sBAAI,uCAAO;aAAX;YACI,OAAO,IAAI,CAAC,QAAQ,CAAC;QACzB,CAAC;;;OAAA;IAED,sBAAI,2CAAW;aAAf;YACI,OAAO,IAAI,CAAC,YAAY,CAAC;QAC7B,CAAC;;;OAAA;IAED,sBAAI,qCAAK;aAAT;YACI,OAAO,IAAI,CAAC,MAAM,CAAC;QACvB,CAAC;;;OAAA;IAED,sBAAI,uCAAO;aAAX;YACI,OAAO,IAAI,CAAC,QAAQ,CAAC;QACzB,CAAC;;;OAAA;IAEM,wBAAK,GAAZ,UAAa,UAAe;;QACxB,OAAO,IAAI,kBAAkB,CACzB,iBAAO,CAAC,QAAQ,CAAC,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,OAAO,CAAC,EACrC,MAAA,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,WAAW,mCAAI,EAAE,EAC7B,MAAA,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,KAAK,mCAAI,EAAE,EACvB,MAAA,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,OAAO,mCAAI,EAAE,CAC5B,CAAC;IACN,CAAC;IACL,yBAAC;AAAD,CAAC,AAvCD,IAuCC"}
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ var EmptyBody = /** @class */ (function () {
4
+ function EmptyBody() {
5
+ }
6
+ EmptyBody.prototype.toString = function () {
7
+ return '(empty)';
8
+ };
9
+ return EmptyBody;
10
+ }());
11
+ exports.default = EmptyBody;
12
+ //# sourceMappingURL=empty-body.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"empty-body.js","sourceRoot":"","sources":["../../../../src/type/open-api/protocol/empty-body.ts"],"names":[],"mappings":";;AAAA;IAEI;IACA,CAAC;IAEM,4BAAQ,GAAf;QACI,OAAO,SAAS,CAAC;IACrB,CAAC;IACL,gBAAC;AAAD,CAAC,AARD,IAQC"}
@@ -0,0 +1,44 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ var http_method_1 = __importDefault(require("@/type/open-api/constant/http-method"));
7
+ var object_util_1 = require("@/util/object-util");
8
+ var OpenApiRequest = /** @class */ (function () {
9
+ function OpenApiRequest(path, metadata) {
10
+ this._path = path;
11
+ this._method = http_method_1.default.fromValue(metadata.name);
12
+ this._metadata = metadata;
13
+ }
14
+ Object.defineProperty(OpenApiRequest.prototype, "path", {
15
+ get: function () {
16
+ return this._path;
17
+ },
18
+ enumerable: false,
19
+ configurable: true
20
+ });
21
+ Object.defineProperty(OpenApiRequest.prototype, "method", {
22
+ get: function () {
23
+ return this._method;
24
+ },
25
+ enumerable: false,
26
+ configurable: true
27
+ });
28
+ Object.defineProperty(OpenApiRequest.prototype, "metadata", {
29
+ get: function () {
30
+ return this._metadata;
31
+ },
32
+ enumerable: false,
33
+ configurable: true
34
+ });
35
+ OpenApiRequest.prototype.payloadOf = function (protocol) {
36
+ if (!(0, object_util_1.hasProp)(this._metadata.value, protocol.value)) {
37
+ return undefined;
38
+ }
39
+ return new object_util_1.Property(protocol.value, (0, object_util_1.getProp)(this._metadata.value, protocol.value));
40
+ };
41
+ return OpenApiRequest;
42
+ }());
43
+ exports.default = OpenApiRequest;
44
+ //# sourceMappingURL=open-api-request.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"open-api-request.js","sourceRoot":"","sources":["../../../../src/type/open-api/protocol/open-api-request.ts"],"names":[],"mappings":";;;;;AAAA,qFAA8D;AAC9D,kDAA8D;AAG9D;IAMI,wBAAmB,IAAY,EAAE,QAAkB;QAC/C,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;QAClB,IAAI,CAAC,OAAO,GAAG,qBAAU,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;QACnD,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC;IAC9B,CAAC;IAED,sBAAI,gCAAI;aAAR;YACI,OAAO,IAAI,CAAC,KAAK,CAAC;QACtB,CAAC;;;OAAA;IAED,sBAAI,kCAAM;aAAV;YACI,OAAO,IAAI,CAAC,OAAO,CAAC;QACxB,CAAC;;;OAAA;IAED,sBAAI,oCAAQ;aAAZ;YACI,OAAO,IAAI,CAAC,SAAS,CAAC;QAC1B,CAAC;;;OAAA;IAEM,kCAAS,GAAhB,UAAiB,QAAsB;QACnC,IAAI,CAAC,IAAA,qBAAO,EAAC,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;YACjD,OAAO,SAAS,CAAC;QACrB,CAAC;QAED,OAAO,IAAI,sBAAQ,CAAC,QAAQ,CAAC,KAAK,EAAE,IAAA,qBAAO,EAAM,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC;IAC5F,CAAC;IACL,qBAAC;AAAD,CAAC,AA/BD,IA+BC"}
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ var Parameters = /** @class */ (function () {
4
+ function Parameters(parameters) {
5
+ this._values = parameters;
6
+ }
7
+ Object.defineProperty(Parameters.prototype, "values", {
8
+ get: function () {
9
+ return this._values;
10
+ },
11
+ enumerable: false,
12
+ configurable: true
13
+ });
14
+ Parameters.prototype.getValues = function (inType) {
15
+ return this._values.filter(function (parameter) { return parameter.in.value === inType.value; });
16
+ };
17
+ Parameters.prototype.toString = function () {
18
+ return "(".concat(this._values.length, ") parameters: [\n").concat(this._values.map(function (param) { return param.toString(); }).join('\n'), "\n]");
19
+ };
20
+ Parameters.prototype.toJSON = function () {
21
+ return {
22
+ values: this._values
23
+ };
24
+ };
25
+ return Parameters;
26
+ }());
27
+ exports.default = Parameters;
28
+ //# sourceMappingURL=parameters.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parameters.js","sourceRoot":"","sources":["../../../../src/type/open-api/protocol/parameters.ts"],"names":[],"mappings":";;AAGA;IAII,oBAAmB,UAA4B;QAC3C,IAAI,CAAC,OAAO,GAAG,UAAU,CAAC;IAC9B,CAAC;IAED,sBAAI,8BAAM;aAAV;YACI,OAAO,IAAI,CAAC,OAAO,CAAC;QACxB,CAAC;;;OAAA;IAEM,8BAAS,GAAhB,UAAiB,MAAc;QAC3B,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,UAAA,SAAS,IAAI,OAAA,SAAS,CAAC,EAAE,CAAC,KAAK,KAAK,MAAM,CAAC,KAAK,EAAnC,CAAmC,CAAC,CAAC;IACjF,CAAC;IAEM,6BAAQ,GAAf;QACI,OAAO,WAAI,IAAI,CAAC,OAAO,CAAC,MAAM,8BAAoB,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,UAAA,KAAK,IAAI,OAAA,KAAK,CAAC,QAAQ,EAAE,EAAhB,CAAgB,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,QAAK,CAAA;IACjH,CAAC;IAEM,2BAAM,GAAb;QACI,OAAO;YACH,MAAM,EAAE,IAAI,CAAC,OAAO;SACvB,CAAA;IACL,CAAC;IAEL,iBAAC;AAAD,CAAC,AA1BD,IA0BC"}
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ var content_type_1 = require("@/type/open-api/constant/content-type");
4
+ var RequestBody = /** @class */ (function () {
5
+ function RequestBody(contentType, fields) {
6
+ this._contentType = contentType;
7
+ this._fields = fields;
8
+ }
9
+ Object.defineProperty(RequestBody.prototype, "contentType", {
10
+ get: function () {
11
+ return this._contentType;
12
+ },
13
+ enumerable: false,
14
+ configurable: true
15
+ });
16
+ Object.defineProperty(RequestBody.prototype, "fields", {
17
+ get: function () {
18
+ return this._fields;
19
+ },
20
+ enumerable: false,
21
+ configurable: true
22
+ });
23
+ RequestBody.prototype.toJSON = function () {
24
+ return {
25
+ contentType: this._contentType,
26
+ fields: this._fields
27
+ };
28
+ };
29
+ RequestBody.prototype.toString = function () {
30
+ return "(".concat(this.fields.length, ") Request Body fields:[\n").concat(this._fields.map(function (field) { return field.toString(); }).join('\n'), "\n]");
31
+ };
32
+ RequestBody.ALLOW_CONTENT_TYPES = [
33
+ content_type_1.ContentType.APPLICATION_JSON,
34
+ content_type_1.ContentType.APPLICATION_X_WWW_FORM_URLENCODED
35
+ ];
36
+ return RequestBody;
37
+ }());
38
+ exports.default = RequestBody;
39
+ //# sourceMappingURL=request-body.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"request-body.js","sourceRoot":"","sources":["../../../../src/type/open-api/protocol/request-body.ts"],"names":[],"mappings":";;AACA,sEAAkE;AAElE;IAUI,qBAAY,WAAmB,EAAE,MAAqB;QAClD,IAAI,CAAC,YAAY,GAAG,WAAW,CAAC;QAChC,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;IAC1B,CAAC;IAED,sBAAI,oCAAW;aAAf;YACI,OAAO,IAAI,CAAC,YAAY,CAAC;QAC7B,CAAC;;;OAAA;IAED,sBAAI,+BAAM;aAAV;YACI,OAAO,IAAI,CAAC,OAAO,CAAC;QACxB,CAAC;;;OAAA;IAEM,4BAAM,GAAb;QACI,OAAO;YACH,WAAW,EAAE,IAAI,CAAC,YAAY;YAC9B,MAAM,EAAE,IAAI,CAAC,OAAO;SACvB,CAAA;IAEL,CAAC;IAEM,8BAAQ,GAAf;QACI,OAAO,WAAI,IAAI,CAAC,MAAM,CAAC,MAAM,sCAA4B,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,UAAA,KAAK,IAAI,OAAA,KAAK,CAAC,QAAQ,EAAE,EAAhB,CAAgB,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,QAAK,CAAA;IACxH,CAAC;IA/BsB,+BAAmB,GAAG;QACzC,0BAAW,CAAC,gBAAgB;QAC5B,0BAAW,CAAC,iCAAiC;KAChD,CAAA;IA6BL,kBAAC;CAAA,AAlCD,IAkCC;kBAlCoB,WAAW"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=i-field.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"i-field.js","sourceRoot":"","sources":["../../../../src/type/open-api/sub/i-field.ts"],"names":[],"mappings":""}