Skip to content

Instantly share code, notes, and snippets.

Created April 16, 2023 20:39
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
NSwag Parameter Sorting
services.AddSwaggerDocument(c =>
c.PostProcess = (openApiDocument) =>
var operation = openApiDocument.Paths.Single(p => p.Key.StartsWith("/conversion/gaeb/ava"));
var operationParameters = operation.Value.Values.Single().Parameters;
var sortedParameters = SortParameters(operationParameters).ToList();
foreach (var parameter in sortedParameters)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment