-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Question about OutputFilePath #413
Comments
Relative paths are allowed, but must be relative to the nswag file. Is this the case? |
Hi, Thank you for your response. Yes, it's relative to nswag file. These are the locations of nswag file and output file directories. and This is the SwaggerToTypeScriptCommand part of my configuration
|
Can you try |
Thanks, It works that way 😊 |
Ok, then you found a bug which i can reproduce.. will be fixed in the next version... |
Thanks for your great work. |
Will be fixed in v7.1 |
Hi,
I was trying to run npm package.
I have used *.nswag file to generate angular2 typescript proxies.
When I have an OutputFilePath like this
"OutputFilePath": "..\\src\\shared\\service-proxies\\service-proxies.ts"
I got an error but if I use full path like "D:\.................\service-proxies.ts" it works.
Can we use relative paths for OutputFilePath ? If so, can you share an example ?
Here is the exception message I'm getting.
System.AggregateException: One or more errors occurred. ---> System.UriFormatException: Invalid URI: The format of the URI could not be determined.
at System.Uri.CreateThis(String uri, Boolean dontEscape, UriKind uriKind)
at NSwag.CodeGeneration.Utilities.PathUtilities.MakeAbsolutePath(String relativePath, String relativeTo) in C:\Data\NSwag\src\NSwag.AssemblyLoaderCore\Utilities\PathUtilities.cs:line 83
at NSwag.Commands.NSwagDocumentBase.ConvertToAbsolutePaths() in C:\Data\NSwag\src\NSwag.Commands\NSwagDocumentBase.cs:line 250
at NSwag.Commands.NSwagDocumentBase.<>c__DisplayClass59_0
1.<LoadAsync>b__0() in C:\Data\NSwag\src\NSwag.Commands\NSwagDocumentBase.cs:line 159 at System.Threading.Tasks.Task
1.InnerInvoke()at System.Threading.Tasks.Task.Execute()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at NSwag.CodeGeneration.Commands.NSwagDocumentCommand.d__0.MoveNext() in C:\Data\NSwag\src\NSwag.AssemblyLoaderCore\Commands\NSwagDocumentCommand.cs:line 23
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at NSwag.Commands.NSwagDocumentCommandBase.d__5.MoveNext() in C:\Data\NSwag\src\NSwag.Commands\Commands\NSwagDocumentCommandBase.cs:line 47
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at NSwag.Commands.NSwagDocumentCommandBase.d__4.MoveNext() in C:\Data\NSwag\src\NSwag.Commands\Commands\NSwagDocumentCommandBase.cs:line 28
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at NConsole.CommandLineProcessor.d__12.MoveNext() in C:\projects\nconsole\src\NConsole\CommandLineProcessor.cs:line 138
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at NConsole.CommandLineProcessor.d__11.MoveNext() in C:\projects\nconsole\src\NConsole\CommandLineProcessor.cs:line 107
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task
1.GetResultCore(Boolean waitCompletionNotification) at NSwag.Commands.NSwagCommandProcessor.Process(String[] args) in C:\Data\NSwag\src\NSwag.Commands\NSwagCommandProcessor.cs:line 39 ---> (Inner Exception #0) System.UriFormatException: Invalid URI: The format of the URI could not be determined. at System.Uri.CreateThis(String uri, Boolean dontEscape, UriKind uriKind) at NSwag.CodeGeneration.Utilities.PathUtilities.MakeAbsolutePath(String relativePath, String relativeTo) in C:\Data\NSwag\src\NSwag.AssemblyLoaderCore\Utilities\PathUtilities.cs:line 83 at NSwag.Commands.NSwagDocumentBase.ConvertToAbsolutePaths() in C:\Data\NSwag\src\NSwag.Commands\NSwagDocumentBase.cs:line 250 at NSwag.Commands.NSwagDocumentBase.<>c__DisplayClass59_0
1.b__0() in C:\Data\NSwag\src\NSwag.Commands\NSwagDocumentBase.cs:line 159at System.Threading.Tasks.Task`1.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at NSwag.CodeGeneration.Commands.NSwagDocumentCommand.d__0.MoveNext() in C:\Data\NSwag\src\NSwag.AssemblyLoaderCore\Commands\NSwagDocumentCommand.cs:line 23
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at NSwag.Commands.NSwagDocumentCommandBase.d__5.MoveNext() in C:\Data\NSwag\src\NSwag.Commands\Commands\NSwagDocumentCommandBase.cs:line 47
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at NSwag.Commands.NSwagDocumentCommandBase.d__4.MoveNext() in C:\Data\NSwag\src\NSwag.Commands\Commands\NSwagDocumentCommandBase.cs:line 28
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at NConsole.CommandLineProcessor.d__12.MoveNext() in C:\projects\nconsole\src\NConsole\CommandLineProcessor.cs:line 138
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at NConsole.CommandLineProcessor.d__11.MoveNext() in C:\projects\nconsole\src\NConsole\CommandLineProcessor.cs:line 107<---
Thanks a lot.
The text was updated successfully, but these errors were encountered: