Skip to content

Commit 05fee1d

Browse files
committed
Change to use List<string> add [Description] attribute
1 parent dcdbe58 commit 05fee1d

File tree

4 files changed

+5
-2
lines changed

4 files changed

+5
-2
lines changed

src/StackApis.ServiceInterface/MyServices.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ public object Get(SearchQuestions request)
1212
{
1313
var query = Db.From<Question>();
1414

15-
if (request.Tags != null && request.Tags.Length > 0)
15+
if (request.Tags != null && request.Tags.Count > 0)
1616
{
1717
query.Join<QuestionTag>((q, t) => q.QuestionId == t.QuestionId)
1818
.Where<QuestionTag>(x => Sql.In(x.Tag, request.Tags));

src/StackApis.ServiceModel/Answers.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
using System.Collections.Generic;
22
using ServiceStack;
3+
using ServiceStack.DataAnnotations;
34
using StackApis.ServiceModel.Types;
45

56
namespace StackApis.ServiceModel
67
{
8+
[Description("Get a list of Answers for a Question")]
79
[Route("/getanswer/{QuestionId}")]
810
public class GetAnswers : IReturn<GetAnswersResponse>
911
{

src/StackApis.ServiceModel/Questions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ namespace StackApis.ServiceModel
77
[Route("/questions/search")]
88
public class SearchQuestions : IReturn<SearchQuestionsResponse>
99
{
10-
public string[] Tags { get; set; }
10+
public List<string> Tags { get; set; }
1111
public string UserId { get; set; }
1212
}
1313

src/StackApis.Tests/UnitTests.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
using ServiceStack.Text;
1414
using ServiceStack.Web;
1515
using StackApis.ServiceInterface;
16+
using StackApis.ServiceModel;
1617
using StackApis.ServiceModel.Types;
1718

1819
namespace StackApis.Tests

0 commit comments

Comments
 (0)