File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ ---
2+ ' openapi-ts-request ' : patch
3+ ---
4+
5+ fix: fix allowTags repeat mark
Original file line number Diff line number Diff line change @@ -404,19 +404,18 @@ export function markAllowSchema(
404404 schemaStr : string ,
405405 schemas : ComponentsObject [ 'schemas' ]
406406) {
407- const refs = schemaStr . match ( / # \/ c o m p o n e n t s \/ s c h e m a s \/ ( [ A - Z a - z 0 - 9 . _ - ] + ) / g) ;
407+ const refs = schemaStr ? .match ( / # \/ c o m p o n e n t s \/ s c h e m a s \/ ( [ A - Z a - z 0 - 9 . _ - ] + ) / g) ;
408408
409409 forEach ( refs , ( ref ) => {
410410 const refPaths = ref . split ( '/' ) ;
411411 const schema = schemas ?. [
412412 refPaths [ refPaths . length - 1 ]
413413 ] as ICustomSchemaObject ;
414414
415- if ( schema ) {
415+ if ( ! schema ?. isAllowed ) {
416416 schema . isAllowed = true ;
417+ markAllowSchema ( JSON . stringify ( schema ) , schemas ) ;
417418 }
418-
419- markAllowSchema ( JSON . stringify ( schema ) , schemas ) ;
420419 } ) ;
421420}
422421
You can’t perform that action at this time.
0 commit comments