File tree Expand file tree Collapse file tree 2 files changed +22
-1
lines changed
Expand file tree Collapse file tree 2 files changed +22
-1
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ ' openapi-ts-request ' : patch
3+ ---
4+
5+ priorityRule 为 both 和 include 的时候都设置includeTags, includePaths 的默认值为[ /.* /g]
Original file line number Diff line number Diff line change @@ -255,6 +255,8 @@ export async function generateService({
255255 mockFolder,
256256 includeTags,
257257 excludeTags,
258+ includePaths,
259+ excludePaths,
258260 authorization,
259261 isTranslateToEnglishTag,
260262 priorityRule = PriorityRule . include ,
@@ -300,14 +302,28 @@ export async function generateService({
300302 ? map ( includeTags , ( item ) =>
301303 typeof item === 'string' ? item . toLowerCase ( ) : item
302304 )
303- : priorityRule === PriorityRule . include
305+ : priorityRule === PriorityRule . include ||
306+ priorityRule === PriorityRule . both
307+ ? [ / .* / g]
308+ : null ,
309+ includePaths : includePaths
310+ ? map ( includePaths , ( item ) =>
311+ typeof item === 'string' ? item . toLowerCase ( ) : item
312+ )
313+ : priorityRule === PriorityRule . include ||
314+ priorityRule === PriorityRule . both
304315 ? [ / .* / g]
305316 : null ,
306317 excludeTags : excludeTags
307318 ? map ( excludeTags , ( item ) =>
308319 typeof item === 'string' ? item . toLowerCase ( ) : item
309320 )
310321 : null ,
322+ excludePaths : excludePaths
323+ ? map ( excludePaths , ( item ) =>
324+ typeof item === 'string' ? item . toLowerCase ( ) : item
325+ )
326+ : null ,
311327 requestOptionsType : '{[key: string]: unknown}' ,
312328 namespace : 'API' ,
313329 isGenReactQuery : false ,
You can’t perform that action at this time.
0 commit comments