Permalink
Browse files

Rename Api to ApiAttribute

  • Loading branch information...
1 parent 1dc5998 commit 90fa2466ef242e61a6efd1699bf3285238319a96 @mythz mythz committed Mar 18, 2013
@@ -3,15 +3,15 @@
namespace ServiceStack.ServiceHost
{
[AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = true)]
- public class Api : Attribute
+ public class ApiAttribute : Attribute
{
/// <summary>
/// The overall description of an API. Used by Swagger.
/// </summary>
public string Description { get; set; }
- public Api() {}
- public Api(string description)
+ public ApiAttribute() {}
+ public ApiAttribute(string description)
{
Description = description;
}
@@ -471,7 +471,7 @@
<Compile Include="SearchIndex\FullTextIndexFieldAttribute.cs">
<SubType>Code</SubType>
</Compile>
- <Compile Include="ServiceHost\Api.cs" />
+ <Compile Include="ServiceHost\ApiAttribute.cs" />
<Compile Include="ServiceHost\ApiMemberAttribute.cs" />
<Compile Include="ServiceHost\IRestOptionsService.cs" />
<Compile Include="ServiceHost\IService.cs" />
@@ -399,7 +399,7 @@ public static OperationDto ToOperationDto(this Operation operation)
public static string GetDescription(this Type operationType)
{
- var apiAttr = operationType.GetCustomAttributes(typeof(Api), true).OfType<Api>().FirstOrDefault();
+ var apiAttr = operationType.GetCustomAttributes(typeof(ApiAttribute), true).OfType<ApiAttribute>().FirstOrDefault();
return apiAttr != null ? apiAttr.Description : "";
}

0 comments on commit 90fa246

Please sign in to comment.