diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8c2e896..b465840 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -29,6 +29,11 @@ jobs: - name: Install openapi-diff run: npm install -g openapi-diff + - name: NPM install + run: | + cd typespec + npm install + - name: Build .NET project and run tests run: | dotnet build @@ -36,11 +41,11 @@ jobs: - name: Generate TypeSpec OpenAPI spec run: | - tsp compile typespec/main.ts + tsp compile typespec/main.tsp - name: Move generated OpenAPI spec to standard location run: | - mv "tsp-output/@typespec/openapi3/openapi.*.yaml" openapi.yml + cp tsp-output/"@typespec"/openapi3/openapi.* openapi.yml - name: Fetch .NET OpenAPI spec run: | diff --git a/Test/OpenApiTest.cs b/Test/OpenApiTest.cs index 0d7d395..f2ca320 100644 --- a/Test/OpenApiTest.cs +++ b/Test/OpenApiTest.cs @@ -13,7 +13,7 @@ public async Task GenerateOpenApiFile() var dotnetOpenApiSpec = await response.Content.ReadAsStringAsync(); - var solutionDirectory = Path.GetFullPath(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "..\\..\\..\\..")); + var solutionDirectory = Path.GetFullPath(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "../../../..")); var openApiFilePath = Path.Combine(solutionDirectory, "dotnet_openapi.json"); // Save the OpenAPI spec to a file for comparison