@twin.org/ts-to-openapi 0.0.1-next.10

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 (32) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +21 -0
  3. package/bin/index.js +8 -0
  4. package/dist/cjs/index.cjs +1131 -0
  5. package/dist/esm/index.mjs +1125 -0
  6. package/dist/locales/en.json +285 -0
  7. package/dist/types/cli.d.ts +23 -0
  8. package/dist/types/commands/httpStatusCodeMap.d.ts +20 -0
  9. package/dist/types/commands/tsToOpenApi.d.ts +21 -0
  10. package/dist/types/index.d.ts +4 -0
  11. package/dist/types/models/IInputPath.d.ts +68 -0
  12. package/dist/types/models/IInputResult.d.ts +15 -0
  13. package/dist/types/models/IOpenApi.d.ts +54 -0
  14. package/dist/types/models/IOpenApiExample.d.ts +13 -0
  15. package/dist/types/models/IOpenApiHeader.d.ts +19 -0
  16. package/dist/types/models/IOpenApiPathMethod.d.ts +64 -0
  17. package/dist/types/models/IOpenApiResponse.d.ts +32 -0
  18. package/dist/types/models/IOpenApiSecurityScheme.d.ts +25 -0
  19. package/dist/types/models/IPackageJson.d.ts +15 -0
  20. package/dist/types/models/ITsToOpenApiConfig.d.ts +61 -0
  21. package/dist/types/models/ITsToOpenApiConfigEntryPoint.d.ts +17 -0
  22. package/docs/changelog.md +5 -0
  23. package/docs/examples.md +890 -0
  24. package/docs/reference/classes/CLI.md +75 -0
  25. package/docs/reference/functions/actionCommandTsToOpenApi.md +23 -0
  26. package/docs/reference/functions/buildCommandTsToOpenApi.md +15 -0
  27. package/docs/reference/functions/tsToOpenApi.md +23 -0
  28. package/docs/reference/index.md +16 -0
  29. package/docs/reference/interfaces/ITsToOpenApiConfig.md +79 -0
  30. package/docs/reference/interfaces/ITsToOpenApiConfigEntryPoint.md +27 -0
  31. package/locales/en.json +45 -0
  32. package/package.json +49 -0
@@ -0,0 +1,61 @@
1
+ import type { ITsToOpenApiConfigEntryPoint } from "./ITsToOpenApiConfigEntryPoint";
2
+ /**
3
+ * Configuration for the API.
4
+ */
5
+ export interface ITsToOpenApiConfig {
6
+ /**
7
+ * Title of the API.
8
+ */
9
+ title: string;
10
+ /**
11
+ * The version.
12
+ */
13
+ version: string;
14
+ /**
15
+ * Description of the API.
16
+ */
17
+ description: string;
18
+ /**
19
+ * The license to use.
20
+ */
21
+ licenseName: string;
22
+ /**
23
+ * The license URL.
24
+ */
25
+ licenseUrl: string;
26
+ /**
27
+ * The servers for the endpoints.
28
+ */
29
+ servers: string[];
30
+ /**
31
+ * The authentication methods.
32
+ */
33
+ authMethods?: ("basic" | "jwtBearer" | "jwtCookie" | string)[];
34
+ /**
35
+ * The packages containing routes.
36
+ */
37
+ restRoutes: {
38
+ /**
39
+ * The package containing the routes.
40
+ */
41
+ package?: string;
42
+ /**
43
+ * The version of the package to use, defaults to latest.
44
+ */
45
+ version?: string;
46
+ /**
47
+ * To point to a local instance of a package use this property instead of package/version.
48
+ */
49
+ packageRoot?: string;
50
+ /**
51
+ * The rest entry points to include, defaults to all exported entry points.
52
+ */
53
+ entryPoints?: ITsToOpenApiConfigEntryPoint[];
54
+ }[];
55
+ /**
56
+ * External type references
57
+ */
58
+ externalReferences?: {
59
+ [id: string]: string;
60
+ };
61
+ }
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Configuration for the API.
3
+ */
4
+ export interface ITsToOpenApiConfigEntryPoint {
5
+ /**
6
+ * Match the name of the exported entry point.
7
+ */
8
+ name: string;
9
+ /**
10
+ * The base route path to use, defaults to the one in the entry point.
11
+ */
12
+ baseRoutePath?: string;
13
+ /**
14
+ * If using the same routes on multiple paths use the distinguisher to avoid operationId clashes, will be appended to operationIds.
15
+ */
16
+ operationIdDistinguisher?: string;
17
+ }
@@ -0,0 +1,5 @@
1
+ # @twin.org/ts-to-openapi - Changelog
2
+
3
+ ## v0.0.1-next.10
4
+
5
+ - Initial Release