You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Your changes look good to me @poloBBQ ! The only thing I would ask is if you could write some tests to valid the correct functionality. Feel free to open a PR!
Expected Behavior
Dictionary properties with string keys should generate a swagger document using object-typed additionalProperties as explained in the Swagger specification.
public Dictionary<string, int> Dictionary { get; set; }
Should output something equivalent to:
"dictionary": {"type": "object","additionalProperties": {"type": "integer","format": "int32"}}
Actual Behavior
An array is generated, which is an incorrect interpretation of a dictionary. As an example:
public Dictionary<string, int> Dictionary { get; set; }
Outputs:
"dictionary": {"type": "array","items": {"type": "string"}}
Other Information:
I forked the repo and commited a change to support dictionaries, please let me know if I should create a pull request with it or do any corrections https://github.com/evicertia/Nancy.Swagger/tree/dictionary-support
Thanks.
The text was updated successfully, but these errors were encountered: