Skip to content

Commit a22c0e8

Browse files
Enable conversion of existing Swift reviews and disable conversion of… (#9695)
* Enable conversion of existing Swift reviews and disable conversion of TypeSpec
1 parent 6ecd9b2 commit a22c0e8

2 files changed

Lines changed: 15 additions & 4 deletions

File tree

src/dotnet/APIView/APIViewWeb/Languages/SwiftLanguageService.cs

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (c) Microsoft Corporation. All rights reserved.
1+
// Copyright (c) Microsoft Corporation. All rights reserved.
22
// Licensed under the MIT License.
33

44
using Microsoft.Extensions.Configuration;
@@ -8,6 +8,7 @@ namespace APIViewWeb
88
public class SwiftLanguageService : JsonLanguageService
99
{
1010
public override string Name { get; } = "Swift";
11+
public string VersionString { get; } = "0.3.0";
1112

1213
//Swift doesn't have any parser for now
1314
//It will upload a json file with name Swift so Swift reviews are listed under that filter type
@@ -19,8 +20,18 @@ public SwiftLanguageService(IConfiguration configuration)
1920
public override bool IsSupportedFile(string name)
2021
{
2122
// Skip initial processing so this service won't be selected for LLC when json is uploaded
22-
// This is only a temporary solution for POC and will be remvoed once autorest yaml is uploaded instead of json for LLC
23+
// This is only a temporary solution for POC and will be removed once autorest yaml is uploaded instead of json for LLC
2324
return false;
2425
}
26+
27+
public override bool CanUpdate(string versionString)
28+
{
29+
return false;
30+
}
31+
32+
public override bool CanConvert(string versionString)
33+
{
34+
return versionString != VersionString;
35+
}
2536
}
26-
}
37+
}

src/dotnet/APIView/APIViewWeb/Languages/TypeSpecLanguageService.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public override bool CanUpdate(string versionString)
4646

4747
public override bool CanConvert(string versionString)
4848
{
49-
return versionString != VersionString;
49+
return false;
5050
}
5151

5252
public override bool GeneratePipelineRunParams(APIRevisionGenerationPipelineParamModel param)

0 commit comments

Comments
 (0)