wordnik/swagger-js — pull request #66 by lbovet (2013-11-29 21:36:15+00:00)
Title: Maps

This allows to use maps, i.e. objects with arbitrary property names which values are all of a given type (similar to Java's Map). Json-schema allows that using additionalProperties. Example:

Map of integers:
```
{
"type": "object",
"additionalProperties": { "type": "integer" }
}
```

Map of a model type:
```
{
"type": "object",
"additionalProperties":{"$ref": "Tag"}
}
```

Additionally, one can define the type of the response and parameters as a map[string->XXX] similarly to array[XXX].

In this PR, I also added a small improvement to the signature HTML: the collection types are now displayed above the model. Before that, it was not visible when an operation returned a collection or a single instance without looking at the JSON sample.

Here is an adapted pet api illustrating the change: https://gist.github.com/lbovet/7712247