forked from ServiceStack/ServiceStack
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMetadataTest.cs
More file actions
86 lines (71 loc) · 2.03 KB
/
MetadataTest.cs
File metadata and controls
86 lines (71 loc) · 2.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
using System.Collections.Generic;
using System.Runtime.Serialization;
using Check.ServiceModel.Types;
using ServiceStack;
namespace Check.ServiceModel
{
public class MetadataTest : IReturn<MetadataTestResponse>
{
public int Id { get; set; }
}
public class MetadataTestResponse
{
public int Id { get; set; }
public List<MetadataTestChild> Results { get; set; }
}
public class MetadataTestChild
{
public string Name { get; set; }
public List<MetadataTestNestedChild> Results { get; set; }
}
public class MetadataTestNestedChild
{
public string Name { get; set; }
}
[Route("/example", "GET", Summary = @"")]
[DataContract]
public class GetExample : IReturn<GetExampleResponse>
{
}
[DataContract]
public class GetExampleResponse : IHasResponseStatus
{
[DataMember(Order = 1, IsRequired = false)]
public ResponseStatus ResponseStatus { get; set; }
[ApiMember]
[DataMember(Order = 2, IsRequired = false)]
public MenuExample MenuExample1 { get; set; }
}
[DataContract]
public class MenuExample
{
[ApiMember]
[DataMember(Order = 1, IsRequired = false)]
public MenuItemExample MenuItemExample1 { get; set; }
}
//[DataContract]
public class MenuItemExample
{
[ApiMember]
[DataMember(Order = 1, IsRequired = false)]
public string Name1 { get; set; }
public MenuItemExampleItem MenuItemExampleItem { get; set; }
}
public class MenuItemExampleItem
{
[ApiMember]
[DataMember(Order = 1, IsRequired = false)]
public string Name1 { get; set; }
}
[ServiceStack.DataAnnotations.ExcludeMetadata]
public class ExcludeMetadataType
{
public int Id { get; set; }
}
public class ExcludeMetadataProperty
{
public int Id { get; set; }
[ServiceStack.DataAnnotations.ExcludeMetadata]
public int ExcludedProperty { get; set; }
}
}