File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1-
1+ using KiotaSamples . PetStoreSdk . Pet . FindByStatus ;
22
33
44// ** Swagger Petstore sample
6767// This is translated to an array, with the generated SDK. ⚡
6868static async Task < long > FindPetsByStatus ( PetstoreApiClient client , JsonSerializerOptions jsonSerializerOptions )
6969{
70- var statuses = new [ ] { "pending" , "sold" } ; // Mutliple statuses we are going to query on.
70+ var statuses = new [ ] { GetStatusQueryParameterType . Pending , GetStatusQueryParameterType . Sold } ; // Multiple statuses we are going to query on.
7171
7272 // Sample curl:
7373 // curl -X 'GET' 'https://petstore.swagger.io/v2/pet/findByStatus?status=available&status=pending&status=sold' -H 'accept: application/json'
7474
75- var results = ( await client . Pet . FindByStatus . GetAsync ( x => x . QueryParameters . Status = statuses ) ) ? . ToList ( ) ;
75+ var results = ( await client . Pet . FindByStatus . GetAsync ( x => x . QueryParameters . StatusAsGetStatusQueryParameterType = statuses ) ) ? . ToList ( ) ;
7676 if ( results is null )
7777 {
7878 Console . WriteLine ( "No results found." ) ;
You can’t perform that action at this time.
0 commit comments