vaclavnovotny / NSwag.Examples

NSwag processor to programmatically define strongly-typed examples for response and request parameters.
MIT License
13 stars 11 forks source link

Upgrade to latest NSwag dependency #12

Closed davidkeaveny closed 1 year ago

davidkeaveny commented 1 year ago

The current version 1.0.7 has a dependency on NSwag.AspNetCore 13.15.10; however, that has its own dependencies which include the Microsoft.Extensions.xxx being less than 7.0.0 - this is causing multiple build errors when e.g. using EF Core 7, which requires Microsoft.Extensions.xxx 7.0.x.

[NU1608] Detected package version outside of dependency constraint: NSwag.Generation.AspNetCore 13.15.10 requires Microsoft.Extensions.DependencyInjection.Abstractions (>= 6.0.0 && < 7.0.0) but version Microsoft.Extensions.DependencyInjection.Abstractions 7.0.0 was resolved. [NU1608] Detected package version outside of dependency constraint: NSwag.Generation.AspNetCore 13.15.10 requires Microsoft.Extensions.Options (>= 6.0.0 && < 7.0.0) but version Microsoft.Extensions.Options 7.0.1 was resolved.

We need to update the NSwag.Examples project to reference the current newest version of NSwag.AspNetCore, which as of 06/06/2023, is 13.19.0.

P.S. Sorry, I'm not sure how to get the PR auto-linked in the Development tab, but the URL is https://github.com/vaclavnovotny/NSwag.Examples/pull/13

vaclavnovotny commented 1 year ago

Hello @davidkeaveny, you are right, we also encountered this in our production, merged your PR and added target for .NET 7. Published as 1.0.8 https://www.nuget.org/packages/NSwag.Examples/1.0.8 Thanks.