Skip to content

Commit 29cbc63

Browse files
authored
Merge pull request #38 from Himenon/develop
feat: Provide an API that makes it easy for users to extend the code generator.
2 parents 5774177 + ad3ec06 commit 29cbc63

File tree

153 files changed

+3097
-1124
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

153 files changed

+3097
-1124
lines changed

.dependency-cruiser.js

+19-91
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,25 @@
11
module.exports = {
22
extends: "dependency-cruiser/configs/recommended-strict",
3-
/*
4-
the 'dependency-cruiser/configs/recommended-strict' preset
5-
contains these rules:
6-
no-circular - flags all circular dependencies
7-
no-orphans - flags orphan modules (except typescript .d.ts files)
8-
no-deprecated-core - flags dependencies on deprecated node 'core' modules
9-
no-deprecated-npm - flags dependencies on deprecated npm modules
10-
no-non-package-json - flags (npm) dependencies that don't occur in package.json
11-
not-to-unresolvable - flags dependencies that can't be resolved
12-
no-duplicate-dep-types - flags dependencies that occur more than once in package.json
13-
14-
If you need to, you can override these rules. E.g. to ignore the
15-
no-duplicate-dep-types rule, you can set its severity to "ignore" by
16-
adding this to the 'forbidden' section:
17-
{
18-
name: 'no-duplicate-dep-types',
19-
severity: 'ignore'
20-
}
21-
22-
Also, by default, the preset does not follow any external modules (things in
23-
node_modules or in yarn's plug'n'play magic). If you want to have that
24-
differently, just override it the options.doNotFollow key.
25-
*/
263
forbidden: [
4+
{
5+
name: "no-circular",
6+
severity: "error",
7+
comment: "Found a circular reference, please fix it.",
8+
from: {},
9+
to: {
10+
circular: true,
11+
},
12+
},
13+
{
14+
name: "Invalid Code Template Dependency",
15+
severity: "error",
16+
from: {
17+
path: "^src/code-templates",
18+
},
19+
to: {
20+
path: "^src/internal",
21+
},
22+
},
2723
{
2824
name: "not-to-test",
2925
comment:
@@ -101,80 +97,12 @@ module.exports = {
10197
},
10298
],
10399
options: {
104-
/* conditions specifying which files not to follow further when encountered:
105-
- path: a regular expression to match
106-
- dependencyTypes: see https://github.com/sverweij/dependency-cruiser/blob/develop/doc/rules-reference.md#dependencytypes
107-
for a complete list
108-
*/
109100
doNotFollow: {
110-
// path: 'node_modules',
111101
dependencyTypes: ["npm", "npm-dev", "npm-optional", "npm-peer", "npm-bundled", "npm-no-pkg"],
112102
},
113-
114-
/* conditions specifying which dependencies to exclude
115-
- path: a regular expression to match
116-
- dynamic: a boolean indicating whether to ignore dynamic (true) or static (false) dependencies.
117-
leave out if you want to exclude neither (recommended!)
118-
*/
119-
// , exclude : {
120-
// path: ''
121-
// , dynamic: true
122-
// }
123-
124-
/* pattern specifying which files to include (regular expression)
125-
dependency-cruiser will skip everything not matching this pattern
126-
*/
127-
// , includeOnly : ''
128-
129-
/* list of module systems to cruise */
130-
// , moduleSystems: ['amd', 'cjs', 'es6', 'tsd']
131-
132-
/* prefix for links in html and svg output (e.g. https://github.com/you/yourrepo/blob/develop/) */
133-
// , prefix: ''
134-
135-
/* if true detect dependencies that only exist before typescript-to-javascript compilation */
136103
tsPreCompilationDeps: true,
137-
138-
/* if true combines the package.jsons found from the module up to the base
139-
folder the cruise is initiated from. Useful for how (some) mono-repos
140-
manage dependencies & dependency definitions.
141-
*/
142-
// , combinedDependencies: false
143-
144-
/* if true leave symlinks untouched, otherwise use the realpath */
145-
// , preserveSymlinks: false
146-
147-
/* Typescript project file ('tsconfig.json') to use for
148-
(1) compilation and
149-
(2) resolution (e.g. with the paths property)
150-
151-
The (optional) fileName attribute specifies which file to take (relative to
152-
dependency-cruiser's current working directory). When not provided
153-
defaults to './tsconfig.json'.
154-
*/
155104
tsConfig: {
156105
fileName: "./tsconfig.json",
157106
},
158-
159-
/* Webpack configuration to use to get resolve options from.
160-
161-
The (optional) fileName attribute specifies which file to take (relative to dependency-cruiser's
162-
current working directory. When not provided defaults to './webpack.conf.js'.
163-
164-
The (optional) `env` and `args` attributes contain the parameters to be passed if
165-
your webpack config is a function and takes them (see webpack documentation
166-
for details)
167-
*/
168-
// , webpackConfig: {
169-
// fileName: './webpack.conf.js'
170-
// , env: {}
171-
// , args: {}
172-
// }
173-
174-
/* How to resolve external modules - use "yarn-pnp" if you're using yarn's Plug'n'Play.
175-
otherwise leave it out (or set to the default, which is 'node_modules')
176-
*/
177-
// , externalModuleResolutionStrategy: 'node_modules'
178107
},
179108
};
180-
// generated: [email protected] on 2019-11-21T01:41:12.817Z

CHANGELOG.md

+34-100
Original file line numberDiff line numberDiff line change
@@ -4,207 +4,141 @@ All notable changes to this project will be documented in this file.
44
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55

66
<a name="0.7.2"></a>
7-
## 0.7.2 (2021-04-04)
87

8+
## 0.7.2 (2021-04-04)
99

1010
### Code Refactoring
1111

12-
* remove v3 directory ([#29](https://github.com/Himenon/openapi-typescript-code-generator/issues/29)) ([4d1eee4](https://github.com/Himenon/openapi-typescript-code-generator/commit/4d1eee4))
13-
14-
15-
16-
12+
- remove v3 directory ([#29](https://github.com/Himenon/openapi-typescript-code-generator/issues/29)) ([4d1eee4](https://github.com/Himenon/openapi-typescript-code-generator/commit/4d1eee4))
1713

1814
<a name="0.7.1"></a>
19-
## 0.7.1 (2021-04-04)
2015

16+
## 0.7.1 (2021-04-04)
2117

2218
### Chores
2319

24-
* **deps:** update library version ([#28](https://github.com/Himenon/openapi-typescript-code-generator/issues/28)) ([f19603b](https://github.com/Himenon/openapi-typescript-code-generator/commit/f19603b))
25-
26-
27-
28-
20+
- **deps:** update library version ([#28](https://github.com/Himenon/openapi-typescript-code-generator/issues/28)) ([f19603b](https://github.com/Himenon/openapi-typescript-code-generator/commit/f19603b))
2921

3022
<a name="0.7.0"></a>
31-
# 0.7.0 (2021-04-04)
3223

24+
# 0.7.0 (2021-04-04)
3325

3426
### Features
3527

36-
* support dual package ([#27](https://github.com/Himenon/openapi-typescript-code-generator/issues/27)) ([1cb8507](https://github.com/Himenon/openapi-typescript-code-generator/commit/1cb8507))
37-
38-
39-
40-
28+
- support dual package ([#27](https://github.com/Himenon/openapi-typescript-code-generator/issues/27)) ([1cb8507](https://github.com/Himenon/openapi-typescript-code-generator/commit/1cb8507))
4129

4230
<a name="0.6.2"></a>
31+
4332
## 0.6.2 (2021-04-01)
4433

4534
**Note:** Version bump only for package @himenon/openapi-typescript-code-generator
4635

47-
48-
49-
50-
5136
<a name="0.6.1"></a>
37+
5238
## 0.6.1 (2021-04-01)
5339

5440
**Note:** Version bump only for package @himenon/openapi-typescript-code-generator
5541

56-
57-
58-
59-
6042
<a name="0.6.0"></a>
61-
# 0.6.0 (2021-03-23)
6243

44+
# 0.6.0 (2021-03-23)
6345

6446
### Features
6547

66-
* Support sync API Client generation ([#22](https://github.com/Himenon/openapi-typescript-code-generator/issues/22)) ([4bbde34](https://github.com/Himenon/openapi-typescript-code-generator/commit/4bbde34))
67-
68-
69-
70-
48+
- Support sync API Client generation ([#22](https://github.com/Himenon/openapi-typescript-code-generator/issues/22)) ([4bbde34](https://github.com/Himenon/openapi-typescript-code-generator/commit/4bbde34))
7149

7250
<a name="0.5.0"></a>
73-
# 0.5.0 (2021-03-22)
7451

52+
# 0.5.0 (2021-03-22)
7553

7654
### Features
7755

78-
* **codegen:** add error response type name list and add allowOperationIds ([#20](https://github.com/Himenon/openapi-typescript-code-generator/issues/20)) ([924c4a1](https://github.com/Himenon/openapi-typescript-code-generator/commit/924c4a1))
79-
80-
81-
82-
56+
- **codegen:** add error response type name list and add allowOperationIds ([#20](https://github.com/Himenon/openapi-typescript-code-generator/issues/20)) ([924c4a1](https://github.com/Himenon/openapi-typescript-code-generator/commit/924c4a1))
8357

8458
<a name="0.4.0"></a>
85-
# 0.4.0 (2021-02-18)
8659

60+
# 0.4.0 (2021-02-18)
8761

8862
### Features
8963

90-
* **comment:** Use the defined comment ([#19](https://github.com/Himenon/openapi-typescript-code-generator/issues/19)) ([9e90e7b](https://github.com/Himenon/openapi-typescript-code-generator/commit/9e90e7b))
91-
92-
93-
94-
64+
- **comment:** Use the defined comment ([#19](https://github.com/Himenon/openapi-typescript-code-generator/issues/19)) ([9e90e7b](https://github.com/Himenon/openapi-typescript-code-generator/commit/9e90e7b))
9565

9666
<a name="0.3.0"></a>
97-
# 0.3.0 (2021-02-01)
9867

68+
# 0.3.0 (2021-02-01)
9969

10070
### Features
10171

102-
* update codegen api and types ([#17](https://github.com/Himenon/openapi-typescript-code-generator/issues/17)) ([1c6e748](https://github.com/Himenon/openapi-typescript-code-generator/commit/1c6e748))
103-
104-
105-
106-
72+
- update codegen api and types ([#17](https://github.com/Himenon/openapi-typescript-code-generator/issues/17)) ([1c6e748](https://github.com/Himenon/openapi-typescript-code-generator/commit/1c6e748))
10773

10874
<a name="0.2.0"></a>
109-
# 0.2.0 (2021-02-01)
11075

76+
# 0.2.0 (2021-02-01)
11177

11278
### Features
11379

114-
* Support build github-rest-api-description ([#16](https://github.com/Himenon/openapi-typescript-code-generator/issues/16)) ([0323f9f](https://github.com/Himenon/openapi-typescript-code-generator/commit/0323f9f)), closes [#12](https://github.com/Himenon/openapi-typescript-code-generator/issues/12) [#13](https://github.com/Himenon/openapi-typescript-code-generator/issues/13) [#14](https://github.com/Himenon/openapi-typescript-code-generator/issues/14) [#15](https://github.com/Himenon/openapi-typescript-code-generator/issues/15)
115-
116-
117-
118-
80+
- Support build github-rest-api-description ([#16](https://github.com/Himenon/openapi-typescript-code-generator/issues/16)) ([0323f9f](https://github.com/Himenon/openapi-typescript-code-generator/commit/0323f9f)), closes [#12](https://github.com/Himenon/openapi-typescript-code-generator/issues/12) [#13](https://github.com/Himenon/openapi-typescript-code-generator/issues/13) [#14](https://github.com/Himenon/openapi-typescript-code-generator/issues/14) [#15](https://github.com/Himenon/openapi-typescript-code-generator/issues/15)
11981

12082
<a name="0.1.7"></a>
121-
## 0.1.7 (2021-01-17)
12283

84+
## 0.1.7 (2021-01-17)
12385

12486
### Code Refactoring
12587

126-
* **data-structure:** use [@himenon](https://github.com/himenon)/path-oriented-data-structure ([#11](https://github.com/Himenon/openapi-typescript-code-generator/issues/11)) ([bfe7a4d](https://github.com/Himenon/openapi-typescript-code-generator/commit/bfe7a4d))
127-
128-
129-
130-
88+
- **data-structure:** use [@himenon](https://github.com/himenon)/path-oriented-data-structure ([#11](https://github.com/Himenon/openapi-typescript-code-generator/issues/11)) ([bfe7a4d](https://github.com/Himenon/openapi-typescript-code-generator/commit/bfe7a4d))
13189

13290
<a name="0.1.6"></a>
133-
## 0.1.6 (2021-01-16)
13491

92+
## 0.1.6 (2021-01-16)
13593

13694
### Bug Fixes
13795

138-
* **vadliation:** example property ([#10](https://github.com/Himenon/openapi-typescript-code-generator/issues/10)) ([c25ddac](https://github.com/Himenon/openapi-typescript-code-generator/commit/c25ddac)), closes [#9](https://github.com/Himenon/openapi-typescript-code-generator/issues/9)
139-
140-
141-
142-
96+
- **vadliation:** example property ([#10](https://github.com/Himenon/openapi-typescript-code-generator/issues/10)) ([c25ddac](https://github.com/Himenon/openapi-typescript-code-generator/commit/c25ddac)), closes [#9](https://github.com/Himenon/openapi-typescript-code-generator/issues/9)
14397

14498
<a name="0.1.5"></a>
145-
## 0.1.5 (2021-01-15)
14699

100+
## 0.1.5 (2021-01-15)
147101

148102
### Bug Fixes
149103

150-
* unresolved reference ([#8](https://github.com/Himenon/openapi-typescript-code-generator/issues/8)) ([07e0e6d](https://github.com/Himenon/openapi-typescript-code-generator/commit/07e0e6d)), closes [#7](https://github.com/Himenon/openapi-typescript-code-generator/issues/7)
151-
152-
153-
154-
104+
- unresolved reference ([#8](https://github.com/Himenon/openapi-typescript-code-generator/issues/8)) ([07e0e6d](https://github.com/Himenon/openapi-typescript-code-generator/commit/07e0e6d)), closes [#7](https://github.com/Himenon/openapi-typescript-code-generator/issues/7)
155105

156106
<a name="0.1.4"></a>
157-
## 0.1.4 (2021-01-14)
158107

108+
## 0.1.4 (2021-01-14)
159109

160110
### Chores
161111

162-
* fix bugs and update docs ([#6](https://github.com/Himenon/openapi-typescript-code-generator/issues/6)) ([13c233f](https://github.com/Himenon/openapi-typescript-code-generator/commit/13c233f))
163-
164-
165-
166-
112+
- fix bugs and update docs ([#6](https://github.com/Himenon/openapi-typescript-code-generator/issues/6)) ([13c233f](https://github.com/Himenon/openapi-typescript-code-generator/commit/13c233f))
167113

168114
<a name="0.1.3"></a>
169-
## 0.1.3 (2021-01-12)
170115

116+
## 0.1.3 (2021-01-12)
171117

172118
### Documentation
173119

174-
* remove v3 ([#5](https://github.com/Himenon/openapi-typescript-code-generator/issues/5)) ([8082df4](https://github.com/Himenon/openapi-typescript-code-generator/commit/8082df4))
175-
176-
177-
178-
120+
- remove v3 ([#5](https://github.com/Himenon/openapi-typescript-code-generator/issues/5)) ([8082df4](https://github.com/Himenon/openapi-typescript-code-generator/commit/8082df4))
179121

180122
<a name="0.1.2"></a>
181-
## 0.1.2 (2021-01-12)
182123

124+
## 0.1.2 (2021-01-12)
183125

184126
### Bug Fixes
185127

186-
* after release some bugs ([#4](https://github.com/Himenon/openapi-typescript-code-generator/issues/4)) ([1a756bd](https://github.com/Himenon/openapi-typescript-code-generator/commit/1a756bd))
187-
188-
189-
190-
128+
- after release some bugs ([#4](https://github.com/Himenon/openapi-typescript-code-generator/issues/4)) ([1a756bd](https://github.com/Himenon/openapi-typescript-code-generator/commit/1a756bd))
191129

192130
<a name="0.1.1"></a>
193-
## 0.1.1 (2021-01-12)
194131

132+
## 0.1.1 (2021-01-12)
195133

196134
### Builds
197135

198-
* **deps:** bump node-notifier from 8.0.0 to 8.0.1 ([#3](https://github.com/Himenon/openapi-typescript-code-generator/issues/3)) ([0eedc0e](https://github.com/Himenon/openapi-typescript-code-generator/commit/0eedc0e))
199-
200-
201-
202-
136+
- **deps:** bump node-notifier from 8.0.0 to 8.0.1 ([#3](https://github.com/Himenon/openapi-typescript-code-generator/issues/3)) ([0eedc0e](https://github.com/Himenon/openapi-typescript-code-generator/commit/0eedc0e))
203137

204138
<a name="0.1.0"></a>
205-
# 0.1.0 (2021-01-12)
206139

140+
# 0.1.0 (2021-01-12)
207141

208142
### Features
209143

210-
* Initial commit of OpenAPI TypeScript Generator ([#2](https://github.com/Himenon/openapi-typescript-code-generator/issues/2)) ([df022c2](https://github.com/Himenon/openapi-typescript-code-generator/commit/df022c2))
144+
- Initial commit of OpenAPI TypeScript Generator ([#2](https://github.com/Himenon/openapi-typescript-code-generator/issues/2)) ([df022c2](https://github.com/Himenon/openapi-typescript-code-generator/commit/df022c2))

0 commit comments

Comments
 (0)