@@ -36,7 +36,23 @@ public abstract class PetApiController : ControllerBase
3636 [ Consumes ( "application/json" , "application/xml" ) ]
3737 [ ValidateModelState ]
3838 [ ProducesResponseType ( statusCode : 200 , type : typeof ( Pet ) ) ]
39- public abstract IActionResult AddPet ( [ FromBody ] Pet pet ) ;
39+ public virtual IActionResult AddPet ( [ FromBody ] Pet pet )
40+ {
41+
42+ //TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ...
43+ // return StatusCode(200, default);
44+ //TODO: Uncomment the next line to return response 405 or use other options such as return this.NotFound(), return this.BadRequest(..), ...
45+ // return StatusCode(405);
46+ string exampleJson = null ;
47+ exampleJson = "{\r \n \" photoUrls\" : [ \" photoUrls\" , \" photoUrls\" ],\r \n \" name\" : \" doggie\" ,\r \n \" id\" : 0,\r \n \" category\" : {\r \n \" name\" : \" name\" ,\r \n \" id\" : 6\r \n },\r \n \" tags\" : [ {\r \n \" name\" : \" name\" ,\r \n \" id\" : 1\r \n }, {\r \n \" name\" : \" name\" ,\r \n \" id\" : 1\r \n } ],\r \n \" status\" : \" available\" \r \n }" ;
48+ exampleJson = "<Pet>\n <id>123456789</id>\n <Category>\n <id>123456789</id>\n <name>aeiou</name>\n </Category>\n <name>doggie</name>\n <photoUrls>\n <photoUrls>aeiou</photoUrls>\n </photoUrls>\n <tags>\n <Tag>\n <id>123456789</id>\n <name>aeiou</name>\n </Tag>\n </tags>\n <status>aeiou</status>\n </Pet>" ;
49+
50+ var example = exampleJson != null
51+ ? JsonConvert . DeserializeObject < Pet > ( exampleJson )
52+ : default ;
53+ //TODO: Change the data returned
54+ return new ObjectResult ( example ) ;
55+ }
4056
4157 /// <summary>
4258 /// Deletes a pet
@@ -47,7 +63,14 @@ public abstract class PetApiController : ControllerBase
4763 [ HttpDelete ]
4864 [ Route ( "/v2/pet/{petId}" ) ]
4965 [ ValidateModelState ]
50- public abstract IActionResult DeletePet ( [ FromRoute ( Name = "petId" ) ] [ Required ] long petId , [ FromHeader ( Name = "api_key" ) ] string apiKey ) ;
66+ public virtual IActionResult DeletePet ( [ FromRoute ( Name = "petId" ) ] [ Required ] long petId , [ FromHeader ( Name = "api_key" ) ] string apiKey )
67+ {
68+
69+ //TODO: Uncomment the next line to return response 400 or use other options such as return this.NotFound(), return this.BadRequest(..), ...
70+ // return StatusCode(400);
71+
72+ throw new NotImplementedException ( ) ;
73+ }
5174
5275 /// <summary>
5376 /// Finds Pets by status
@@ -60,7 +83,23 @@ public abstract class PetApiController : ControllerBase
6083 [ Route ( "/v2/pet/findByStatus" ) ]
6184 [ ValidateModelState ]
6285 [ ProducesResponseType ( statusCode : 200 , type : typeof ( List < Pet > ) ) ]
63- public abstract IActionResult FindPetsByStatus ( [ FromQuery ( Name = "status" ) ] [ Required ( ) ] List < string > status ) ;
86+ public virtual IActionResult FindPetsByStatus ( [ FromQuery ( Name = "status" ) ] [ Required ( ) ] List < string > status )
87+ {
88+
89+ //TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ...
90+ // return StatusCode(200, default);
91+ //TODO: Uncomment the next line to return response 400 or use other options such as return this.NotFound(), return this.BadRequest(..), ...
92+ // return StatusCode(400);
93+ string exampleJson = null ;
94+ exampleJson = "[ {\r \n \" photoUrls\" : [ \" photoUrls\" , \" photoUrls\" ],\r \n \" name\" : \" doggie\" ,\r \n \" id\" : 0,\r \n \" category\" : {\r \n \" name\" : \" name\" ,\r \n \" id\" : 6\r \n },\r \n \" tags\" : [ {\r \n \" name\" : \" name\" ,\r \n \" id\" : 1\r \n }, {\r \n \" name\" : \" name\" ,\r \n \" id\" : 1\r \n } ],\r \n \" status\" : \" available\" \r \n }, {\r \n \" photoUrls\" : [ \" photoUrls\" , \" photoUrls\" ],\r \n \" name\" : \" doggie\" ,\r \n \" id\" : 0,\r \n \" category\" : {\r \n \" name\" : \" name\" ,\r \n \" id\" : 6\r \n },\r \n \" tags\" : [ {\r \n \" name\" : \" name\" ,\r \n \" id\" : 1\r \n }, {\r \n \" name\" : \" name\" ,\r \n \" id\" : 1\r \n } ],\r \n \" status\" : \" available\" \r \n } ]" ;
95+ exampleJson = "<Pet>\n <id>123456789</id>\n <Category>\n <id>123456789</id>\n <name>aeiou</name>\n </Category>\n <name>doggie</name>\n <photoUrls>\n <photoUrls>aeiou</photoUrls>\n </photoUrls>\n <tags>\n <Tag>\n <id>123456789</id>\n <name>aeiou</name>\n </Tag>\n </tags>\n <status>aeiou</status>\n </Pet>" ;
96+
97+ var example = exampleJson != null
98+ ? JsonConvert . DeserializeObject < List < Pet > > ( exampleJson )
99+ : default ;
100+ //TODO: Change the data returned
101+ return new ObjectResult ( example ) ;
102+ }
64103
65104 /// <summary>
66105 /// Finds Pets by tags
@@ -74,7 +113,23 @@ public abstract class PetApiController : ControllerBase
74113 [ ValidateModelState ]
75114 [ ProducesResponseType ( statusCode : 200 , type : typeof ( List < Pet > ) ) ]
76115 [ Obsolete ]
77- public abstract IActionResult FindPetsByTags ( [ FromQuery ( Name = "tags" ) ] [ Required ( ) ] List < string > tags ) ;
116+ public virtual IActionResult FindPetsByTags ( [ FromQuery ( Name = "tags" ) ] [ Required ( ) ] List < string > tags )
117+ {
118+
119+ //TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ...
120+ // return StatusCode(200, default);
121+ //TODO: Uncomment the next line to return response 400 or use other options such as return this.NotFound(), return this.BadRequest(..), ...
122+ // return StatusCode(400);
123+ string exampleJson = null ;
124+ exampleJson = "[ {\r \n \" photoUrls\" : [ \" photoUrls\" , \" photoUrls\" ],\r \n \" name\" : \" doggie\" ,\r \n \" id\" : 0,\r \n \" category\" : {\r \n \" name\" : \" name\" ,\r \n \" id\" : 6\r \n },\r \n \" tags\" : [ {\r \n \" name\" : \" name\" ,\r \n \" id\" : 1\r \n }, {\r \n \" name\" : \" name\" ,\r \n \" id\" : 1\r \n } ],\r \n \" status\" : \" available\" \r \n }, {\r \n \" photoUrls\" : [ \" photoUrls\" , \" photoUrls\" ],\r \n \" name\" : \" doggie\" ,\r \n \" id\" : 0,\r \n \" category\" : {\r \n \" name\" : \" name\" ,\r \n \" id\" : 6\r \n },\r \n \" tags\" : [ {\r \n \" name\" : \" name\" ,\r \n \" id\" : 1\r \n }, {\r \n \" name\" : \" name\" ,\r \n \" id\" : 1\r \n } ],\r \n \" status\" : \" available\" \r \n } ]" ;
125+ exampleJson = "<Pet>\n <id>123456789</id>\n <Category>\n <id>123456789</id>\n <name>aeiou</name>\n </Category>\n <name>doggie</name>\n <photoUrls>\n <photoUrls>aeiou</photoUrls>\n </photoUrls>\n <tags>\n <Tag>\n <id>123456789</id>\n <name>aeiou</name>\n </Tag>\n </tags>\n <status>aeiou</status>\n </Pet>" ;
126+
127+ var example = exampleJson != null
128+ ? JsonConvert . DeserializeObject < List < Pet > > ( exampleJson )
129+ : default ;
130+ //TODO: Change the data returned
131+ return new ObjectResult ( example ) ;
132+ }
78133
79134 /// <summary>
80135 /// Find pet by ID
@@ -89,7 +144,25 @@ public abstract class PetApiController : ControllerBase
89144 [ Authorize ( Policy = "api_key" ) ]
90145 [ ValidateModelState ]
91146 [ ProducesResponseType ( statusCode : 200 , type : typeof ( Pet ) ) ]
92- public abstract IActionResult GetPetById ( [ FromRoute ( Name = "petId" ) ] [ Required ] long petId ) ;
147+ public virtual IActionResult GetPetById ( [ FromRoute ( Name = "petId" ) ] [ Required ] long petId )
148+ {
149+
150+ //TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ...
151+ // return StatusCode(200, default);
152+ //TODO: Uncomment the next line to return response 400 or use other options such as return this.NotFound(), return this.BadRequest(..), ...
153+ // return StatusCode(400);
154+ //TODO: Uncomment the next line to return response 404 or use other options such as return this.NotFound(), return this.BadRequest(..), ...
155+ // return StatusCode(404);
156+ string exampleJson = null ;
157+ exampleJson = "{\r \n \" photoUrls\" : [ \" photoUrls\" , \" photoUrls\" ],\r \n \" name\" : \" doggie\" ,\r \n \" id\" : 0,\r \n \" category\" : {\r \n \" name\" : \" name\" ,\r \n \" id\" : 6\r \n },\r \n \" tags\" : [ {\r \n \" name\" : \" name\" ,\r \n \" id\" : 1\r \n }, {\r \n \" name\" : \" name\" ,\r \n \" id\" : 1\r \n } ],\r \n \" status\" : \" available\" \r \n }" ;
158+ exampleJson = "<Pet>\n <id>123456789</id>\n <Category>\n <id>123456789</id>\n <name>aeiou</name>\n </Category>\n <name>doggie</name>\n <photoUrls>\n <photoUrls>aeiou</photoUrls>\n </photoUrls>\n <tags>\n <Tag>\n <id>123456789</id>\n <name>aeiou</name>\n </Tag>\n </tags>\n <status>aeiou</status>\n </Pet>" ;
159+
160+ var example = exampleJson != null
161+ ? JsonConvert . DeserializeObject < Pet > ( exampleJson )
162+ : default ;
163+ //TODO: Change the data returned
164+ return new ObjectResult ( example ) ;
165+ }
93166
94167 /// <summary>
95168 /// Update an existing pet
@@ -104,7 +177,27 @@ public abstract class PetApiController : ControllerBase
104177 [ Consumes ( "application/json" , "application/xml" ) ]
105178 [ ValidateModelState ]
106179 [ ProducesResponseType ( statusCode : 200 , type : typeof ( Pet ) ) ]
107- public abstract IActionResult UpdatePet ( [ FromBody ] Pet pet ) ;
180+ public virtual IActionResult UpdatePet ( [ FromBody ] Pet pet )
181+ {
182+
183+ //TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ...
184+ // return StatusCode(200, default);
185+ //TODO: Uncomment the next line to return response 400 or use other options such as return this.NotFound(), return this.BadRequest(..), ...
186+ // return StatusCode(400);
187+ //TODO: Uncomment the next line to return response 404 or use other options such as return this.NotFound(), return this.BadRequest(..), ...
188+ // return StatusCode(404);
189+ //TODO: Uncomment the next line to return response 405 or use other options such as return this.NotFound(), return this.BadRequest(..), ...
190+ // return StatusCode(405);
191+ string exampleJson = null ;
192+ exampleJson = "{\r \n \" photoUrls\" : [ \" photoUrls\" , \" photoUrls\" ],\r \n \" name\" : \" doggie\" ,\r \n \" id\" : 0,\r \n \" category\" : {\r \n \" name\" : \" name\" ,\r \n \" id\" : 6\r \n },\r \n \" tags\" : [ {\r \n \" name\" : \" name\" ,\r \n \" id\" : 1\r \n }, {\r \n \" name\" : \" name\" ,\r \n \" id\" : 1\r \n } ],\r \n \" status\" : \" available\" \r \n }" ;
193+ exampleJson = "<Pet>\n <id>123456789</id>\n <name>doggie</name>\n <photoUrls>\n <photoUrls>aeiou</photoUrls>\n </photoUrls>\n <tags>\n </tags>\n <status>aeiou</status>\n </Pet>" ;
194+
195+ var example = exampleJson != null
196+ ? JsonConvert . DeserializeObject < Pet > ( exampleJson )
197+ : default ;
198+ //TODO: Change the data returned
199+ return new ObjectResult ( example ) ;
200+ }
108201
109202 /// <summary>
110203 /// Updates a pet in the store with form data
@@ -117,7 +210,14 @@ public abstract class PetApiController : ControllerBase
117210 [ Route ( "/v2/pet/{petId}" ) ]
118211 [ Consumes ( "application/x-www-form-urlencoded" ) ]
119212 [ ValidateModelState ]
120- public abstract IActionResult UpdatePetWithForm ( [ FromRoute ( Name = "petId" ) ] [ Required ] long petId , [ FromForm ( Name = "name" ) ] string name , [ FromForm ( Name = "status" ) ] string status ) ;
213+ public virtual IActionResult UpdatePetWithForm ( [ FromRoute ( Name = "petId" ) ] [ Required ] long petId , [ FromForm ( Name = "name" ) ] string name , [ FromForm ( Name = "status" ) ] string status )
214+ {
215+
216+ //TODO: Uncomment the next line to return response 405 or use other options such as return this.NotFound(), return this.BadRequest(..), ...
217+ // return StatusCode(405);
218+
219+ throw new NotImplementedException ( ) ;
220+ }
121221
122222 /// <summary>
123223 /// uploads an image
@@ -131,6 +231,19 @@ public abstract class PetApiController : ControllerBase
131231 [ Consumes ( "multipart/form-data" ) ]
132232 [ ValidateModelState ]
133233 [ ProducesResponseType ( statusCode : 200 , type : typeof ( ApiResponse ) ) ]
134- public abstract IActionResult UploadFile ( [ FromRoute ( Name = "petId" ) ] [ Required ] long petId , [ FromForm ( Name = "additionalMetadata" ) ] string additionalMetadata , IFormFile file ) ;
234+ public virtual IActionResult UploadFile ( [ FromRoute ( Name = "petId" ) ] [ Required ] long petId , [ FromForm ( Name = "additionalMetadata" ) ] string additionalMetadata , IFormFile file )
235+ {
236+
237+ //TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ...
238+ // return StatusCode(200, default);
239+ string exampleJson = null ;
240+ exampleJson = "{\r \n \" code\" : 0,\r \n \" type\" : \" type\" ,\r \n \" message\" : \" message\" \r \n }" ;
241+
242+ var example = exampleJson != null
243+ ? JsonConvert . DeserializeObject < ApiResponse > ( exampleJson )
244+ : default ;
245+ //TODO: Change the data returned
246+ return new ObjectResult ( example ) ;
247+ }
135248 }
136249}
0 commit comments