@trapi/swagger 0.2.7 → 0.2.11

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/dist/index.d.ts CHANGED
@@ -2,4 +2,5 @@ export * from './config';
2
2
  export * from './metadata';
3
3
  export * from './specification';
4
4
  export * from './type';
5
+ export * from './utils';
5
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAOA,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,iBAAiB,CAAC;AAChC,cAAc,QAAQ,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAOA,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,iBAAiB,CAAC;AAChC,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC"}
package/dist/index.js CHANGED
@@ -20,4 +20,5 @@ __exportStar(require("./config"), exports);
20
20
  __exportStar(require("./metadata"), exports);
21
21
  __exportStar(require("./specification"), exports);
22
22
  __exportStar(require("./type"), exports);
23
+ __exportStar(require("./utils"), exports);
23
24
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;;;;;;;;;AAEH,2CAAyB;AACzB,6CAA2B;AAC3B,kDAAgC;AAChC,yCAAuB"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;;;;;;;;;AAEH,2CAAyB;AACzB,6CAA2B;AAC3B,kDAAgC;AAChC,yCAAuB;AACvB,0CAAwB"}
@@ -1,4 +1,4 @@
1
- import { generateMetadata, createMetadataGenerator, GeneratorOutput as MetadataGeneratorOutput, Config as MetadataConfig, Cache as MetadataCache } from "@trapi/metadata";
1
+ import { generateMetadata, createMetadataGenerator, GeneratorOutput as MetadataGeneratorOutput, Config as MetadataConfig, Cache as MetadataCache, RequestConsumes, RequestFileParam, ResponseDescription, ResponseExample, ResponseProduces, SwaggerTags, SwaggerHidden, SwaggerDeprecated, IsDouble, IsFloat, IsLong, IsInt } from "@trapi/metadata";
2
2
  declare type MetadataCacheConfig = MetadataCache.Config;
3
- export { generateMetadata, createMetadataGenerator, MetadataGeneratorOutput, MetadataCacheConfig, MetadataConfig };
3
+ export { generateMetadata, createMetadataGenerator, MetadataGeneratorOutput, MetadataCacheConfig, MetadataConfig, RequestConsumes, RequestFileParam, ResponseDescription, ResponseExample, ResponseProduces, SwaggerTags, SwaggerHidden, SwaggerDeprecated, IsDouble, IsFloat, IsLong, IsInt, };
4
4
  //# sourceMappingURL=metadata.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"metadata.d.ts","sourceRoot":"","sources":["../src/metadata.ts"],"names":[],"mappings":"AAOA,OAAO,EACH,gBAAgB,EAChB,uBAAuB,EACvB,eAAe,IAAI,uBAAuB,EAC1C,MAAM,IAAI,cAAc,EACxB,KAAK,IAAI,aAAa,EACzB,MAAM,iBAAiB,CAAC;AAEzB,aAAK,mBAAmB,GAAG,aAAa,CAAC,MAAM,CAAC;AAEhD,OAAO,EACH,gBAAgB,EAChB,uBAAuB,EACvB,uBAAuB,EACvB,mBAAmB,EACnB,cAAc,EACjB,CAAA"}
1
+ {"version":3,"file":"metadata.d.ts","sourceRoot":"","sources":["../src/metadata.ts"],"names":[],"mappings":"AAOA,OAAO,EAEH,gBAAgB,EAChB,uBAAuB,EAGvB,eAAe,IAAI,uBAAuB,EAC1C,MAAM,IAAI,cAAc,EACxB,KAAK,IAAI,aAAa,EAGtB,eAAe,EACf,gBAAgB,EAChB,mBAAmB,EACnB,eAAe,EACf,gBAAgB,EAChB,WAAW,EACX,aAAa,EACb,iBAAiB,EACjB,QAAQ,EACR,OAAO,EACP,MAAM,EACN,KAAK,EACR,MAAM,iBAAiB,CAAC;AAEzB,aAAK,mBAAmB,GAAG,aAAa,CAAC,MAAM,CAAC;AAEhD,OAAO,EAEH,gBAAgB,EAChB,uBAAuB,EAGvB,uBAAuB,EACvB,mBAAmB,EACnB,cAAc,EAGd,eAAe,EACf,gBAAgB,EAChB,mBAAmB,EACnB,eAAe,EACf,gBAAgB,EAChB,WAAW,EACX,aAAa,EACb,iBAAiB,EACjB,QAAQ,EACR,OAAO,EACP,MAAM,EACN,KAAK,GACR,CAAA"}
package/dist/metadata.js CHANGED
@@ -6,8 +6,24 @@
6
6
  * view the LICENSE file that was distributed with this source code.
7
7
  */
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
9
- exports.createMetadataGenerator = exports.generateMetadata = void 0;
9
+ exports.IsInt = exports.IsLong = exports.IsFloat = exports.IsDouble = exports.SwaggerDeprecated = exports.SwaggerHidden = exports.SwaggerTags = exports.ResponseProduces = exports.ResponseExample = exports.ResponseDescription = exports.RequestFileParam = exports.RequestConsumes = exports.createMetadataGenerator = exports.generateMetadata = void 0;
10
10
  const metadata_1 = require("@trapi/metadata");
11
- Object.defineProperty(exports, "generateMetadata", { enumerable: true, get: function () { return metadata_1.generateMetadata; } });
11
+ Object.defineProperty(exports, "generateMetadata", { enumerable: true, get: function () { return
12
+ // Utils
13
+ metadata_1.generateMetadata; } });
12
14
  Object.defineProperty(exports, "createMetadataGenerator", { enumerable: true, get: function () { return metadata_1.createMetadataGenerator; } });
15
+ Object.defineProperty(exports, "RequestConsumes", { enumerable: true, get: function () { return
16
+ // Internal Decorators
17
+ metadata_1.RequestConsumes; } });
18
+ Object.defineProperty(exports, "RequestFileParam", { enumerable: true, get: function () { return metadata_1.RequestFileParam; } });
19
+ Object.defineProperty(exports, "ResponseDescription", { enumerable: true, get: function () { return metadata_1.ResponseDescription; } });
20
+ Object.defineProperty(exports, "ResponseExample", { enumerable: true, get: function () { return metadata_1.ResponseExample; } });
21
+ Object.defineProperty(exports, "ResponseProduces", { enumerable: true, get: function () { return metadata_1.ResponseProduces; } });
22
+ Object.defineProperty(exports, "SwaggerTags", { enumerable: true, get: function () { return metadata_1.SwaggerTags; } });
23
+ Object.defineProperty(exports, "SwaggerHidden", { enumerable: true, get: function () { return metadata_1.SwaggerHidden; } });
24
+ Object.defineProperty(exports, "SwaggerDeprecated", { enumerable: true, get: function () { return metadata_1.SwaggerDeprecated; } });
25
+ Object.defineProperty(exports, "IsDouble", { enumerable: true, get: function () { return metadata_1.IsDouble; } });
26
+ Object.defineProperty(exports, "IsFloat", { enumerable: true, get: function () { return metadata_1.IsFloat; } });
27
+ Object.defineProperty(exports, "IsLong", { enumerable: true, get: function () { return metadata_1.IsLong; } });
28
+ Object.defineProperty(exports, "IsInt", { enumerable: true, get: function () { return metadata_1.IsInt; } });
13
29
  //# sourceMappingURL=metadata.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"metadata.js","sourceRoot":"","sources":["../src/metadata.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,8CAMyB;AAKrB,iGAVA,2BAAgB,OAUA;AAChB,wGAVA,kCAAuB,OAUA"}
1
+ {"version":3,"file":"metadata.js","sourceRoot":"","sources":["../src/metadata.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,8CAuByB;AAMrB;IA5BA,QAAQ;IACR,2BAAgB,OA2BA;AAChB,wGA3BA,kCAAuB,OA2BA;AAQvB;IA5BA,sBAAsB;IACtB,0BAAe,OA2BA;AACf,iGA3BA,2BAAgB,OA2BA;AAChB,oGA3BA,8BAAmB,OA2BA;AACnB,gGA3BA,0BAAe,OA2BA;AACf,iGA3BA,2BAAgB,OA2BA;AAChB,4FA3BA,sBAAW,OA2BA;AACX,8FA3BA,wBAAa,OA2BA;AACb,kGA3BA,4BAAiB,OA2BA;AACjB,yFA3BA,mBAAQ,OA2BA;AACR,wFA3BA,kBAAO,OA2BA;AACP,uFA3BA,iBAAM,OA2BA;AACN,sFA3BA,gBAAK,OA2BA"}
package/dist/utils.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { CompilerOptions } from 'typescript';
2
2
  import { Config as MetadataConfig } from "@trapi/metadata";
3
3
  import { Specification } from "./specification";
4
- import { SwaggerDocFormatData, SwaggerDocFormatType } from "trapi/src/type";
4
+ import { SwaggerDocFormatData, SwaggerDocFormatType } from "./type";
5
5
  export declare function generateDocumentation(config: {
6
6
  metadata: MetadataConfig;
7
7
  swagger: Specification.Config;
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAOA,OAAO,EAAC,eAAe,EAAC,MAAM,YAAY,CAAC;AAC3C,OAAO,EAAC,MAAM,IAAI,cAAc,EAA0B,MAAM,iBAAiB,CAAC;AAClF,OAAO,EAAsB,aAAa,EAAC,MAAM,iBAAiB,CAAC;AACnE,OAAO,EAAC,oBAAoB,EAAE,oBAAoB,EAAC,MAAM,gBAAgB,CAAC;AAE1E,wBAAsB,qBAAqB,CACvC,MAAM,EAAE;IACJ,QAAQ,EAAE,cAAc,CAAC;IACzB,OAAO,EAAE,aAAa,CAAC,MAAM,CAAA;CAChC,EACD,QAAQ,CAAC,EAAE,eAAe,GAAG,OAAO,GACrC,OAAO,CAAC,MAAM,CAAC,oBAAoB,EAAE,oBAAoB,CAAC,CAAC,CAS7D"}
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAOA,OAAO,EAAC,eAAe,EAAC,MAAM,YAAY,CAAC;AAC3C,OAAO,EAAC,MAAM,IAAI,cAAc,EAA0B,MAAM,iBAAiB,CAAC;AAClF,OAAO,EAAsB,aAAa,EAAC,MAAM,iBAAiB,CAAC;AACnE,OAAO,EAAC,oBAAoB,EAAE,oBAAoB,EAAC,MAAM,QAAQ,CAAC;AAElE,wBAAsB,qBAAqB,CACvC,MAAM,EAAE;IACJ,QAAQ,EAAE,cAAc,CAAC;IACzB,OAAO,EAAE,aAAa,CAAC,MAAM,CAAA;CAChC,EACD,QAAQ,CAAC,EAAE,eAAe,GAAG,OAAO,GACrC,OAAO,CAAC,MAAM,CAAC,oBAAoB,EAAE,oBAAoB,CAAC,CAAC,CAS7D"}
package/package.json CHANGED
@@ -6,7 +6,7 @@
6
6
  "url": "https://github.com/tada5hi"
7
7
  },
8
8
  "license": "MIT",
9
- "version": "0.2.7",
9
+ "version": "0.2.11",
10
10
  "description": "Generate Swagger files from a decorator APIs.",
11
11
  "keywords": [
12
12
  "typescript",
@@ -39,7 +39,7 @@
39
39
  "rimraf": "^3.0.2"
40
40
  },
41
41
  "dependencies": {
42
- "@trapi/metadata": "^0.1.3",
42
+ "@trapi/metadata": "^0.1.4",
43
43
  "@trapi/metadata-utils": "^0.0.4",
44
44
  "typescript": "^4.4.3",
45
45
  "yamljs": "^0.3.0"
@@ -59,5 +59,5 @@
59
59
  "access": "public"
60
60
  },
61
61
  "engineStrict": true,
62
- "gitHead": "a9444b0aec81434532e3064abb9b253b8dc0bbf0"
62
+ "gitHead": "bb7b7c1db8284ac4ce054024abc3a79c3b64b92a"
63
63
  }
package/src/index.ts CHANGED
@@ -9,3 +9,4 @@ export * from './config';
9
9
  export * from './metadata';
10
10
  export * from './specification';
11
11
  export * from './type';
12
+ export * from './utils';
package/src/metadata.ts CHANGED
@@ -6,19 +6,53 @@
6
6
  */
7
7
 
8
8
  import {
9
+ // Utils
9
10
  generateMetadata,
10
11
  createMetadataGenerator,
12
+
13
+ // Types & Interfaces
11
14
  GeneratorOutput as MetadataGeneratorOutput,
12
15
  Config as MetadataConfig,
13
- Cache as MetadataCache
16
+ Cache as MetadataCache,
17
+
18
+ // Internal Decorators
19
+ RequestConsumes,
20
+ RequestFileParam,
21
+ ResponseDescription,
22
+ ResponseExample,
23
+ ResponseProduces,
24
+ SwaggerTags,
25
+ SwaggerHidden,
26
+ SwaggerDeprecated,
27
+ IsDouble,
28
+ IsFloat,
29
+ IsLong,
30
+ IsInt,
14
31
  } from "@trapi/metadata";
15
32
 
16
33
  type MetadataCacheConfig = MetadataCache.Config;
17
34
 
18
35
  export {
36
+ // Utils
19
37
  generateMetadata,
20
38
  createMetadataGenerator,
39
+
40
+ // Types & Interfaces
21
41
  MetadataGeneratorOutput,
22
42
  MetadataCacheConfig,
23
- MetadataConfig
43
+ MetadataConfig,
44
+
45
+ // Internal Decorators
46
+ RequestConsumes,
47
+ RequestFileParam,
48
+ ResponseDescription,
49
+ ResponseExample,
50
+ ResponseProduces,
51
+ SwaggerTags,
52
+ SwaggerHidden,
53
+ SwaggerDeprecated,
54
+ IsDouble,
55
+ IsFloat,
56
+ IsLong,
57
+ IsInt,
24
58
  }
package/src/utils.ts CHANGED
@@ -8,7 +8,7 @@
8
8
  import {CompilerOptions} from 'typescript';
9
9
  import {Config as MetadataConfig, createMetadataGenerator} from "@trapi/metadata";
10
10
  import {createSpecGenerator, Specification} from "./specification";
11
- import {SwaggerDocFormatData, SwaggerDocFormatType} from "trapi/src/type";
11
+ import {SwaggerDocFormatData, SwaggerDocFormatType} from "./type";
12
12
 
13
13
  export async function generateDocumentation(
14
14
  config: {