From 14499ccb8058c05c24f72f2af0cf806c0dc4fdff Mon Sep 17 00:00:00 2001 From: Kevin Oliver Date: Thu, 7 Jul 2016 17:37:04 +0000 Subject: [PATCH] twitter-server: Remove .json extension from /admin/toggles Problem The admin endpoint for Toggles currently ends with ".json". Once mutations are allowed via POST/PUT/DELETE this extenstion will look out of place. As an example, this would not be a great path: `DELETE /admin/toggles.json/com.twitter.somelib/com.twitter.somelib.Toggle` Solution Remove the ".json" extension such that the admin endpoint is available at "/admin/toggles". RB_ID=849646 --- CHANGES | 4 ++++ src/main/scala/com/twitter/server/Admin.scala | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index d6165b7c..70068459 100644 --- a/CHANGES +++ b/CHANGES @@ -19,6 +19,10 @@ New Features * Add optional HTTP request parameter `filter` to `/admin/registry.json` allowing for simple filtering of the returned JSON. ``RB_ID=842784`` + * Add admin endpoint, `/admin/toggles`, for + `c.t.finagle.toggle.StandardToggleMap` registered `Toggles`. + ``RB_ID=847434`` + Breaking API Changes ~~~~~~~~~~~~~~~~~~~~ diff --git a/src/main/scala/com/twitter/server/Admin.scala b/src/main/scala/com/twitter/server/Admin.scala index 93c007ef..102eb40d 100644 --- a/src/main/scala/com/twitter/server/Admin.scala +++ b/src/main/scala/com/twitter/server/Admin.scala @@ -116,7 +116,7 @@ trait Admin { self: App with AdminHttpServer with Stats => path = "/admin/registry.json", handler = new RegistryHandler, alias = "Registry", group = Some(Grouping.ProcessInfo), includeInIndex = true), Route( - path = "/admin/toggles.json", handler = new ToggleHandler(), + path = "/admin/toggles", handler = new ToggleHandler(), alias = "Toggles", group = Some(Grouping.ProcessInfo), includeInIndex = true), Route( path = "/favicon.ico", ResourceHandler.fromJar(