File tree 2 files changed +4
-4
lines changed
src/Examples/JsonApiDotNetCoreExampleClient
2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 25
25
26
26
<ItemGroup >
27
27
<OpenApiReference Include =" ..\JsonApiDotNetCoreExample\GeneratedSwagger\JsonApiDotNetCoreExample.json" CodeGenerator =" NSwagCSharp" ClassName =" ExampleApiClient" >
28
- <Options >/GenerateExceptionClasses:false /AdditionalNamespaceUsages:JsonApiDotNetCore.OpenApi.Client.Exceptions</Options >
28
+ <Options >/GenerateExceptionClasses:false /WrapResponses:true /ResponseClass:JsonApiResponse / AdditionalNamespaceUsages:JsonApiDotNetCore.OpenApi.Client.Exceptions</Options >
29
29
</OpenApiReference >
30
30
</ItemGroup >
31
31
</Project >
Original file line number Diff line number Diff line change 12
12
13
13
var apiClient = new ExampleApiClient ( httpClient ) ;
14
14
15
- PersonCollectionResponseDocument getResponse = await apiClient . GetPersonCollectionAsync ( new Dictionary < string , string ? >
15
+ JsonApiResponse < PersonCollectionResponseDocument > getResponse = await apiClient . GetPersonCollectionAsync ( new Dictionary < string , string ? >
16
16
{
17
17
[ "filter" ] = "has(assignedTodoItems)" ,
18
18
[ "sort" ] = "-lastName" ,
19
19
[ "page[size]" ] = "5" ,
20
20
[ "include" ] = "assignedTodoItems.tags"
21
21
} ) ;
22
22
23
- foreach ( PersonDataInResponse person in getResponse . Data )
23
+ foreach ( PersonDataInResponse person in getResponse . Result . Data )
24
24
{
25
- PrintPerson ( person , getResponse . Included ) ;
25
+ PrintPerson ( person , getResponse . Result . Included ) ;
26
26
}
27
27
28
28
var patchRequest = new PersonPatchRequestDocument
You can’t perform that action at this time.
0 commit comments