Skip to content

Commit 0661877

Browse files
Merge pull request #481 from openapi-ui/main
chore: merge main to release
2 parents 50642a8 + 260fe2e commit 0661877

File tree

62 files changed

+3548
-1287
lines changed

Some content is hidden

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

62 files changed

+3548
-1287
lines changed

.changeset/cold-lands-open.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'openapi-ts-request': patch
3+
---
4+
5+
fix: remove fn async #477

.changeset/few-elephants-sit.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"openapi-ts-request": minor
3+
---
4+
5+
feat: 过滤条件默认大小写敏感,提供参数filterCaseInsensitive支持,关闭 #467

README-en_US.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,7 @@ $ openapi --help
192192
-f, --full <boolean> full replacement (default: true)
193193
--enableLogging <boolean> open the log (default: false)
194194
--priorityRule <string> priority rule, include/exclude/both (default: "include")
195+
--filterCaseInsensitive <boolean> whether to perform a case-insensitive match with includeTags, includePaths, excludeTags, excludePaths filters (default: false)
195196
--includeTags <(string|RegExp)[]> generate code from include tags
196197
--includePaths <(string|RegExp)[]> generate code from include paths
197198
--excludeTags <(string|RegExp)[]> generate code from exclude tags
@@ -230,6 +231,7 @@ openapi -i ./spec.json -o ./apis
230231
| full | no | boolean | true | full replacement |
231232
| enableLogging | no | boolean | false | open the log |
232233
| priorityRule | no | string | 'include' | priority rule, include/exclude/both |
234+
| filterCaseInsensitive | no | boolean | false | whether to perform a case-insensitive match with includeTags, includePaths, excludeTags, excludePaths filters |
233235
| includeTags | no | (string\|RegExp)[] | - | generate code from include tags, priorityRule=include required |
234236
| includePaths | no | (string\|RegExp)[] | - | generate code from include paths |
235237
| excludeTags | no | (string\|RegExp)[] | - | generate code from exclude tags |

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,7 @@ $ openapi --help
194194
-f, --full <boolean> full replacement (default: true)
195195
--enableLogging <boolean> open the log (default: false)
196196
--priorityRule <string> priority rule, include/exclude/both (default: "include")
197+
--filterCaseInsensitive <boolean> whether to perform a case-insensitive match with includeTags, includePaths, excludeTags, excludePaths filters
197198
--includeTags <(string|RegExp)[]> generate code from include tags
198199
--includePaths <(string|RegExp)[]> generate code from include paths
199200
--excludeTags <(string|RegExp)[]> generate code from exclude tags
@@ -232,6 +233,7 @@ openapi --i ./spec.json --o ./apis
232233
| full || boolean | true | 是否全量替换 |
233234
| enableLogging || boolean | false | 是否开启日志 |
234235
| priorityRule || string | 'include' | 模式规则,可选include/exclude/both |
236+
| filterCaseInsensitive || boolean | false | 执行 includeTags、includePaths、excludeTags、excludePaths 过滤时是否忽略大小写 |
235237
| includeTags || (string\|RegExp)[] | - | 根据指定的 tags 生成代码, priorityRule=include则必填 |
236238
| includePaths || (string\|RegExp)[] | - | 根据指定的 paths 生成代码 |
237239
| excludeTags || (string\|RegExp)[] | - | 根据指定的 tags 不生成代码 |

pnpm-lock.yaml

Lines changed: 43 additions & 43 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/bin/openapi.ts

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,18 @@ const params = program
2626
.option('-f, --full <boolean>', 'full replacement', true)
2727
.option('--enableLogging <boolean>', 'open the log', false)
2828
.option(
29-
'--priorityRule <string>',
30-
'priority rule, include/exclude/both (default: "include")'
29+
'--filterCaseInsensitive <boolean>',
30+
'whether to perform a case-insensitive match with includeTags, includePaths, excludeTags, excludePaths filters',
31+
false
32+
)
33+
.option(
34+
'--includeTags <(string|RegExp)[]>',
35+
'generate code from include tags'
36+
)
37+
.option(
38+
'--filterCaseInsensitive <boolean>',
39+
'whether to perform a case-insensitive match with includeTags, includePaths, excludeTags, excludePaths filters',
40+
false
3141
)
3242
.option(
3343
'--includeTags <(string|RegExp)[]>',
@@ -115,6 +125,8 @@ const baseGenerate = (_params_: OptionValues): GenerateServiceProps => {
115125
full: JSON.parse(_params_.full as string) === true,
116126
enableLogging: JSON.parse(_params_.enableLogging as string) === true,
117127
priorityRule: _params_.priorityRule as IPriorityRule,
128+
filterCaseInsensitive:
129+
JSON.parse(_params_.filterCaseInsensitive as string) === true,
118130
includeTags: _params_.includeTags as string[],
119131
includePaths: _params_.includePaths as string[],
120132
excludeTags: _params_.excludeTags as string[],

0 commit comments

Comments
 (0)