Web Api OData v4 больше не отображает контроллеры в Swagger UI - PullRequest
0 голосов
/ 05 июня 2018

У меня была служба Web Api OData v4, отлично работающая с Swagger / Swashbuckle на моей машине, затем пару дней спустя я перезапустил ее, ничего не меняя, и теперь в интерфейсе Swagger не отображаются мои контроллеры.Я могу видеть информацию метаданных, и служба, кажется, возвращает данные просто отлично.

Я перепробовал практически все, что мог придумать: переустановить пакеты, создать новое решение и переустановить IIS.Что странно, так это то, что он перестал работать в IIS & IIS Express, и я не могу заставить контроллеры появляться в новом решении.

Если в моем коде ничего не изменилось и в IIS ничего не изменилось, что могло вызвать это?Я в моем конце.Буду признателен за любую помощь!

Отправка моих пакетов на случай, если возникнет проблема:

<?xml version="1.0" encoding="utf-8"?>
<packages>
  <package id="EntityFramework" version="6.2.0" targetFramework="net461" />
  <package id="MediaInfo.DotNetWrapper" version="1.0.7" targetFramework="net461" />
  <package id="MediaInfo.Native" version="17.12" targetFramework="net461" />
  <package id="Microsoft.AspNet.OData" version="6.1.0" targetFramework="net461" />
  <package id="Microsoft.AspNet.WebApi" version="5.2.4" targetFramework="net461" />
  <package id="Microsoft.AspNet.WebApi.Client" version="5.2.6" targetFramework="net461" />
  <package id="Microsoft.AspNet.WebApi.Core" version="5.2.4" targetFramework="net461" />
  <package id="Microsoft.AspNet.WebApi.OData" version="5.7.0" targetFramework="net461" />
  <package id="Microsoft.AspNet.WebApi.WebHost" version="5.2.4" targetFramework="net461" />
  <package id="Microsoft.AspNetCore.Authorization" version="1.0.0" targetFramework="net461" />
  <package id="Microsoft.AspNetCore.Hosting.Abstractions" version="1.0.0" targetFramework="net461" />
  <package id="Microsoft.AspNetCore.Hosting.Server.Abstractions" version="2.0.2" targetFramework="net461" />
  <package id="Microsoft.AspNetCore.Http" version="1.0.0" targetFramework="net461" />
  <package id="Microsoft.AspNetCore.Http.Abstractions" version="2.0.2" targetFramework="net461" />
  <package id="Microsoft.AspNetCore.Http.Extensions" version="1.0.0" targetFramework="net461" />
  <package id="Microsoft.AspNetCore.Http.Features" version="2.0.2" targetFramework="net461" />
  <package id="Microsoft.AspNetCore.JsonPatch" version="1.0.0" targetFramework="net461" />
  <package id="Microsoft.AspNetCore.Mvc.Abstractions" version="1.0.0" targetFramework="net461" />
  <package id="Microsoft.AspNetCore.Mvc.Core" version="1.0.0" targetFramework="net461" />
  <package id="Microsoft.AspNetCore.Mvc.Formatters.Json" version="1.0.0" targetFramework="net461" />
  <package id="Microsoft.AspNetCore.Routing" version="1.0.0" targetFramework="net461" />
  <package id="Microsoft.AspNetCore.Routing.Abstractions" version="2.0.2" targetFramework="net461" />
  <package id="Microsoft.AspNetCore.WebUtilities" version="2.0.2" targetFramework="net461" />
  <package id="Microsoft.CSharp" version="4.4.1" targetFramework="net461" />
  <package id="Microsoft.Data.Edm" version="5.8.3" targetFramework="net461" />
  <package id="Microsoft.Data.OData" version="5.8.3" targetFramework="net461" />
  <package id="Microsoft.DotNet.InternalAbstractions" version="1.0.0" targetFramework="net461" />
  <package id="Microsoft.DotNet.PlatformAbstractions" version="2.0.4" targetFramework="net461" />
  <package id="Microsoft.Extensions.Configuration.Abstractions" version="2.0.1" targetFramework="net461" />
  <package id="Microsoft.Extensions.DependencyInjection" version="1.0.0" targetFramework="net461" />
  <package id="Microsoft.Extensions.DependencyInjection.Abstractions" version="1.0.0" targetFramework="net461" />
  <package id="Microsoft.Extensions.DependencyModel" version="2.0.4" targetFramework="net461" />
  <package id="Microsoft.Extensions.FileProviders.Abstractions" version="2.0.1" targetFramework="net461" />
  <package id="Microsoft.Extensions.Logging.Abstractions" version="2.0.1" targetFramework="net461" />
  <package id="Microsoft.Extensions.ObjectPool" version="2.0.0" targetFramework="net461" />
  <package id="Microsoft.Extensions.Options" version="1.0.0" targetFramework="net461" />
  <package id="Microsoft.Extensions.PlatformAbstractions" version="1.1.0" targetFramework="net461" />
  <package id="Microsoft.Extensions.Primitives" version="2.0.0" targetFramework="net461" />
  <package id="Microsoft.Net.Http.Headers" version="2.0.2" targetFramework="net461" />
  <package id="Microsoft.NETCore.Platforms" version="2.0.2" targetFramework="net461" />
  <package id="Microsoft.OData.Core" version="7.4.4" targetFramework="net461" />
  <package id="Microsoft.OData.Edm" version="7.4.4" targetFramework="net461" />
  <package id="Microsoft.Spatial" version="7.4.4" targetFramework="net461" />
  <package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net461" />
  <package id="Microsoft.Win32.Primitives" version="4.3.0" targetFramework="net461" />
  <package id="NETStandard.Library" version="2.0.2" targetFramework="net461" />
  <package id="Newtonsoft.Json" version="11.0.2" targetFramework="net461" />
  <package id="Swagger" version="1.0.0" targetFramework="net461" />
  <package id="Swashbuckle" version="5.6.0" targetFramework="net461" />
  <package id="Swashbuckle.Core" version="5.6.0" targetFramework="net461" />
  <package id="Swashbuckle.OData" version="3.5.0" targetFramework="net461" />
  <package id="System.AppContext" version="4.3.0" targetFramework="net461" />
  <package id="System.Buffers" version="4.4.0" targetFramework="net461" />
  <package id="System.Collections" version="4.3.0" targetFramework="net461" />
  <package id="System.Collections.Concurrent" version="4.3.0" targetFramework="net461" />
  <package id="System.ComponentModel" version="4.3.0" targetFramework="net461" />
  <package id="System.ComponentModel.Primitives" version="4.3.0" targetFramework="net461" />
  <package id="System.ComponentModel.TypeConverter" version="4.3.0" targetFramework="net461" />
  <package id="System.Console" version="4.3.1" targetFramework="net461" />
  <package id="System.Diagnostics.Contracts" version="4.3.0" targetFramework="net461" />
  <package id="System.Diagnostics.Debug" version="4.3.0" targetFramework="net461" />
  <package id="System.Diagnostics.DiagnosticSource" version="4.4.1" targetFramework="net461" />
  <package id="System.Diagnostics.Tools" version="4.3.0" targetFramework="net461" />
  <package id="System.Diagnostics.Tracing" version="4.3.0" targetFramework="net461" />
  <package id="System.Globalization" version="4.3.0" targetFramework="net461" />
  <package id="System.Globalization.Calendars" version="4.3.0" targetFramework="net461" />
  <package id="System.IO" version="4.3.0" targetFramework="net461" />
  <package id="System.IO.Compression" version="4.3.0" targetFramework="net461" />
  <package id="System.IO.Compression.ZipFile" version="4.3.0" targetFramework="net461" />
  <package id="System.IO.FileSystem" version="4.3.0" targetFramework="net461" />
  <package id="System.IO.FileSystem.Primitives" version="4.3.0" targetFramework="net461" />
  <package id="System.Linq" version="4.3.0" targetFramework="net461" />
  <package id="System.Linq.Expressions" version="4.3.0" targetFramework="net461" />
  <package id="System.Net.Http" version="4.3.3" targetFramework="net461" />
  <package id="System.Net.Primitives" version="4.3.0" targetFramework="net461" />
  <package id="System.Net.Sockets" version="4.3.0" targetFramework="net461" />
  <package id="System.ObjectModel" version="4.3.0" targetFramework="net461" />
  <package id="System.Reflection" version="4.3.0" targetFramework="net461" />
  <package id="System.Reflection.Extensions" version="4.3.0" targetFramework="net461" />
  <package id="System.Reflection.Primitives" version="4.3.0" targetFramework="net461" />
  <package id="System.Resources.ResourceManager" version="4.3.0" targetFramework="net461" />
  <package id="System.Runtime" version="4.3.0" targetFramework="net461" />
  <package id="System.Runtime.CompilerServices.Unsafe" version="4.4.0" targetFramework="net461" />
  <package id="System.Runtime.Extensions" version="4.3.0" targetFramework="net461" />
  <package id="System.Runtime.Handles" version="4.3.0" targetFramework="net461" />
  <package id="System.Runtime.InteropServices" version="4.3.0" targetFramework="net461" />
  <package id="System.Runtime.InteropServices.RuntimeInformation" version="4.3.0" targetFramework="net461" />
  <package id="System.Runtime.Numerics" version="4.3.0" targetFramework="net461" />
  <package id="System.Runtime.Serialization.Primitives" version="4.3.0" targetFramework="net461" />
  <package id="System.Security.Cryptography.Algorithms" version="4.3.1" targetFramework="net461" />
  <package id="System.Security.Cryptography.Encoding" version="4.3.0" targetFramework="net461" />
  <package id="System.Security.Cryptography.Primitives" version="4.3.0" targetFramework="net461" />
  <package id="System.Security.Cryptography.X509Certificates" version="4.3.2" targetFramework="net461" />
  <package id="System.Spatial" version="5.8.3" targetFramework="net461" />
  <package id="System.Text.Encoding" version="4.3.0" targetFramework="net461" />
  <package id="System.Text.Encoding.Extensions" version="4.3.0" targetFramework="net461" />
  <package id="System.Text.Encodings.Web" version="4.4.0" targetFramework="net461" />
  <package id="System.Text.RegularExpressions" version="4.3.0" targetFramework="net461" />
  <package id="System.Threading" version="4.3.0" targetFramework="net461" />
  <package id="System.Threading.Tasks" version="4.3.0" targetFramework="net461" />
  <package id="System.Threading.Timer" version="4.3.0" targetFramework="net461" />
  <package id="System.Xml.ReaderWriter" version="4.3.1" targetFramework="net461" />
  <package id="System.Xml.XDocument" version="4.3.0" targetFramework="net461" />
  <package id="Unity.Abstractions" version="3.3.0" targetFramework="net461" />
  <package id="Unity.AspNet.WebApi" version="5.0.13" targetFramework="net461" />
  <package id="Unity.Container" version="5.7.0" targetFramework="net461" />
  <package id="WebActivatorEx" version="2.2.0" targetFramework="net461" />
</packages>

enter image description here

...