diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2017-09-11 15:25:13 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2017-09-11 15:25:13 -0400 |
| commit | 2f99a78230b397535d7ea0b9e335a00b438379b4 (patch) | |
| tree | c4f381ddde5fd428f11c1b8b602f31c6d3eb2166 /Emby.Server.Implementations/Services/SwaggerService.cs | |
| parent | 95084d6f7d03594b1d4939067609d0065e08d606 (diff) | |
3.2.30.17
Diffstat (limited to 'Emby.Server.Implementations/Services/SwaggerService.cs')
| -rw-r--r-- | Emby.Server.Implementations/Services/SwaggerService.cs | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/Emby.Server.Implementations/Services/SwaggerService.cs b/Emby.Server.Implementations/Services/SwaggerService.cs index 63cbb78dd..be3b4cbba 100644 --- a/Emby.Server.Implementations/Services/SwaggerService.cs +++ b/Emby.Server.Implementations/Services/SwaggerService.cs @@ -21,7 +21,7 @@ namespace Emby.Server.Implementations.Services public string host { get; set; } public string basePath { get; set; } public SwaggerTag[] tags { get; set; } - public Dictionary<string, Dictionary<string, SwaggerMethod>> paths { get; set; } + public IDictionary<string, Dictionary<string, SwaggerMethod>> paths { get; set; } public Dictionary<string, SwaggerDefinition> definitions { get; set; } } @@ -147,16 +147,21 @@ namespace Emby.Server.Implementations.Services return new Dictionary<string, SwaggerDefinition>(); } - private Dictionary<string, Dictionary<string, SwaggerMethod>> GetPaths() + private IDictionary<string, Dictionary<string, SwaggerMethod>> GetPaths() { - var paths = new Dictionary<string, Dictionary<string, SwaggerMethod>>(); + var paths = new SortedDictionary<string, Dictionary<string, SwaggerMethod>>(); - var all = ServiceController.Instance.RestPathMap.ToList(); + var all = ServiceController.Instance.RestPathMap.OrderBy(i => i.Key, StringComparer.OrdinalIgnoreCase).ToList(); foreach (var current in all) { foreach (var info in current.Value) { + if (info.IsHidden) + { + continue; + } + if (info.Path.StartsWith("/mediabrowser", StringComparison.OrdinalIgnoreCase)) { continue; @@ -191,6 +196,7 @@ namespace Emby.Server.Implementations.Services result[verb.ToLower()] = new SwaggerMethod { summary = info.Summary, + description = info.Description, produces = new[] { "application/json" |
