GeezerVison is showing github.com — Change to use List<string> add [Description] attribute · ServiceStackApps/StackApis@05fee1d
File tree
Expand file treeCollapse file tree
Open diff view settings
StackApis.ServiceInterface
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: src/StackApis.ServiceInterface/MyServices.cs +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -12,7 +12,7 @@ public object Get(SearchQuestions request) |
12 | 12 | { |
13 | 13 | var query = Db.From<Question>(); |
14 | 14 |
|
15 | | - if (request.Tags != null && request.Tags.Length > 0) |
| 15 | + if (request.Tags != null && request.Tags.Count > 0) |
16 | 16 | { |
17 | 17 | query.Join<QuestionTag>((q, t) => q.QuestionId == t.QuestionId) |
18 | 18 | .Where<QuestionTag>(x => Sql.In(x.Tag, request.Tags)); |
|
Collapse file
Copy file name to clipboardExpand all lines: src/StackApis.ServiceModel/Answers.cs +2Lines changed: 2 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
|
1 | 1 | using System.Collections.Generic; |
2 | 2 | using ServiceStack; |
| 3 | +using ServiceStack.DataAnnotations; |
3 | 4 | using StackApis.ServiceModel.Types; |
4 | 5 |
|
5 | 6 | namespace StackApis.ServiceModel |
6 | 7 | { |
| 8 | + [Description("Get a list of Answers for a Question")] |
7 | 9 | [Route("/getanswer/{QuestionId}")] |
8 | 10 | public class GetAnswers : IReturn<GetAnswersResponse> |
9 | 11 | { |
|
Collapse file
Copy file name to clipboardExpand all lines: src/StackApis.ServiceModel/Questions.cs +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -7,7 +7,7 @@ namespace StackApis.ServiceModel |
7 | 7 | [Route("/questions/search")] |
8 | 8 | public class SearchQuestions : IReturn<SearchQuestionsResponse> |
9 | 9 | { |
10 | | - public string[] Tags { get; set; } |
| 10 | + public List<string> Tags { get; set; } |
11 | 11 | public string UserId { get; set; } |
12 | 12 | } |
13 | 13 |
|
|
Collapse file
Copy file name to clipboardExpand all lines: src/StackApis.Tests/UnitTests.cs +1Lines changed: 1 addition & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
|
13 | 13 | using ServiceStack.Text; |
14 | 14 | using ServiceStack.Web; |
15 | 15 | using StackApis.ServiceInterface; |
| 16 | +using StackApis.ServiceModel; |
16 | 17 | using StackApis.ServiceModel.Types; |
17 | 18 |
|
18 | 19 | namespace StackApis.Tests |
|