Yelp/swagger-py — pull request #2 by prat0318 (2014-06-12 23:28:15+00:00)
Title: Dynamic model creation and validation

### Implemented features

* Validates the correctness of the api-docs and resources against swagger spec 1.2
* Generates `setattr` (tab complete in Ipyton) on the client for available resources
* Generates `setattr` on each resource for available operations
* Each operation can be called using `operation()` with attributes as its params
* Validates the correctness of each model spec given in the resources
* Generates a namedtuple `models` for each resource which map a dynamic class to each swagger model
* The API response (if status is 2XX) is validated against swagger expected response type
* If API response is valid, it is converted from json response to Python instances of models. The user can then deal with Python model instances instead of JSON responses.
* An instance of `model` from namedtuple `models` can be instantiated and compared with API response `model`
* Docstring integration for `resources`, `operations` and `models` to tell about the attributes and types

### Future features

* If an API takes an object in the body (like in a POST), API can be passed a Python model instance as the body parameter and `swagger-py` will convert the instance to proper json to send it to the request. Hence, the user can avoid dealing with json dicts and instead deal with Python objects.