@@ -510,12 +510,19 @@ let QUERYPARAM = 'query',
510
510
a combination of multiple schemas
511
511
*/
512
512
if ( resolveFor === TYPES_GENERATION ) {
513
- return {
513
+ const result = {
514
514
allOf : _ . map ( schema . allOf , ( schema ) => {
515
515
// eslint-disable-next-line no-use-before-define
516
516
return _resolveSchema ( context , schema , stack , resolveFor , _ . cloneDeep ( seenRef ) , currentPath ) ;
517
517
} )
518
518
} ;
519
+ if ( schema . title !== undefined ) {
520
+ result . title = schema . title ;
521
+ }
522
+ if ( schema . description !== undefined ) {
523
+ result . description = schema . description ;
524
+ }
525
+ return result ;
519
526
}
520
527
521
528
try {
@@ -594,10 +601,21 @@ let QUERYPARAM = 'query',
594
601
return _resolveSchema ( context , compositeSchema [ 0 ] , stack , resolveFor , _ . cloneDeep ( seenRef ) , currentPath ) ;
595
602
}
596
603
597
- return { [ compositeKeyword ] : _ . map ( compositeSchema , ( schemaElement , index ) => {
598
- return _resolveSchema ( context , schemaElement , stack , resolveFor , _ . cloneDeep ( seenRef ) ,
599
- utils . addToJsonPath ( currentPath , [ compositeKeyword , index ] ) ) ;
600
- } ) } ;
604
+ const result = {
605
+ [ compositeKeyword ] : _ . map ( compositeSchema , ( schemaElement , index ) => {
606
+ return _resolveSchema ( context , schemaElement , stack , resolveFor , _ . cloneDeep ( seenRef ) ,
607
+ utils . addToJsonPath ( currentPath , [ compositeKeyword , index ] ) ) ;
608
+ } )
609
+ } ;
610
+
611
+ if ( schema . title !== undefined ) {
612
+ result . title = schema . title ;
613
+ }
614
+ if ( schema . description !== undefined ) {
615
+ result . description = schema . description ;
616
+ }
617
+
618
+ return result ;
601
619
}
602
620
603
621
if ( schema . allOf ) {
@@ -768,6 +786,8 @@ let QUERYPARAM = 'query',
768
786
processSchema = ( resolvedSchema ) => {
769
787
if ( resolvedSchema . anyOf ) {
770
788
return {
789
+ title : resolvedSchema . title ,
790
+ description : resolvedSchema . description ,
771
791
anyOf : resolvedSchema . anyOf . map ( ( schema ) => {
772
792
return processSchema ( schema ) ;
773
793
} )
@@ -776,6 +796,8 @@ let QUERYPARAM = 'query',
776
796
777
797
if ( resolvedSchema . oneOf ) {
778
798
return {
799
+ title : resolvedSchema . title ,
800
+ description : resolvedSchema . description ,
779
801
oneOf : resolvedSchema . oneOf . map ( ( schema ) => {
780
802
return processSchema ( schema ) ;
781
803
} )
@@ -784,6 +806,8 @@ let QUERYPARAM = 'query',
784
806
785
807
if ( resolvedSchema . allOf ) {
786
808
return {
809
+ title : resolvedSchema . title ,
810
+ description : resolvedSchema . description ,
787
811
allOf : resolvedSchema . allOf . map ( ( schema ) => {
788
812
return processSchema ( schema ) ;
789
813
} )
@@ -814,6 +838,7 @@ let QUERYPARAM = 'query',
814
838
maximum : propValue . maximum ,
815
839
pattern : propValue . pattern ,
816
840
example : propValue . example ,
841
+ title : propValue . title ,
817
842
description : propValue . description ,
818
843
format : propValue . format
819
844
} ;
@@ -865,7 +890,9 @@ let QUERYPARAM = 'query',
865
890
return arrayDetails ;
866
891
}
867
892
return {
868
- type : resolvedSchema . type
893
+ type : resolvedSchema . type ,
894
+ description : resolvedSchema . description ,
895
+ title : resolvedSchema . title
869
896
} ;
870
897
} ,
871
898
@@ -2106,6 +2133,8 @@ let QUERYPARAM = 'query',
2106
2133
createProperties = ( param ) => {
2107
2134
const { schema } = param ;
2108
2135
return {
2136
+ description : schema . description ,
2137
+ title : schema . title ,
2109
2138
type : schema . type ,
2110
2139
format : schema . format ,
2111
2140
default : schema . default ,
@@ -2450,6 +2479,8 @@ let QUERYPARAM = 'query',
2450
2479
2451
2480
properties = {
2452
2481
type : schema . type ,
2482
+ description : schema . description ,
2483
+ title : schema . title ,
2453
2484
format : schema . format ,
2454
2485
default : schema . default ,
2455
2486
required : schema . required ,
0 commit comments