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
When i set the Template directoy as '.\Templates' it ends up in my temp folder: %appdata%\Local\Temp\Templates.
As custom templates are not something i describe as temporary, I would expect is to take me somwhere less temp.
Version of NSwag toolchain, computer and .NET runtime used
V 14.2.0.0 of NSwagStudio
To Reproduce
In NSwagStudio, set the field 'Template directoy' in 'CSharp Client' to '.\Templates'.
Click 'Generate Files'
Observe an error message: The template directory %appdata%\Local\Temp\Templates does not exist
NOTE: the bug is NOT that the directory does not exist. I know that. The issue here is the unexpected location the path is taking me.
Expected behavior
I expect the template location to end up in a less temporary place when using relative paths. The preffered behavoiur would be that it takes the path relative to the nswag json file, similar to the 'Output file path' field
Additional context
I want to make project specific template files and want them to be placed close by the nswag json. With the current implementation i only have the option to use absolute paths or relative paths to the temp folder. Both are not workable because when someone else uses the project, i cant guarantee the path exists on their machine
EDIT: I can implement the change if needed, but would like to have a clear description on the specification/expected behaviour. Also it could be a breaking change, so some guidence there would also be nice
The text was updated successfully, but these errors were encountered:
Describe the bug
When i set the Template directoy as '.\Templates' it ends up in my temp folder: %appdata%\Local\Temp\Templates.
As custom templates are not something i describe as temporary, I would expect is to take me somwhere less temp.
Version of NSwag toolchain, computer and .NET runtime used
V 14.2.0.0 of NSwagStudio
To Reproduce
NOTE: the bug is NOT that the directory does not exist. I know that. The issue here is the unexpected location the path is taking me.
Expected behavior
I expect the template location to end up in a less temporary place when using relative paths. The preffered behavoiur would be that it takes the path relative to the nswag json file, similar to the 'Output file path' field
Additional context
I want to make project specific template files and want them to be placed close by the nswag json. With the current implementation i only have the option to use absolute paths or relative paths to the temp folder. Both are not workable because when someone else uses the project, i cant guarantee the path exists on their machine
EDIT: I can implement the change if needed, but would like to have a clear description on the specification/expected behaviour. Also it could be a breaking change, so some guidence there would also be nice
The text was updated successfully, but these errors were encountered: