-
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[r] to raw strings
- Loading branch information
Showing
5 changed files
with
69 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
src/SampleApps/SampleApp.Api/Controllers/V2/JsonModeTestController.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
using SampleApp.Api.ViewModels; | ||
using Simplify.Web; | ||
using Simplify.Web.Attributes; | ||
|
||
namespace SampleApp.Api.Controllers.V2; | ||
|
||
[Get("api/v2/json-model-test")] | ||
public class JsonModeTestController : Controller2<TestModel> | ||
{ | ||
public ControllerResponse Invoke() => | ||
Content($""" | ||
String param: {Model.StringParam} | ||
Integer param: {Model.IntParam} | ||
bool param: {Model.BoolParam} | ||
String list param: {string.Join(", ", Model.StringListParam!)} | ||
"""); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
namespace SampleApp.Api.ViewModels; | ||
|
||
public class TestModel | ||
{ | ||
public string? StringParam { get; set; } | ||
public int IntParam { get; set; } | ||
public bool BoolParam { get; set; } | ||
public IList<string>? StringListParam { get; set; } | ||
} |