togglz/togglz — pull request #85 by fabito (2014-04-03 01:29:43+00:00)
Title: Togglz Rest API module proposal

This is an initial draft proposal for a Togglz REST API module.
It basically contains a Servlet that once installed exposes a FeatureToggle resource containing the following operations:

Description | Verb | Response Codes | Content Type | Sample
------------- | ------------- | ------------- | ------------- | -------------
Lists all feature toggles | GET | 200 | application/json | GET /featuretoggles
Gets a specific feature toggle (by name) | GET | 200, 404 | application/json | GET /featuretoggles/MY_FEATURE
Updates a specific feature toggle (by name) | PUT | 200, 404 | - | PUT /featuretoggles/MY_FEATURE

The code still need some improvements but I decided to create this pull request to foment a discussion about the design and the real usefulness of this module.
Some design decisions (so far):

1. Opted to leave security out of the module's scope - users can secure the resource as they wish.
2. **json-smart** library for JSON (des)serialization - lightweight and fast
3. Unit testing with **jetty-servlet-tester** (still not familiar with Arquillian)
4. Pure servlet implementation (not using JAX-RS)