Swagger UI display generated client [closed]
There is swagger and there is nswag.
NSwag does some client generation.
Is it possible to generate client and display it as a link on Swagger UI for the consumers to download and use it?
c# rest swagger nswag
closed as too broad by Selvin, Cindy Meister, Gert Arnold, Matthew L Daniel, C-Pound Guru Nov 23 '18 at 4:13
Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
add a comment |
There is swagger and there is nswag.
NSwag does some client generation.
Is it possible to generate client and display it as a link on Swagger UI for the consumers to download and use it?
c# rest swagger nswag
closed as too broad by Selvin, Cindy Meister, Gert Arnold, Matthew L Daniel, C-Pound Guru Nov 23 '18 at 4:13
Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
You can simply add a download link to theinfo.description
section of your API definition. Or do you mean something else?
– Helen
Nov 22 '18 at 22:08
add a comment |
There is swagger and there is nswag.
NSwag does some client generation.
Is it possible to generate client and display it as a link on Swagger UI for the consumers to download and use it?
c# rest swagger nswag
There is swagger and there is nswag.
NSwag does some client generation.
Is it possible to generate client and display it as a link on Swagger UI for the consumers to download and use it?
c# rest swagger nswag
c# rest swagger nswag
asked Nov 22 '18 at 21:40
DarthVaderDarthVader
22.7k57163264
22.7k57163264
closed as too broad by Selvin, Cindy Meister, Gert Arnold, Matthew L Daniel, C-Pound Guru Nov 23 '18 at 4:13
Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
closed as too broad by Selvin, Cindy Meister, Gert Arnold, Matthew L Daniel, C-Pound Guru Nov 23 '18 at 4:13
Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
You can simply add a download link to theinfo.description
section of your API definition. Or do you mean something else?
– Helen
Nov 22 '18 at 22:08
add a comment |
You can simply add a download link to theinfo.description
section of your API definition. Or do you mean something else?
– Helen
Nov 22 '18 at 22:08
You can simply add a download link to the
info.description
section of your API definition. Or do you mean something else?– Helen
Nov 22 '18 at 22:08
You can simply add a download link to the
info.description
section of your API definition. Or do you mean something else?– Helen
Nov 22 '18 at 22:08
add a comment |
1 Answer
1
active
oldest
votes
Almost certainly not out the box. But then... you don't necessarily know what technology your client will choose. NSwag will generate a number of different types of clients in just a few minutes with little more effort than pointing it at the JSON Swagger definition (which Swagger/Swashbuckle automatically produces for your API), and is free to download; why not just let them do it?
You could speculatively generate a C# client for them and host it on your API server and serve it as say a zip file, but I don't really see the point, plus you'd have to make various customisation decisions for them, that they might prefer to make for themselves (namespace, HttpClient injection, partial class usage, etc).
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Almost certainly not out the box. But then... you don't necessarily know what technology your client will choose. NSwag will generate a number of different types of clients in just a few minutes with little more effort than pointing it at the JSON Swagger definition (which Swagger/Swashbuckle automatically produces for your API), and is free to download; why not just let them do it?
You could speculatively generate a C# client for them and host it on your API server and serve it as say a zip file, but I don't really see the point, plus you'd have to make various customisation decisions for them, that they might prefer to make for themselves (namespace, HttpClient injection, partial class usage, etc).
add a comment |
Almost certainly not out the box. But then... you don't necessarily know what technology your client will choose. NSwag will generate a number of different types of clients in just a few minutes with little more effort than pointing it at the JSON Swagger definition (which Swagger/Swashbuckle automatically produces for your API), and is free to download; why not just let them do it?
You could speculatively generate a C# client for them and host it on your API server and serve it as say a zip file, but I don't really see the point, plus you'd have to make various customisation decisions for them, that they might prefer to make for themselves (namespace, HttpClient injection, partial class usage, etc).
add a comment |
Almost certainly not out the box. But then... you don't necessarily know what technology your client will choose. NSwag will generate a number of different types of clients in just a few minutes with little more effort than pointing it at the JSON Swagger definition (which Swagger/Swashbuckle automatically produces for your API), and is free to download; why not just let them do it?
You could speculatively generate a C# client for them and host it on your API server and serve it as say a zip file, but I don't really see the point, plus you'd have to make various customisation decisions for them, that they might prefer to make for themselves (namespace, HttpClient injection, partial class usage, etc).
Almost certainly not out the box. But then... you don't necessarily know what technology your client will choose. NSwag will generate a number of different types of clients in just a few minutes with little more effort than pointing it at the JSON Swagger definition (which Swagger/Swashbuckle automatically produces for your API), and is free to download; why not just let them do it?
You could speculatively generate a C# client for them and host it on your API server and serve it as say a zip file, but I don't really see the point, plus you'd have to make various customisation decisions for them, that they might prefer to make for themselves (namespace, HttpClient injection, partial class usage, etc).
answered Nov 22 '18 at 22:27
sellotapesellotape
5,66821619
5,66821619
add a comment |
add a comment |
You can simply add a download link to the
info.description
section of your API definition. Or do you mean something else?– Helen
Nov 22 '18 at 22:08