Skip to content

Commit

Permalink
twitter-server: Remove .json extension from /admin/toggles
Browse files Browse the repository at this point in the history
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
  • Loading branch information
kevinoliver authored and jenkins committed Jul 7, 2016
1 parent b3f8433 commit 14499cc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -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
~~~~~~~~~~~~~~~~~~~~

Expand Down
2 changes: 1 addition & 1 deletion src/main/scala/com/twitter/server/Admin.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 14499cc

Please sign in to comment.