Skip to content
This repository has been archived by the owner on Mar 26, 2019. It is now read-only.

#254 Prevents a null exception when there is no version. #23

Merged
merged 1 commit into from
Apr 24, 2018

Conversation

alexquintero
Copy link
Contributor

The issue or feature being addressed

GitHub Issue -- When using [ApiVersionNeutral] a null exception is thrown.

Details on the issue fix or feature implementation

Adds a simple check to verify that there is in fact a VersionRouteDataToken before attempting to access it from the dictionary.

Confirm the following

  • I have ensured that I have merged the latest changes from the dev branch
  • I have successfully run a local build
  • I have included the github issue number in my commits
  • I have included unit tests for the issue/feature
    I am unsure how to add this to your current test framework given that it requires use of Microsoft.AspNetCore.Mvc.Versioning which would subsequently require it in the TestController. Perhaps you could give me some guidance on where/how you'd like this to be done.

@alhardy
Copy link
Contributor

alhardy commented Apr 24, 2018

Thanks @alexquintero

@alhardy alhardy added the bug label Apr 24, 2018
@alhardy alhardy added this to the 2.1.0-alpha milestone Apr 24, 2018
@alhardy alhardy merged commit 12996ab into AppMetrics:dev Apr 24, 2018
@alexquintero alexquintero deleted the 254_versionneutral branch April 30, 2018 16:01
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants