Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Investigate useage of Dictionary<'k, 'v>.Add('k, 'v) instead of indexer. #27

Closed
baronfel opened this issue Apr 21, 2016 · 1 comment
Closed
Assignees

Comments

@baronfel
Copy link
Contributor

Description

I believe that there's a dictionary Add exception leaking out of the provider that could be easily worked around by changing usages of .Add(key, value) to use the indexer : [key] <- value.
Per MSDN, the indexer never throws.

Repro steps

run the provider pointed at the json config in this gist

Expected behavior

It would be great if the duplicate key was either avoided using the indexer, or the key that caused the error was reported.

Actual behavior

you get this error:
image

Known workarounds

None at the moment, investigating to see if there's an error in my schema.

Related information

Swagger Provider 0.5 on f# 4.0

@sergey-tihon sergey-tihon self-assigned this Apr 29, 2016
sergey-tihon added a commit to sergey-tihon/SwaggerProvider that referenced this issue Apr 30, 2016
@sergey-tihon
Copy link
Member

Fix released in v0.5.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants