File tree Expand file tree Collapse file tree 18 files changed +4
-140
lines changed
Examples/JsonApiDotNetCoreExample/GeneratedSwagger
JsonApiDotNetCore.OpenApi/JsonApiObjects
ClientIdGenerationModes/GeneratedSwagger
CamelCase/GeneratedSwagger
KebabCase/GeneratedSwagger
PascalCase/GeneratedSwagger
QueryStrings/GeneratedSwagger
NullableReferenceTypesOff
ModelStateValidationOff/GeneratedSwagger
ModelStateValidationOn/GeneratedSwagger
ModelStateValidationOff/GeneratedSwagger
ModelStateValidationOn/GeneratedSwagger
RestrictedControllers/GeneratedSwagger Expand file tree Collapse file tree 18 files changed +4
-140
lines changed Original file line number Diff line number Diff line change 4977
4977
"additionalProperties" : false
4978
4978
},
4979
4979
"nullableToOnePersonInResponse" : {
4980
- "required" : [
4981
- " links"
4982
- ],
4983
4980
"type" : " object" ,
4984
4981
"properties" : {
4985
4982
"links" : {
5854
5851
"additionalProperties" : false
5855
5852
},
5856
5853
"toManyTagInResponse" : {
5857
- "required" : [
5858
- " links"
5859
- ],
5860
5854
"type" : " object" ,
5861
5855
"properties" : {
5862
5856
"links" : {
5898
5892
"additionalProperties" : false
5899
5893
},
5900
5894
"toManyTodoItemInResponse" : {
5901
- "required" : [
5902
- " links"
5903
- ],
5904
5895
"type" : " object" ,
5905
5896
"properties" : {
5906
5897
"links" : {
5943
5934
"additionalProperties" : false
5944
5935
},
5945
5936
"toOnePersonInResponse" : {
5946
- "required" : [
5947
- " links"
5948
- ],
5949
5937
"type" : " object" ,
5950
5938
"properties" : {
5951
5939
"links" : {
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ namespace JsonApiDotNetCore.OpenApi.JsonApiObjects.Relationships;
11
11
internal sealed class NullableToOneRelationshipInResponse < TResource > : NullableSingleData < ResourceIdentifier < TResource > >
12
12
where TResource : IIdentifiable
13
13
{
14
- [ Required ]
14
+ // Non-required because the related controller may be unavailable when used in an include.
15
15
[ JsonPropertyName ( "links" ) ]
16
16
public RelationshipLinks Links { get ; set ; } = null ! ;
17
17
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ namespace JsonApiDotNetCore.OpenApi.JsonApiObjects.Relationships;
11
11
internal sealed class ToManyRelationshipInResponse < TResource > : ManyData < ResourceIdentifier < TResource > >
12
12
where TResource : IIdentifiable
13
13
{
14
- [ Required ]
14
+ // Non-required because the related controller may be unavailable when used in an include.
15
15
[ JsonPropertyName ( "links" ) ]
16
16
public RelationshipLinks Links { get ; set ; } = null ! ;
17
17
Original file line number Diff line number Diff line change 1
- using System . ComponentModel . DataAnnotations ;
2
1
using System . Text . Json . Serialization ;
3
2
using JetBrains . Annotations ;
4
3
using JsonApiDotNetCore . OpenApi . JsonApiObjects . Links ;
@@ -11,7 +10,7 @@ namespace JsonApiDotNetCore.OpenApi.JsonApiObjects.Relationships;
11
10
internal sealed class ToOneRelationshipInResponse < TResource > : SingleData < ResourceIdentifier < TResource > >
12
11
where TResource : IIdentifiable
13
12
{
14
- [ Required ]
13
+ // Non-required because the related controller may be unavailable when used in an include.
15
14
[ JsonPropertyName ( "links" ) ]
16
15
public RelationshipLinks Links { get ; set ; } = null ! ;
17
16
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ internal sealed class ResourceDataInResponse<TResource> : ResourceData
15
15
[ JsonPropertyName ( "relationships" ) ]
16
16
public RelationshipsInResponse < TResource > Relationships { get ; set ; } = null ! ;
17
17
18
- // This would normally be { "self": "/people/5" } for GET /todoItems/1/assignee, but it is null when PeopleController is unavailable .
18
+ // Non-required because the related controller may be unavailable when used in an include .
19
19
[ JsonPropertyName ( "links" ) ]
20
20
public ResourceLinks Links { get ; set ; } = null ! ;
21
21
Original file line number Diff line number Diff line change 1098
1098
"additionalProperties" : false
1099
1099
},
1100
1100
"toManyGameInResponse" : {
1101
- "required" : [
1102
- " links"
1103
- ],
1104
1101
"type" : " object" ,
1105
1102
"properties" : {
1106
1103
"links" : {
1142
1139
"additionalProperties" : false
1143
1140
},
1144
1141
"toManyPlayerGroupInResponse" : {
1145
- "required" : [
1146
- " links"
1147
- ],
1148
1142
"type" : " object" ,
1149
1143
"properties" : {
1150
1144
"links" : {
1186
1180
"additionalProperties" : false
1187
1181
},
1188
1182
"toManyPlayerInResponse" : {
1189
- "required" : [
1190
- " links"
1191
- ],
1192
1183
"type" : " object" ,
1193
1184
"properties" : {
1194
1185
"links" : {
Original file line number Diff line number Diff line change 1803
1803
"additionalProperties" : false
1804
1804
},
1805
1805
"toManyLanguageInResponse" : {
1806
- "required" : [
1807
- " links"
1808
- ],
1809
1806
"type" : " object" ,
1810
1807
"properties" : {
1811
1808
"links" : {
Original file line number Diff line number Diff line change 7463
7463
"additionalProperties" : false
7464
7464
},
7465
7465
"nullable-to-one-flight-attendant-in-response" : {
7466
- "required" : [
7467
- " links"
7468
- ],
7469
7466
"type" : " object" ,
7470
7467
"properties" : {
7471
7468
"links" : {
7906
7903
"additionalProperties" : false
7907
7904
},
7908
7905
"to-many-flight-attendant-in-response" : {
7909
- "required" : [
7910
- " links"
7911
- ],
7912
7906
"type" : " object" ,
7913
7907
"properties" : {
7914
7908
"links" : {
7950
7944
"additionalProperties" : false
7951
7945
},
7952
7946
"to-many-flight-in-response" : {
7953
- "required" : [
7954
- " links"
7955
- ],
7956
7947
"type" : " object" ,
7957
7948
"properties" : {
7958
7949
"links" : {
7994
7985
"additionalProperties" : false
7995
7986
},
7996
7987
"to-many-passenger-in-response" : {
7997
- "required" : [
7998
- " links"
7999
- ],
8000
7988
"type" : " object" ,
8001
7989
"properties" : {
8002
7990
"links" : {
8039
8027
"additionalProperties" : false
8040
8028
},
8041
8029
"to-one-flight-attendant-in-response" : {
8042
- "required" : [
8043
- " links"
8044
- ],
8045
8030
"type" : " object" ,
8046
8031
"properties" : {
8047
8032
"links" : {
Original file line number Diff line number Diff line change 7463
7463
"additionalProperties" : false
7464
7464
},
7465
7465
"nullable-to-one-flight-attendant-in-response" : {
7466
- "required" : [
7467
- " links"
7468
- ],
7469
7466
"type" : " object" ,
7470
7467
"properties" : {
7471
7468
"links" : {
7906
7903
"additionalProperties" : false
7907
7904
},
7908
7905
"to-many-flight-attendant-in-response" : {
7909
- "required" : [
7910
- " links"
7911
- ],
7912
7906
"type" : " object" ,
7913
7907
"properties" : {
7914
7908
"links" : {
7950
7944
"additionalProperties" : false
7951
7945
},
7952
7946
"to-many-flight-in-response" : {
7953
- "required" : [
7954
- " links"
7955
- ],
7956
7947
"type" : " object" ,
7957
7948
"properties" : {
7958
7949
"links" : {
7994
7985
"additionalProperties" : false
7995
7986
},
7996
7987
"to-many-passenger-in-response" : {
7997
- "required" : [
7998
- " links"
7999
- ],
8000
7988
"type" : " object" ,
8001
7989
"properties" : {
8002
7990
"links" : {
8039
8027
"additionalProperties" : false
8040
8028
},
8041
8029
"to-one-flight-attendant-in-response" : {
8042
- "required" : [
8043
- " links"
8044
- ],
8045
8030
"type" : " object" ,
8046
8031
"properties" : {
8047
8032
"links" : {
Original file line number Diff line number Diff line change 2806
2806
"additionalProperties" : false
2807
2807
},
2808
2808
"nullableToOneStaffMemberInResponse" : {
2809
- "required" : [
2810
- " links"
2811
- ],
2812
2809
"type" : " object" ,
2813
2810
"properties" : {
2814
2811
"links" : {
3701
3698
"additionalProperties" : false
3702
3699
},
3703
3700
"toManyStaffMemberInResponse" : {
3704
- "required" : [
3705
- " links"
3706
- ],
3707
3701
"type" : " object" ,
3708
3702
"properties" : {
3709
3703
"links" : {
3746
3740
"additionalProperties" : false
3747
3741
},
3748
3742
"toOneStaffMemberInResponse" : {
3749
- "required" : [
3750
- " links"
3751
- ],
3752
3743
"type" : " object" ,
3753
3744
"properties" : {
3754
3745
"links" : {
Original file line number Diff line number Diff line change 2806
2806
"additionalProperties" : false
2807
2807
},
2808
2808
"nullable-to-one-staff-member-in-response" : {
2809
- "required" : [
2810
- " links"
2811
- ],
2812
2809
"type" : " object" ,
2813
2810
"properties" : {
2814
2811
"links" : {
3701
3698
"additionalProperties" : false
3702
3699
},
3703
3700
"to-many-staff-member-in-response" : {
3704
- "required" : [
3705
- " links"
3706
- ],
3707
3701
"type" : " object" ,
3708
3702
"properties" : {
3709
3703
"links" : {
3746
3740
"additionalProperties" : false
3747
3741
},
3748
3742
"to-one-staff-member-in-response" : {
3749
- "required" : [
3750
- " links"
3751
- ],
3752
3743
"type" : " object" ,
3753
3744
"properties" : {
3754
3745
"links" : {
Original file line number Diff line number Diff line change 2806
2806
"additionalProperties" : false
2807
2807
},
2808
2808
"NullableToOneStaffMemberInResponse" : {
2809
- "required" : [
2810
- " links"
2811
- ],
2812
2809
"type" : " object" ,
2813
2810
"properties" : {
2814
2811
"links" : {
3701
3698
"additionalProperties" : false
3702
3699
},
3703
3700
"ToManyStaffMemberInResponse" : {
3704
- "required" : [
3705
- " links"
3706
- ],
3707
3701
"type" : " object" ,
3708
3702
"properties" : {
3709
3703
"links" : {
3746
3740
"additionalProperties" : false
3747
3741
},
3748
3742
"ToOneStaffMemberInResponse" : {
3749
- "required" : [
3750
- " links"
3751
- ],
3752
3743
"type" : " object" ,
3753
3744
"properties" : {
3754
3745
"links" : {
Original file line number Diff line number Diff line change 4100
4100
"additionalProperties" : false
4101
4101
},
4102
4102
"nullableToOneNodeInResponse" : {
4103
- "required" : [
4104
- " links"
4105
- ],
4106
4103
"type" : " object" ,
4107
4104
"properties" : {
4108
4105
"links" : {
4245
4242
"additionalProperties" : false
4246
4243
},
4247
4244
"toManyNameValuePairInResponse" : {
4248
- "required" : [
4249
- " links"
4250
- ],
4251
4245
"type" : " object" ,
4252
4246
"properties" : {
4253
4247
"links" : {
4289
4283
"additionalProperties" : false
4290
4284
},
4291
4285
"toManyNodeInResponse" : {
4292
- "required" : [
4293
- " links"
4294
- ],
4295
4286
"type" : " object" ,
4296
4287
"properties" : {
4297
4288
"links" : {
4334
4325
"additionalProperties" : false
4335
4326
},
4336
4327
"toOneNodeInResponse" : {
4337
- "required" : [
4338
- " links"
4339
- ],
4340
4328
"type" : " object" ,
4341
4329
"properties" : {
4342
4330
"links" : {
Original file line number Diff line number Diff line change 2864
2864
"additionalProperties" : false
2865
2865
},
2866
2866
"nullableToOneEmptyInResponse" : {
2867
- "required" : [
2868
- " links"
2869
- ],
2870
2867
"type" : " object" ,
2871
2868
"properties" : {
2872
2869
"links" : {
3430
3427
"additionalProperties" : false
3431
3428
},
3432
3429
"toManyEmptyInResponse" : {
3433
- "required" : [
3434
- " links"
3435
- ],
3436
3430
"type" : " object" ,
3437
3431
"properties" : {
3438
3432
"links" : {
You can’t perform that action at this time.
0 commit comments