File tree Expand file tree Collapse file tree 3 files changed +96
-32
lines changed
test/Microsoft.AspNetCore.OpenApi.Tests/Integration/snapshots Expand file tree Collapse file tree 3 files changed +96
-32
lines changed Original file line number Diff line number Diff line change 88[ ApiExplorerSettings ( GroupName = "xml" ) ]
99public class XmlController : ControllerBase
1010{
11- /// <param name="name">The name of the person.</param>
12- /// <response code="200">Returns the greeting.</response>
13- [ HttpGet ]
14- public string Get1 ( string name )
15- {
16- return $ "Hello, { name } !";
17- }
18-
1911 /// <summary>
2012 /// A summary of the action.
2113 /// </summary>
@@ -28,6 +20,14 @@ public string Get()
2820 return "Hello, World!" ;
2921 }
3022
23+ /// <param name="name">The name of the person.</param>
24+ /// <response code="200">Returns the greeting.</response>
25+ [ HttpGet ( "{name}" ) ]
26+ public string Get1 ( string name )
27+ {
28+ return $ "Hello, { name } !";
29+ }
30+
3131 /// <param name="todo">The todo to insert into the database.</param>
3232 [ HttpPost ]
3333 public string Post ( Todo todo )
Original file line number Diff line number Diff line change 149149 "tags": [
150150 "Xml"
151151 ],
152- "parameters": [
153- {
154- "name": "name",
155- "in": "query",
156- "description": "The name of the person.",
157- "schema": {
158- "type": "string"
159- }
160- }
161- ],
152+ "summary": "A summary of the action.",
153+ "description": "A description of the action.",
162154 "responses": {
163155 "200": {
164- "description": "Returns the greeting. ",
156+ "description": "OK ",
165157 "content": {
166158 "text/plain": {
167159 "schema": {
230222 }
231223 }
232224 }
225+ },
226+ "/Xml/{name}": {
227+ "get": {
228+ "tags": [
229+ "Xml"
230+ ],
231+ "parameters": [
232+ {
233+ "name": "name",
234+ "in": "path",
235+ "description": "The name of the person.",
236+ "required": true,
237+ "schema": {
238+ "type": "string"
239+ }
240+ }
241+ ],
242+ "responses": {
243+ "200": {
244+ "description": "Returns the greeting.",
245+ "content": {
246+ "text/plain": {
247+ "schema": {
248+ "type": "string"
249+ }
250+ },
251+ "application/json": {
252+ "schema": {
253+ "type": "string"
254+ }
255+ },
256+ "text/json": {
257+ "schema": {
258+ "type": "string"
259+ }
260+ }
261+ }
262+ }
263+ }
264+ }
233265 }
234266 },
235267 "components": {
394426 "name": "Xml"
395427 }
396428 ]
397- }
429+ }
Original file line number Diff line number Diff line change 149149 "tags": [
150150 "Xml"
151151 ],
152- "parameters": [
153- {
154- "name": "name",
155- "in": "query",
156- "description": "The name of the person.",
157- "schema": {
158- "type": "string"
159- }
160- }
161- ],
152+ "summary": "A summary of the action.",
153+ "description": "A description of the action.",
162154 "responses": {
163155 "200": {
164- "description": "Returns the greeting. ",
156+ "description": "OK ",
165157 "content": {
166158 "text/plain": {
167159 "schema": {
230222 }
231223 }
232224 }
225+ },
226+ "/Xml/{name}": {
227+ "get": {
228+ "tags": [
229+ "Xml"
230+ ],
231+ "parameters": [
232+ {
233+ "name": "name",
234+ "in": "path",
235+ "description": "The name of the person.",
236+ "required": true,
237+ "schema": {
238+ "type": "string"
239+ }
240+ }
241+ ],
242+ "responses": {
243+ "200": {
244+ "description": "Returns the greeting.",
245+ "content": {
246+ "text/plain": {
247+ "schema": {
248+ "type": "string"
249+ }
250+ },
251+ "application/json": {
252+ "schema": {
253+ "type": "string"
254+ }
255+ },
256+ "text/json": {
257+ "schema": {
258+ "type": "string"
259+ }
260+ }
261+ }
262+ }
263+ }
264+ }
233265 }
234266 },
235267 "components": {
394426 "name": "Xml"
395427 }
396428 ]
397- }
429+ }
You can’t perform that action at this time.
0 commit comments