You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This issue looks much like #905 in that when I have added a Rest API Client using Kiota, the entire thing is correctly placed in a single Swagger.cs file. However, once I right-click on kiota-lock.json and select either "Generate Kiota output" or "Run Custom Tool", I get all sorts of files in two freshly created "API" and "Models" subfolders + "ApiClient.cs" in the project root despite having "Generate Multiple Files" set to "False" in Options.
This also makes Visual Studio generate hundreds of duplicate member errors causing the project to be uncompilable because the old single file Swagger.cs still remains, and is now untouched.
I can right-click on the "Swagger" item that is the parent to Swagger.cs and select "Run Custom Tool" and then this doesn't present the issue, but I'm now on the other hand unsure if it actually ever retrieves a new OpenAPI schema or just regenerates the single file based on what it had offline.
Support Key: b440d1c
To Reproduce
Steps to reproduce the behavior:
Add a new REST API Client with Kiota and default settings.
Visual Studio will add a Swagger -> Swagger.cs structure in the project along with kiota-lock.json.
Right-click on kiota-lock.json to regenerate the client.
Kiota will now create and fill the "Models" and "API" subfolders, create a new ApiClient.cs, and finally leave the original Swagger.cs untouched per the last modified comment at the top of the file. As a side effect making the project uncompilable due to namespace/class conflicts.
Expected behavior
Refreshed Swagger.cs file upon updating it via kiota-lock.json.
Visual Studio Extension (please complete the following information):
Visual Studio Version 2022 - 17.10.4
Extension Version 1.11.0
The text was updated successfully, but these errors were encountered:
@jonasnordlund It was easy to reproduce. Thanks for providing detailed steps. This is a bug.
The "Generate Kiota output" feature was built based on a request from a user who has an existing kiota-lock.json file and I didn't properly consider other scenarios when I implemented it
I'll fix this so that the "Generate Kiota output" respects the Kiota settings in this Visual Studio extension
Describe the bug
This issue looks much like #905 in that when I have added a Rest API Client using Kiota, the entire thing is correctly placed in a single
Swagger.cs
file. However, once I right-click onkiota-lock.json
and select either "Generate Kiota output" or "Run Custom Tool", I get all sorts of files in two freshly created "API" and "Models" subfolders + "ApiClient.cs" in the project root despite having "Generate Multiple Files" set to "False" in Options.This also makes Visual Studio generate hundreds of duplicate member errors causing the project to be uncompilable because the old single file
Swagger.cs
still remains, and is now untouched.I can right-click on the "Swagger" item that is the parent to
Swagger.cs
and select "Run Custom Tool" and then this doesn't present the issue, but I'm now on the other hand unsure if it actually ever retrieves a new OpenAPI schema or just regenerates the single file based on what it had offline.Support Key:
b440d1c
To Reproduce
Steps to reproduce the behavior:
Swagger.cs
untouched per the last modified comment at the top of the file. As a side effect making the project uncompilable due to namespace/class conflicts.Expected behavior
Refreshed Swagger.cs file upon updating it via kiota-lock.json.
Visual Studio Extension (please complete the following information):
The text was updated successfully, but these errors were encountered: