Skip to content

Commit

Permalink
Swift filter button and create review help text for swift reviews (Az…
Browse files Browse the repository at this point in the history
…ure#1863)

* Swift filter button and create review help text for swift reviews
  • Loading branch information
praveenkuttappan authored Aug 2, 2021
1 parent 8354895 commit 54a503d
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 0 deletions.
19 changes: 19 additions & 0 deletions src/dotnet/APIView/APIViewWeb/Languages/SwiftLanguageService.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

using Microsoft.Extensions.Configuration;

namespace APIViewWeb
{
public class SwiftLanguageService : JsonLanguageService
{
public override string Name { get; } = "Swift";

//Swift doesn't have any parser for now
//It will upload a json file with name Swift so Swift reviews are listed under that filter type
public SwiftLanguageService(IConfiguration configuration)
{

}
}
}
15 changes: 15 additions & 0 deletions src/dotnet/APIView/APIViewWeb/Pages/Assemblies/Index.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
<a class="btn btn-secondary" active-if='@Model.Language == "JavaScript"' asp-all-route-data=@Model.GetRoutingData(language: "JavaScript")>JS/TS</a>
<a class="btn btn-secondary" active-if='@Model.Language == "Python"' asp-all-route-data=@Model.GetRoutingData(language: "Python")>Python</a>
<a class="btn btn-secondary" active-if='@Model.Language == "Protocol"' asp-all-route-data=@Model.GetRoutingData(language: "Protocol")>Protocol</a>
<a class="btn btn-secondary" active-if='@Model.Language == "Swift"' asp-all-route-data=@Model.GetRoutingData(language: "Swift")>Swift</a>
</div>

<div class="btn-group float-right">
Expand Down Expand Up @@ -98,6 +99,9 @@
<li class="nav-item">
<a class="nav-link" id="profile-tab" data-toggle="tab" href="#protocol-help">Protocol</a>
</li>
<li class="nav-item">
<a class="nav-link" id="profile-tab" data-toggle="tab" href="#swift-help">Swift</a>
</li>
</ul>

<!-- Tab panes -->
Expand Down Expand Up @@ -188,6 +192,17 @@
</li>
</ol>
</div>
<div class="tab-pane" id="swift-help">
<ol>
<li>
Generate JSON file for the source by running Swift APIView parser in XCode.
More information is available here on <a href="https://github.com/Azure/azure-sdk-tools/blob/main/src/swift/README.md">Swift API parser</a>
</li>
<li>
Upload generated JSON
</li>
</ol>
</div>
</div>
</div>
</div>
Expand Down
1 change: 1 addition & 0 deletions src/dotnet/APIView/APIViewWeb/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ public void ConfigureServices(IServiceCollection services)
services.AddSingleton<LanguageService, CppLanguageService>();
services.AddSingleton<LanguageService, GoLanguageService>();
services.AddSingleton<LanguageService, ProtocolLanguageService>();
services.AddSingleton<LanguageService, SwiftLanguageService>();

services.AddAuthentication(options =>
{
Expand Down

0 comments on commit 54a503d

Please sign in to comment.