Skip to content

Commit 08b5dcc

Browse files
committed
Moved openApiInfo to docs folder
1 parent ae6dbf9 commit 08b5dcc

File tree

5 files changed

+10
-9
lines changed

5 files changed

+10
-9
lines changed

tools/OpenApiInfoGenerator/OpenApiInfoGenerator/FileHandler.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ namespace openapiinfo;
22

33
public static class FileHandler
44
{
5-
private const string OpenApiFolderName = "OpenApiDocs";
5+
private const string OpenApiFolderName = "docs";
66
private static string? AssemblyLocation = Path.GetDirectoryName(typeof(FileHandler).Assembly.Location);
77

8-
public static string? GetOpenApiFolder()
8+
public static string? GetDocsFolder()
99
{
1010
if (AssemblyLocation is null)
1111
{

tools/OpenApiInfoGenerator/OpenApiInfoGenerator/OpenApiChanges.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# Copyright (c) Microsoft Corporation. All rights reserved.
22
# Licensed under the MIT License.
33
Param(
4-
[string] $v1_OpenAPIErrorFilePath = (Join-Path $PSScriptRoot "..\..\..\openApiDocs\v1.0\OpenApiInfo\"),
5-
[string] $beta_OpenAPIErrorFilePath = (Join-Path $PSScriptRoot "..\..\..\openApiDocs\beta\OpenApiInfo\"),
4+
[string] $v1_OpenAPIErrorFilePath = (Join-Path $PSScriptRoot "..\..\..\docs\OpenApiInfo\v1.0\"),
5+
[string] $beta_OpenAPIErrorFilePath = (Join-Path $PSScriptRoot "..\..\..\docs\OpenApiInfo\beta\"),
66
[string] $OpenAPIErrorFileName = "openAPIErrors"
77
)
88

tools/OpenApiInfoGenerator/OpenApiInfoGenerator/Program.cs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ internal class Program
66
{
77
public static string openApiInfoFile = "openApiInfo.json";
88
public static string openApiFileError = "openAPIErrors.csv";
9-
private const string openApiInfoMetadataUrl_v1 = "https://raw.githubusercontent.com/microsoftgraph/msgraph-sdk-powershell/metadata-changes-detection/openApiDocs/v1.0/OpenApiInfo/openApiInfo.json";
10-
private const string openApiInfoMetadataUrl_beta = "https://raw.githubusercontent.com/microsoftgraph/msgraph-sdk-powershell/metadata-changes-detection/openApiDocs/beta/OpenApiInfo/openApiInfo.json";
9+
private const string openApiInfoMetadataUrl_v1 = "https://raw.githubusercontent.com/microsoftgraph/msgraph-sdk-powershell/metadata-changes-detection/docs/OpenApiInfo/v1.0/openApiInfo.json";
10+
private const string openApiInfoMetadataUrl_beta = "https://raw.githubusercontent.com/microsoftgraph/msgraph-sdk-powershell/metadata-changes-detection/docs/OpenApiInfo/beta/openApiInfo.json";
1111
private static IList<Model> openApiInfo_v1 = new OriginalMetadata(openApiInfoMetadataUrl_v1).GetOpenApiInfo();
1212
private static IList<Model> openApiInfo_beta = new OriginalMetadata(openApiInfoMetadataUrl_beta).GetOpenApiInfo();
1313
private static IDictionary<string, IList<Model>> openApiVersions = new Dictionary<string, IList<Model>>();
@@ -30,9 +30,10 @@ private static void CompareOpenApiInfo(string version, IList<Model> openApiInfoM
3030
var openApiErrors = new HashSet<string>();
3131
newPathsAdded.Add("Module,Path,Method");
3232
openApiErrors.Add("Module,ApiPath,Method,From,To");
33-
var filePath = FileHandler.GetOpenApiFolder();
34-
var combinedPath = filePath != null ? Path.Combine(filePath, version) : null;
35-
var openAPiInfoPath = combinedPath != null ? Path.Combine(combinedPath, "OpenAPiInfo") : null;
33+
var filePath = FileHandler.GetDocsFolder();
34+
Console.WriteLine(filePath);
35+
var combinedPath = filePath != null ? Path.Combine(filePath, "openApiInfo") : null;
36+
var openAPiInfoPath = combinedPath != null ? Path.Combine(combinedPath, version) : null;
3637
var combinedErrorPath = openAPiInfoPath != null ? Path.Combine(openAPiInfoPath, openApiFileError) : null;
3738
if (combinedErrorPath != null && File.Exists(combinedErrorPath))
3839
{

0 commit comments

Comments
 (0)