khellang/Nancy.Swagger — pull request #41 by TimSchlechter (2014-08-12 20:40:34+00:00)
Title: Type tests

This PR adds unit tests which cover to mapping to Parameter,Operation and ModelProperty, and focuses mostly on the Type, Ref and Items properties, although the other properties are also asserted b66d8d9.

When I ran the tests, I noticed some properties should be null in some cases. I added the following improvements:
- Parameter: allowMultiple and required when false e948318
- Operation: produces and consumes when empty 350da77
- ModelProperty: uniqueItems when false 0b0b8b8

I had to refactor the CreateModel and CreateModelProperty mapping functions. They are moved to SwaggerExtensions. This makes it also more consistent with the other mapping functions. 89b5290

One test fails at the moment, this is correct. The bug it exposes is fixed by https://github.com/khellang/Nancy.Swagger/pull/39