3 Answer(s)
-
0
Hi @gtc
The error in your screenshot is caused by an incorrect path. To fix this, you simply need to run the
refresh.batfile located specifically inside theangular/nswagfolder.Regarding your request to generate "only one API," are you trying to update just one specific controller in your current project, or are you looking to generate a proxy for a completely external API? If you can clarify this, we can provide the exact configuration you need.
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image) -
0
hi
Yes, only one controller and update the proxy
thank's
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image) -
0
Hi @gtc
In ASP.NET Zero, NSwag does not work on a per controller basis. The
refresh.batcommand generates proxies based on the Swagger document, not individual controllers.So when you run
refresh.bat, NSwag reads the configuredswagger.jsonfile, and all controllers exposed in that Swagger document are regenerated together. It is not possible to target or update only a single controller out of the box.Even if you changed only one controller, the recommended approach is still to regenerate all proxies from the same Swagger endpoint.
Generating a proxy for a single controller would only be possible by creating a separate Swagger document that includes only that controller, which is outside the standard ASP.NET Zero setup and generally not recommended.
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image)
