christianhelle / apiclientcodegen

A collection of Visual Studio custom tool code generators for Swagger / OpenAPI specification files
http://bit.ly/restapicodegen
GNU General Public License v3.0
165 stars 20 forks source link

Refitter file gets overwritten #907

Closed dammitjanet closed 2 months ago

dammitjanet commented 2 months ago

Describe the bug After using #879 to import and create a refitter file, updating the the source api json file, overwrites the refitter file

Support Key: ecbee24

To Reproduce Steps to reproduce the behavior:

  1. Create a new refitter with the VS tool so that it generates the OpenAPI json file, the refitter file, and the underlying .cs file
  2. Modify the refitter file and save
  3. Modify the text of the OpenAPI json file, this automatically regenerates the refitter file
  4. The changes made in 2 have been lost

Expected behavior If a refitter file already exists within the project, then the file should not be overwritten as any changes made are lost.

Screenshots n/a

Visual Studio Extension (please complete the following information):

Additional context n/a

christianhelle commented 2 months ago

@dammitjanet thanks for pointing this out and taking the report this. I guess it went a bit too quick with implementing this feature