In the new Version of NSwag/Swagger there is a new part with all the Models used in the REST API.
This is really a good functionality but there are multiple improvements which would make it more usefull:
Is there already a way to do that?
We need to add the missing settings here:
https://github.com/RSuter/NSwag/blob/master/src/NSwag.AspNetCore/SwaggerUi3Settings.cs#L53
and here:
https://github.com/RSuter/NSwag/blob/master/src/NSwag.AspNetCore/SwaggerUi3/index.html
(or just serve this .html file yourself :-)
I think you can change the schema names with a custom schema name generator: https://github.com/RSuter/NSwag/wiki#customizations
Maybe we need a more flexible way to extend this, maybe just inject js/css code?
I have tested your proposal, means added in
https://github.com/RSuter/NSwag/blob/master/src/NSwag.AspNetCore/SwaggerUi3Settings.cs
public string ApisSorter { get; set; } = "none";
public string OperationsSorter { get; set; } = "none";
...
html = html.Replace("{ApisSorter}", ApisSorter);
html = html.Replace("{OperationsSorter}", OperationsSorter);
https://github.com/RSuter/NSwag/blob/master/src/NSwag.AspNetCore/SwaggerUi3/index.html
apisSorter: "{ApisSorter}",
operationsSorter: "{OperationsSorter}",
...and this worked perfectly.
Is "none" a working default?
The Swagger documentation is there not quite clear, but during my tests it worked.
So I also had a look into the code and saw that the sorters are stored in a collection by the accoding tag ("alpha", "method"). So "none" is as good as any other string not member of the defined tags.
Using a custom schema name generator is working fine for us.