@@ -40,7 +40,23 @@ public abstract class PetApiController : ControllerBase
4040 [ ValidateModelState ]
4141 [ SwaggerOperation ( "AddPet" ) ]
4242 [ SwaggerResponse ( statusCode : 200 , type : typeof ( Pet ) , description : "successful operation" ) ]
43- public abstract IActionResult AddPet ( [ FromBody ] Pet pet ) ;
43+ public virtual IActionResult AddPet ( [ FromBody ] Pet pet )
44+ {
45+
46+ //TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ...
47+ // return StatusCode(200, default);
48+ //TODO: Uncomment the next line to return response 405 or use other options such as return this.NotFound(), return this.BadRequest(..), ...
49+ // return StatusCode(405);
50+ string exampleJson = null ;
51+ 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 }" ;
52+ 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>" ;
53+
54+ var example = exampleJson != null
55+ ? JsonConvert . DeserializeObject < Pet > ( exampleJson )
56+ : default ;
57+ //TODO: Change the data returned
58+ return new ObjectResult ( example ) ;
59+ }
4460
4561 /// <summary>
4662 /// Deletes a pet
@@ -52,7 +68,14 @@ public abstract class PetApiController : ControllerBase
5268 [ Route ( "/v2/pet/{petId}" ) ]
5369 [ ValidateModelState ]
5470 [ SwaggerOperation ( "DeletePet" ) ]
55- public abstract IActionResult DeletePet ( [ FromRoute ( Name = "petId" ) ] [ Required ] long petId , [ FromHeader ( Name = "api_key" ) ] string apiKey ) ;
71+ public virtual IActionResult DeletePet ( [ FromRoute ( Name = "petId" ) ] [ Required ] long petId , [ FromHeader ( Name = "api_key" ) ] string apiKey )
72+ {
73+
74+ //TODO: Uncomment the next line to return response 400 or use other options such as return this.NotFound(), return this.BadRequest(..), ...
75+ // return StatusCode(400);
76+
77+ throw new NotImplementedException ( ) ;
78+ }
5679
5780 /// <summary>
5881 /// Finds Pets by status
@@ -66,7 +89,23 @@ public abstract class PetApiController : ControllerBase
6689 [ ValidateModelState ]
6790 [ SwaggerOperation ( "FindPetsByStatus" ) ]
6891 [ SwaggerResponse ( statusCode : 200 , type : typeof ( List < Pet > ) , description : "successful operation" ) ]
69- public abstract IActionResult FindPetsByStatus ( [ FromQuery ( Name = "status" ) ] [ Required ( ) ] List < string > status ) ;
92+ public virtual IActionResult FindPetsByStatus ( [ FromQuery ( Name = "status" ) ] [ Required ( ) ] List < string > status )
93+ {
94+
95+ //TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ...
96+ // return StatusCode(200, default);
97+ //TODO: Uncomment the next line to return response 400 or use other options such as return this.NotFound(), return this.BadRequest(..), ...
98+ // return StatusCode(400);
99+ string exampleJson = null ;
100+ 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 } ]" ;
101+ 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>" ;
102+
103+ var example = exampleJson != null
104+ ? JsonConvert . DeserializeObject < List < Pet > > ( exampleJson )
105+ : default ;
106+ //TODO: Change the data returned
107+ return new ObjectResult ( example ) ;
108+ }
70109
71110 /// <summary>
72111 /// Finds Pets by tags
@@ -81,7 +120,23 @@ public abstract class PetApiController : ControllerBase
81120 [ SwaggerOperation ( "FindPetsByTags" ) ]
82121 [ SwaggerResponse ( statusCode : 200 , type : typeof ( List < Pet > ) , description : "successful operation" ) ]
83122 [ Obsolete ]
84- public abstract IActionResult FindPetsByTags ( [ FromQuery ( Name = "tags" ) ] [ Required ( ) ] List < string > tags ) ;
123+ public virtual IActionResult FindPetsByTags ( [ FromQuery ( Name = "tags" ) ] [ Required ( ) ] List < string > tags )
124+ {
125+
126+ //TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ...
127+ // return StatusCode(200, default);
128+ //TODO: Uncomment the next line to return response 400 or use other options such as return this.NotFound(), return this.BadRequest(..), ...
129+ // return StatusCode(400);
130+ string exampleJson = null ;
131+ 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 } ]" ;
132+ 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>" ;
133+
134+ var example = exampleJson != null
135+ ? JsonConvert . DeserializeObject < List < Pet > > ( exampleJson )
136+ : default ;
137+ //TODO: Change the data returned
138+ return new ObjectResult ( example ) ;
139+ }
85140
86141 /// <summary>
87142 /// Find pet by ID
@@ -97,7 +152,25 @@ public abstract class PetApiController : ControllerBase
97152 [ ValidateModelState ]
98153 [ SwaggerOperation ( "GetPetById" ) ]
99154 [ SwaggerResponse ( statusCode : 200 , type : typeof ( Pet ) , description : "successful operation" ) ]
100- public abstract IActionResult GetPetById ( [ FromRoute ( Name = "petId" ) ] [ Required ] long petId ) ;
155+ public virtual IActionResult GetPetById ( [ FromRoute ( Name = "petId" ) ] [ Required ] long petId )
156+ {
157+
158+ //TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ...
159+ // return StatusCode(200, default);
160+ //TODO: Uncomment the next line to return response 400 or use other options such as return this.NotFound(), return this.BadRequest(..), ...
161+ // return StatusCode(400);
162+ //TODO: Uncomment the next line to return response 404 or use other options such as return this.NotFound(), return this.BadRequest(..), ...
163+ // return StatusCode(404);
164+ string exampleJson = null ;
165+ 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 }" ;
166+ 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>" ;
167+
168+ var example = exampleJson != null
169+ ? JsonConvert . DeserializeObject < Pet > ( exampleJson )
170+ : default ;
171+ //TODO: Change the data returned
172+ return new ObjectResult ( example ) ;
173+ }
101174
102175 /// <summary>
103176 /// Update an existing pet
@@ -113,7 +186,27 @@ public abstract class PetApiController : ControllerBase
113186 [ ValidateModelState ]
114187 [ SwaggerOperation ( "UpdatePet" ) ]
115188 [ SwaggerResponse ( statusCode : 200 , type : typeof ( Pet ) , description : "successful operation" ) ]
116- public abstract IActionResult UpdatePet ( [ FromBody ] Pet pet ) ;
189+ public virtual IActionResult UpdatePet ( [ FromBody ] Pet pet )
190+ {
191+
192+ //TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ...
193+ // return StatusCode(200, default);
194+ //TODO: Uncomment the next line to return response 400 or use other options such as return this.NotFound(), return this.BadRequest(..), ...
195+ // return StatusCode(400);
196+ //TODO: Uncomment the next line to return response 404 or use other options such as return this.NotFound(), return this.BadRequest(..), ...
197+ // return StatusCode(404);
198+ //TODO: Uncomment the next line to return response 405 or use other options such as return this.NotFound(), return this.BadRequest(..), ...
199+ // return StatusCode(405);
200+ string exampleJson = null ;
201+ 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 }" ;
202+ 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>" ;
203+
204+ var example = exampleJson != null
205+ ? JsonConvert . DeserializeObject < Pet > ( exampleJson )
206+ : default ;
207+ //TODO: Change the data returned
208+ return new ObjectResult ( example ) ;
209+ }
117210
118211 /// <summary>
119212 /// Updates a pet in the store with form data
@@ -127,7 +220,14 @@ public abstract class PetApiController : ControllerBase
127220 [ Consumes ( "application/x-www-form-urlencoded" ) ]
128221 [ ValidateModelState ]
129222 [ SwaggerOperation ( "UpdatePetWithForm" ) ]
130- public abstract IActionResult UpdatePetWithForm ( [ FromRoute ( Name = "petId" ) ] [ Required ] long petId , [ FromForm ( Name = "name" ) ] string name , [ FromForm ( Name = "status" ) ] string status ) ;
223+ public virtual IActionResult UpdatePetWithForm ( [ FromRoute ( Name = "petId" ) ] [ Required ] long petId , [ FromForm ( Name = "name" ) ] string name , [ FromForm ( Name = "status" ) ] string status )
224+ {
225+
226+ //TODO: Uncomment the next line to return response 405 or use other options such as return this.NotFound(), return this.BadRequest(..), ...
227+ // return StatusCode(405);
228+
229+ throw new NotImplementedException ( ) ;
230+ }
131231
132232 /// <summary>
133233 /// uploads an image
@@ -142,6 +242,19 @@ public abstract class PetApiController : ControllerBase
142242 [ ValidateModelState ]
143243 [ SwaggerOperation ( "UploadFile" ) ]
144244 [ SwaggerResponse ( statusCode : 200 , type : typeof ( ApiResponse ) , description : "successful operation" ) ]
145- public abstract IActionResult UploadFile ( [ FromRoute ( Name = "petId" ) ] [ Required ] long petId , [ FromForm ( Name = "additionalMetadata" ) ] string additionalMetadata , IFormFile file ) ;
245+ public virtual IActionResult UploadFile ( [ FromRoute ( Name = "petId" ) ] [ Required ] long petId , [ FromForm ( Name = "additionalMetadata" ) ] string additionalMetadata , IFormFile file )
246+ {
247+
248+ //TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ...
249+ // return StatusCode(200, default);
250+ string exampleJson = null ;
251+ exampleJson = "{\r \n \" code\" : 0,\r \n \" type\" : \" type\" ,\r \n \" message\" : \" message\" \r \n }" ;
252+
253+ var example = exampleJson != null
254+ ? JsonConvert . DeserializeObject < ApiResponse > ( exampleJson )
255+ : default ;
256+ //TODO: Change the data returned
257+ return new ObjectResult ( example ) ;
258+ }
146259 }
147260}
0 commit comments