diff options
| author | Joshua M. Boniface <joshua@boniface.me> | 2019-01-31 21:11:13 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-01-31 21:11:13 -0500 |
| commit | c713824bf960b1c0d33dde051da6115f329cbca8 (patch) | |
| tree | 048d7dfbd47da525cbc5fd7551ea3e27fa643e5e /Emby.Server.Implementations/Services/SwaggerService.cs | |
| parent | ea851317e76bca0ae4c02547bf7ae017a5a45282 (diff) | |
| parent | 1ea219bf3f5c0708c3afa5fa2d897ca5212b5e04 (diff) | |
Merge pull request #734 from Bond-009/culture
Fix more analyzer warnings
Diffstat (limited to 'Emby.Server.Implementations/Services/SwaggerService.cs')
| -rw-r--r-- | Emby.Server.Implementations/Services/SwaggerService.cs | 28 |
1 files changed, 8 insertions, 20 deletions
diff --git a/Emby.Server.Implementations/Services/SwaggerService.cs b/Emby.Server.Implementations/Services/SwaggerService.cs index 9bceeabec..3e6970eef 100644 --- a/Emby.Server.Implementations/Services/SwaggerService.cs +++ b/Emby.Server.Implementations/Services/SwaggerService.cs @@ -216,40 +216,28 @@ namespace Emby.Server.Implementations.Services { var responses = new Dictionary<string, SwaggerResponse> { + { "200", new SwaggerResponse { description = "OK" } } }; - responses["200"] = new SwaggerResponse + var apiKeySecurity = new Dictionary<string, string[]> { - description = "OK" + { "api_key", Array.Empty<string>() } }; - var security = new List<Dictionary<string, string[]>>(); - - var apiKeySecurity = new Dictionary<string, string[]>(); - apiKeySecurity["api_key"] = Array.Empty<string>(); - - security.Add(apiKeySecurity); - - result[verb.ToLower()] = new SwaggerMethod + result[verb.ToLowerInvariant()] = new SwaggerMethod { summary = info.Summary, description = info.Description, - produces = new[] - { - "application/json" - }, - consumes = new[] - { - "application/json" - }, + produces = new[] { "application/json" }, + consumes = new[] { "application/json" }, operationId = info.RequestType.Name, tags = Array.Empty<string>(), - parameters = new SwaggerParam[] { }, + parameters = Array.Empty<SwaggerParam>(), responses = responses, - security = security.ToArray() + security = new [] { apiKeySecurity } }; } |
