Skip to content

Commit 94e40fd

Browse files
committed
Also add the 404 metadata to the other file
1 parent ffee0b2 commit 94e40fd

File tree

1 file changed

+3
-1
lines changed
  • src/ProjectTemplates/Web.ProjectTemplates/content/WebApiAot-CSharp

1 file changed

+3
-1
lines changed

src/ProjectTemplates/Web.ProjectTemplates/content/WebApiAot-CSharp/Program.Main.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,9 @@ public static void Main(string[] args)
3636
? Results.Ok(todo)
3737
: Results.NotFound())
3838
#if (EnableOpenAPI)
39-
.WithName("GetTodoById");
39+
.WithName("GetTodoById")
40+
.Produces<Todo>(StatusCodes.Status200OK)
41+
.Produces(StatusCodes.Status404NotFound);
4042
#elif
4143
;
4244
#endif

0 commit comments

Comments
 (0)