File tree Expand file tree Collapse file tree 3 files changed +41
-0
lines changed Expand file tree Collapse file tree 3 files changed +41
-0
lines changed Original file line number Diff line number Diff line change @@ -874,6 +874,9 @@ export class RESTfulOpenAPIGenerator extends OpenAPIGeneratorBase {
874
874
! ( isDataModel ( field . $resolvedType ?. decl ) && field . type . array )
875
875
) {
876
876
required . push ( field . name ) ;
877
+ } else if ( mode === 'read' ) {
878
+ // Until we support sparse fieldsets, all fields are required for read operations
879
+ required . push ( field . name ) ;
877
880
}
878
881
}
879
882
}
Original file line number Diff line number Diff line change @@ -2591,6 +2591,11 @@ components:
2591
2591
type : string
2592
2592
role :
2593
2593
$ref : ' #/components/schemas/role'
2594
+ required :
2595
+ - createdAt
2596
+ - updatedAt
2597
+ - email
2598
+ - role
2594
2599
relationships :
2595
2600
type : object
2596
2601
properties :
@@ -2761,6 +2766,9 @@ components:
2761
2766
nullable : true
2762
2767
userId :
2763
2768
type : string
2769
+ required :
2770
+ - image
2771
+ - userId
2764
2772
relationships :
2765
2773
type : object
2766
2774
properties :
@@ -2919,6 +2927,14 @@ components:
2919
2927
notes :
2920
2928
type : string
2921
2929
nullable : true
2930
+ required :
2931
+ - createdAt
2932
+ - updatedAt
2933
+ - title
2934
+ - authorId
2935
+ - published
2936
+ - viewCount
2937
+ - notes
2922
2938
relationships :
2923
2939
type : object
2924
2940
properties :
@@ -3099,6 +3115,9 @@ components:
3099
3115
type : string
3100
3116
userId :
3101
3117
type : string
3118
+ required :
3119
+ - postId
3120
+ - userId
3102
3121
relationships :
3103
3122
type : object
3104
3123
properties :
Original file line number Diff line number Diff line change @@ -2596,6 +2596,11 @@ components:
2596
2596
type : string
2597
2597
role :
2598
2598
$ref : ' #/components/schemas/role'
2599
+ required :
2600
+ - createdAt
2601
+ - updatedAt
2602
+ - email
2603
+ - role
2599
2604
relationships :
2600
2605
type : object
2601
2606
properties :
@@ -2767,6 +2772,9 @@ components:
2767
2772
- type : string
2768
2773
userId :
2769
2774
type : string
2775
+ required :
2776
+ - image
2777
+ - userId
2770
2778
relationships :
2771
2779
type : object
2772
2780
properties :
@@ -2929,6 +2937,14 @@ components:
2929
2937
oneOf :
2930
2938
- type : ' null'
2931
2939
- type : string
2940
+ required :
2941
+ - createdAt
2942
+ - updatedAt
2943
+ - title
2944
+ - authorId
2945
+ - published
2946
+ - viewCount
2947
+ - notes
2932
2948
relationships :
2933
2949
type : object
2934
2950
properties :
@@ -3113,6 +3129,9 @@ components:
3113
3129
type : string
3114
3130
userId :
3115
3131
type : string
3132
+ required :
3133
+ - postId
3134
+ - userId
3116
3135
relationships :
3117
3136
type : object
3118
3137
properties :
You can’t perform that action at this time.
0 commit comments