Skip to content

Commit

Permalink
Merge pull request #169 from andyward/master
Browse files Browse the repository at this point in the history
Thanks @andyward ! Will merge and release NuGet package.
  • Loading branch information
rbeauchamp authored Nov 10, 2017
2 parents 637b5aa + 45e3b78 commit 80f92f3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 2 additions & 0 deletions Swashbuckle.OData.Tests/Fixtures/ODataQueryOptionsTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ public async Task It_supports_controller_with_single_get_method_with_odataqueryo
swaggerDocument.paths.TryGetValue("/odata/Products3({Id})", out pathItem2);
pathItem.Should().NotBeNull();
pathItem.get.Should().NotBeNull();
// Verify that ODataQueryOptions types are not in the definition
swaggerDocument.definitions.ContainsKey("ApplyQueryOption").Should().BeFalse();

await ValidationUtils.ValidateSwaggerJson();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,11 @@ protected List<ApiParameterDescription> CreateParameterDescriptions(HttpActionDe
{
foreach (var parameterBinding in parameterBindings)
{
Contract.Assume(parameterBinding != null);
Contract.Assume(parameterBinding != null || parameterBinding.Descriptor != null);
if(parameterBinding.Descriptor.IsODataLibraryType())
{
continue;
}
parameterDescriptions.Add(CreateParameterDescriptionFromBinding(parameterBinding));
}
}
Expand Down

0 comments on commit 80f92f3

Please sign in to comment.