File tree Expand file tree Collapse file tree 3 files changed +4
-61
lines changed Expand file tree Collapse file tree 3 files changed +4
-61
lines changed Original file line number Diff line number Diff line change @@ -868,6 +868,10 @@ export class RESTfulOpenAPIGenerator extends OpenAPIGeneratorBase {
868
868
const required : string [ ] = [ ] ;
869
869
870
870
for ( const field of fields ) {
871
+ if ( isForeignKeyField ( field ) ) {
872
+ // foreign keys are not exposed as attributes
873
+ continue ;
874
+ }
871
875
if ( isRelationshipField ( field ) ) {
872
876
let relType : string ;
873
877
if ( mode === 'create' || mode === 'update' ) {
Original file line number Diff line number Diff line change @@ -2764,11 +2764,8 @@ components:
2764
2764
image :
2765
2765
type : string
2766
2766
nullable : true
2767
- userId :
2768
- type : string
2769
2767
required :
2770
2768
- image
2771
- - userId
2772
2769
relationships :
2773
2770
type : object
2774
2771
properties :
@@ -2791,14 +2788,10 @@ components:
2791
2788
type : string
2792
2789
attributes :
2793
2790
type : object
2794
- required :
2795
- - userId
2796
2791
properties :
2797
2792
image :
2798
2793
type : string
2799
2794
nullable : true
2800
- userId :
2801
- type : string
2802
2795
relationships :
2803
2796
type : object
2804
2797
properties :
@@ -2830,8 +2823,6 @@ components:
2830
2823
image :
2831
2824
type : string
2832
2825
nullable : true
2833
- userId :
2834
- type : string
2835
2826
relationships :
2836
2827
type : object
2837
2828
properties :
@@ -2917,9 +2908,6 @@ components:
2917
2908
format : date-time
2918
2909
title :
2919
2910
type : string
2920
- authorId :
2921
- type : string
2922
- nullable : true
2923
2911
published :
2924
2912
type : boolean
2925
2913
viewCount :
@@ -2931,7 +2919,6 @@ components:
2931
2919
- createdAt
2932
2920
- updatedAt
2933
2921
- title
2934
- - authorId
2935
2922
- published
2936
2923
- viewCount
2937
2924
- notes
@@ -2974,9 +2961,6 @@ components:
2974
2961
format : date-time
2975
2962
title :
2976
2963
type : string
2977
- authorId :
2978
- type : string
2979
- nullable : true
2980
2964
published :
2981
2965
type : boolean
2982
2966
viewCount :
@@ -3022,9 +3006,6 @@ components:
3022
3006
format : date-time
3023
3007
title :
3024
3008
type : string
3025
- authorId :
3026
- type : string
3027
- nullable : true
3028
3009
published :
3029
3010
type : boolean
3030
3011
viewCount :
@@ -3108,16 +3089,6 @@ components:
3108
3089
type : string
3109
3090
type :
3110
3091
type : string
3111
- attributes :
3112
- type : object
3113
- properties :
3114
- postId :
3115
- type : string
3116
- userId :
3117
- type : string
3118
- required :
3119
- - postId
3120
- - userId
3121
3092
relationships :
3122
3093
type : object
3123
3094
properties :
Original file line number Diff line number Diff line change @@ -2770,11 +2770,8 @@ components:
2770
2770
oneOf :
2771
2771
- type : ' null'
2772
2772
- type : string
2773
- userId :
2774
- type : string
2775
2773
required :
2776
2774
- image
2777
- - userId
2778
2775
relationships :
2779
2776
type : object
2780
2777
properties :
@@ -2797,15 +2794,11 @@ components:
2797
2794
type : string
2798
2795
attributes :
2799
2796
type : object
2800
- required :
2801
- - userId
2802
2797
properties :
2803
2798
image :
2804
2799
oneOf :
2805
2800
- type : ' null'
2806
2801
- type : string
2807
- userId :
2808
- type : string
2809
2802
relationships :
2810
2803
type : object
2811
2804
properties :
@@ -2838,8 +2831,6 @@ components:
2838
2831
oneOf :
2839
2832
- type : ' null'
2840
2833
- type : string
2841
- userId :
2842
- type : string
2843
2834
relationships :
2844
2835
type : object
2845
2836
properties :
@@ -2925,10 +2916,6 @@ components:
2925
2916
format : date-time
2926
2917
title :
2927
2918
type : string
2928
- authorId :
2929
- oneOf :
2930
- - type : ' null'
2931
- - type : string
2932
2919
published :
2933
2920
type : boolean
2934
2921
viewCount :
@@ -2941,7 +2928,6 @@ components:
2941
2928
- createdAt
2942
2929
- updatedAt
2943
2930
- title
2944
- - authorId
2945
2931
- published
2946
2932
- viewCount
2947
2933
- notes
@@ -2984,10 +2970,6 @@ components:
2984
2970
format : date-time
2985
2971
title :
2986
2972
type : string
2987
- authorId :
2988
- oneOf :
2989
- - type : ' null'
2990
- - type : string
2991
2973
published :
2992
2974
type : boolean
2993
2975
viewCount :
@@ -3034,10 +3016,6 @@ components:
3034
3016
format : date-time
3035
3017
title :
3036
3018
type : string
3037
- authorId :
3038
- oneOf :
3039
- - type : ' null'
3040
- - type : string
3041
3019
published :
3042
3020
type : boolean
3043
3021
viewCount :
@@ -3122,16 +3100,6 @@ components:
3122
3100
type : string
3123
3101
type :
3124
3102
type : string
3125
- attributes :
3126
- type : object
3127
- properties :
3128
- postId :
3129
- type : string
3130
- userId :
3131
- type : string
3132
- required :
3133
- - postId
3134
- - userId
3135
3103
relationships :
3136
3104
type : object
3137
3105
properties :
You can’t perform that action at this time.
0 commit comments