Repository: microsoft/kiota (csharp)

Issue:
[Workspace] The description file should be named .kiota\documents\{client-name}\openapi.yaml
### What are you generating using Kiota, clients or plugins?

API Client/SDK

### In what context or format are you using Kiota?

Source Build

### Client library/SDK language

None

### Describe the bug

While the spec says to use `description.yaml`, it would be more familiar to developers to have `openapi.yaml` as the name of the cached description

### Expected behavior

The name should be `openapi.yaml`

### How to reproduce

Generate a client or a plugin!

### Open API description file

_No response_

### Kiota Version

1.14

### Latest Kiota version known to work for scenario above?(Not required)

_No response_

### Known Workarounds

_No response_

### Configuration

_No response_

### Debug output

_No response_

### Other information

_No response_

Pull request description:
Fixes https://github.com/microsoft/kiota/issues/4641

Also updates the spec to capture these scenarios.

Patch:
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 1f6d7bfe89..98de651760 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -21,6 +21,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
 - Fixed `InvalidOperationException` thrown when serializing IBacked models with no changes present in the additional data in dotnet [microsoftgraph/msgraph-sdk-dotnet#2471](https://github.com/microsoftgraph/msgraph-sdk-dotnet/issues/2471).
 - Fixed `RequestConfiguration` Classes dropped in RequestBuilder methods in python [#4535](https://github.com/microsoft/kiota/issues/4535)
 - Fixed incorrect optional types in method parameters in Python [#4507](https://github.com/microsoft/kiota/issues/4507)
+- Changes the cached description file name to `openapi.yml|json` from `description.yml|json` [#4641](https://github.com/microsoft/kiota/issues/4641)
 
 ## [1.14.0] - 2024-05-02
 
diff --git a/specs/cli/client-add.md b/specs/cli/client-add.md
index f2962a1a59..7bd2a84dd1 100644
--- a/specs/cli/client-add.md
+++ b/specs/cli/client-add.md
@@ -6,7 +6,7 @@
 
 When executing, a new API entry will be added and will use the `--client-name` parameter as the key for the map. When loading the OpenAPI description, it will store the location of the description in the `descriptionLocation` property. If `--include-path` or `--exclude-path` are provided, they will be stored in the `includePatterns` and `excludePatterns` properties respectively.
 
-Every time an API client is added, a copy of the OpenAPI description file will be stored in the `./.kiota/documents/{client-name}/{client-name}.yaml|json` folder. The files will be named using the API client name. This will allow the CLI to detect changes in the description and avoid downloading the description again if it hasn't changed. 
+Every time an API client is added, a copy of the OpenAPI description file will be stored in the `./.kiota/documents/{client-name}/openapi.yaml|json` folder. The files will be named using the API client name. This will allow the CLI to detect changes in the description and avoid downloading the description again if it hasn't changed. 
 
 At the same time, an [API Manifest](https://www.ietf.org/archive/id/draft-miller-api-manifest-01.html) file will be generated (if non existing) or edited (if already existing) in the `.kiota` folder next to `workspace.json`. API Manifest represents a snapshot of API dependencies and permissions required to access those APIs. This file will represent a concatenated surface of all APIs used across plugins and clients. Both files, `apimanifest.json` and `workspace.json` will be used to generate the code files. A new hash composed of the Kiota version, the OpenAPI description location and the properties of the client will be generated and would trigger an update to the [API Manifest][https://www.ietf.org/archive/id/draft-miller-api-manifest-01.html].
 
diff --git a/specs/cli/client-edit.md b/specs/cli/client-edit.md
index 921e75d78a..63ae827779 100644
--- a/specs/cli/client-edit.md
+++ b/specs/cli/client-edit.md
@@ -105,7 +105,7 @@ _The resulting `apimanifest.json` file will look like this:_
     └─workspace.json 
     └─documents
        └─GraphClient
-         └─GraphClient.yaml
+         └─openapi.yaml
  └─generated
     └─graph
        └─csharp
diff --git a/specs/cli/plugin-add.md b/specs/cli/plugin-add.md
index 4c741c08d6..7059d3658b 100644
--- a/specs/cli/plugin-add.md
+++ b/specs/cli/plugin-add.md
@@ -172,7 +172,7 @@ _The resulting API Manifest named `apimanifest.json` in the `./kiota` folder (co
     └─apimanifest.json # Single artifact with all APIs dependencies info across clients and plugins
     └─documents
       └─github    
-        └─GitHub.json # OpenAPI document
+        └─openapi.json # OpenAPI document
         └─overlay.json # Overlay to be applied on top of OpenAPI document
  └─generated
     └─plugins
diff --git a/specs/cli/plugin-edit.md b/specs/cli/plugin-edit.md
index cf32f321c8..407c4cc10c 100644
--- a/specs/cli/plugin-edit.md
+++ b/specs/cli/plugin-edit.md
@@ -136,7 +136,7 @@ _The resulting API Manifest named `apimanifest.json` in the `./kiota` folder (co
     └─apimanifest.json
     └─documents
       └─github    
-        └─GitHub.json # OpenAPI document
+        └─openapi.json # OpenAPI document
         └─overlay.json # Overlay to be applied on top of OpenAPI document
  └─generated
     └─plugins
diff --git a/src/Kiota.Builder/WorkspaceManagement/DescriptionStorageService.cs b/src/Kiota.Builder/WorkspaceManagement/DescriptionStorageService.cs
index b9cb1bcf97..1a8d415481 100644
--- a/src/Kiota.Builder/WorkspaceManagement/DescriptionStorageService.cs
+++ b/src/Kiota.Builder/WorkspaceManagement/DescriptionStorageService.cs
@@ -21,7 +21,7 @@ public DescriptionStorageService(string targetDirectory)
         o.PoolSize = 20;
         o.PoolInitialFill = 1;
     });
-    private string GetDescriptionFilePath(string clientName, string extension) => Path.Combine(TargetDirectory, DescriptionsSubDirectoryRelativePath, clientName, $"description.{extension}");
+    private string GetDescriptionFilePath(string clientName, string extension) => Path.Combine(TargetDirectory, DescriptionsSubDirectoryRelativePath, clientName, $"openapi.{extension}");
     public async Task UpdateDescriptionAsync(string clientName, Stream description, string extension = "yml", CancellationToken cancellationToken = default)
     {
         ArgumentNullException.ThrowIfNull(clientName);


Test patch:
diff --git a/tests/Kiota.Builder.Tests/WorkspaceManagement/WorkspaceManagementServiceTests.cs b/tests/Kiota.Builder.Tests/WorkspaceManagement/WorkspaceManagementServiceTests.cs
index 8dab28ccc8..a14ef20dad 100644
--- a/tests/Kiota.Builder.Tests/WorkspaceManagement/WorkspaceManagementServiceTests.cs
+++ b/tests/Kiota.Builder.Tests/WorkspaceManagement/WorkspaceManagementServiceTests.cs
@@ -219,7 +219,7 @@ await classicService.UpdateStateFromConfigurationAsync(
         Assert.False(File.Exists(Path.Combine(tempPath, LockManagementService.LockFileName)));
         Assert.True(File.Exists(Path.Combine(tempPath, WorkspaceConfigurationStorageService.KiotaDirectorySegment, WorkspaceConfigurationStorageService.ConfigurationFileName)));
         Assert.True(File.Exists(Path.Combine(tempPath, WorkspaceConfigurationStorageService.KiotaDirectorySegment, WorkspaceConfigurationStorageService.ManifestFileName)));
-        Assert.True(File.Exists(Path.Combine(tempPath, DescriptionStorageService.DescriptionsSubDirectoryRelativePath, "clientName", "description.yml")));
+        Assert.True(File.Exists(Path.Combine(tempPath, DescriptionStorageService.DescriptionsSubDirectoryRelativePath, "clientName", "openapi.yml")));
     }
     [InlineData(true, true)]
     [InlineData(true, false)]
@@ -231,7 +231,7 @@ public async Task GetsADescription(bool usesConfig, bool cleanOutput)
         var mockLogger = Mock.Of<ILogger>();
         Directory.CreateDirectory(tempPath);
         var service = new WorkspaceManagementService(mockLogger, httpClient, usesConfig, tempPath);
-        var descriptionPath = Path.Combine(tempPath, $"{DescriptionStorageService.DescriptionsSubDirectoryRelativePath}/clientName/description.yml");
+        var descriptionPath = Path.Combine(tempPath, $"{DescriptionStorageService.DescriptionsSubDirectoryRelativePath}/clientName/openapi.yml");
         var outputPath = Path.Combine(tempPath, "client");
         Directory.CreateDirectory(outputPath);
         Directory.CreateDirectory(Path.GetDirectoryName(descriptionPath));