You don’t really provide enough details here – but based on the exception it 
looks like it’s a Swashbuckle integration. 

If that’s indeed the case, you should open a ticket directly on Swashbuckles 
repository as it’s a third party tool.

 

 

From: <[email protected]> on behalf of Michal Carmeli 
<[email protected]>
Reply-To: "[email protected]" 
<[email protected]>
Date: Sunday, 31 July 2016 at 22:56
To: Swagger <[email protected]>
Subject: I try to add Odata Controllers (I Succeed to add API controllers). But 
I always get this error.

 

500 : {"$id":"1","Message":"An error has 
occurred.","ExceptionMessage":"Precondition failed: currentProperty != 
null","ExceptionType":"System.Diagnostics.Contracts.__ContractsRuntime+ContractException","StackTrace":"
 at 
System.Diagnostics.Contracts.__ContractsRuntime.TriggerFailure(ContractFailureKind
 kind, String msg, String userMessage, String conditionTxt, Exception 
inner)\r\n at 
System.Diagnostics.Contracts.__ContractsRuntime.ReportFailure(ContractFailureKind
 kind, String msg, String conditionTxt, Exception inner)\r\n at 
System.Diagnostics.Contracts.__ContractsRuntime.Requires(Boolean condition, 
String msg, String conditionTxt)\r\n at 
Swashbuckle.OData.SchemaRegistryExtensions.GetEdmPropertyName(MemberInfo 
currentProperty, IEdmStructuredType edmType)\r\n at 
Swashbuckle.OData.SchemaRegistryExtensions.ApplyEdmModelPropertyNamesToSchema(SchemaRegistry
 registry, IEdmModel edmModel, Type type)\r\n at 
Swashbuckle.OData.SchemaRegistryExtensions.GetOrRegisterResponseType(SchemaRegistry
 registry, IEdmModel edmModel, Type type)\r\n at 
Swashbuckle.OData.ODataSwaggerProvider.CreateOperation(ApiDescription 
apiDescription, SchemaRegistry schemaRegistry)\r\n at 
Swashbuckle.OData.ODataSwaggerProvider.CreatePathItem(IEnumerable`1 
apiDescriptions, SchemaRegistry schemaRegistry)\r\n at 
Swashbuckle.OData.ODataSwaggerProvider.<>c__DisplayClass4_0.<GetSwagger>b__3(IGrouping`2
 group)\r\n at 
System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable`1 
source, Func`2 keySelector, Func`2 elementSelector, IEqualityComparer`1 
comparer)\r\n at 
System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable`1 
source, Func`2 keySelector, Func`2 elementSelector)\r\n at 
Swashbuckle.OData.ODataSwaggerProvider.GetSwagger(String rootUrl, String 
apiVersion)\r\n at 
Swashbuckle.Application.SwaggerDocsHandler.SendAsync(HttpRequestMessage 
request, CancellationToken cancellationToken)\r\n at 
System.Net.Http.HttpMessageInvoker.SendAsync(HttpRequestMessage request, 
CancellationToken cancellationToken)\r\n at 
System.Web.Http.Dispatcher.HttpRoutingDispatcher.SendAsync(HttpRequestMessage 
request, CancellationToken cancellationToken)\r\n at 
System.Net.Http.DelegatingHandler.SendAsync(HttpRequestMessage request, 
CancellationToken cancellationToken)\r\n at 
ThirdPartyWebAPI.ApiKeyVerificationChannel.SendAsync(HttpRequestMessage 
request, CancellationToken cancellationToken) in 
c:\\SM\\NG\\Trunk\\Odata4\\SM_NG_VH_DEV\\WebAPIServerV2\\ThirdPartyWebAPI\\Common\\ApiKeyVerificationChannel.cs:line
 55\r\n at System.Net.Http.DelegatingHandler.SendAsync(HttpRequestMessage 
request, CancellationToken cancellationToken)\r\n at 
ThirdPartyWebAPI.Common.CorsHandler.SendAsync(HttpRequestMessage request, 
CancellationToken cancellationToken) in 
c:\\SM\\NG\\Trunk\\Odata4\\SM_NG_VH_DEV\\WebAPIServerV2\\ThirdPartyWebAPI\\Common\\CorsHandler.cs:line
 70\r\n at System.Net.Http.DelegatingHandler.SendAsync(HttpRequestMessage 
request, CancellationToken cancellationToken)\r\n at 
System.Web.Http.Tracing.Tracers.RequestMessageHandlerTracer.<>n__FabricatedMethod6(HttpRequestMessage
 , CancellationToken )\r\n at 
System.Web.Http.Tracing.Tracers.RequestMessageHandlerTracer.<>c__DisplayClass4.<SendAsync>b__1()\r\n
 at 
System.Web.Http.Tracing.ITraceWriterExtensions.TraceBeginEndAsync[TResult](ITraceWriter
 traceWriter, HttpRequestMessage request, String category, TraceLevel level, 
String operatorName, String operationName, Action`1 beginTrace, Func`1 execute, 
Action`2 endTrace, Action`1 errorTrace)\r\n at 
System.Web.Http.Tracing.Tracers.RequestMessageHandlerTracer.SendAsync(HttpRequestMessage
 request, CancellationToken cancellationToken)\r\n at 
System.Net.Http.DelegatingHandler.SendAsync(HttpRequestMessage request, 
CancellationToken cancellationToken)\r\n at 
System.Web.Http.HttpServer.<>n__FabricatedMethod9(HttpRequestMessage , 
CancellationToken )\r\n at 
System.Web.Http.HttpServer.<SendAsync>d__0.MoveNext()"} 
http://localhost:59418/swagger/docs/v1

-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to