From a88318dd300841c9d8bf2ab6ad9483949203b974 Mon Sep 17 00:00:00 2001 From: Daniel Oliveira Date: Mon, 10 Sep 2018 10:48:05 +0100 Subject: [PATCH 1/2] On self hosted the Info parameter of Configure dont work --- src/SwaggerWcf/Support/TypeExtensions.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/SwaggerWcf/Support/TypeExtensions.cs b/src/SwaggerWcf/Support/TypeExtensions.cs index 96e3076..0ae7934 100644 --- a/src/SwaggerWcf/Support/TypeExtensions.cs +++ b/src/SwaggerWcf/Support/TypeExtensions.cs @@ -27,7 +27,10 @@ public static string GetModelWrappedName(this Type type) => internal static Info GetServiceInfo(this TypeInfo typeInfo) { - var infoAttr = typeInfo.GetCustomAttribute() ?? + var infoAttr = typeInfo.GetCustomAttribute(); + if (infoAttr == null && SwaggerWcfEndpoint.Info != null) + return SwaggerWcfEndpoint.Info; + else if (infoAttr == null && SwaggerWcfEndpoint.Info == null) throw new ArgumentException($"{typeInfo.FullName} does not have {nameof(SwaggerWcfServiceInfoAttribute)}"); var info = (Info)infoAttr; From 0e87b78d9b01947d96af95c0f18967b7cd8c6105 Mon Sep 17 00:00:00 2001 From: Daniel Oliveira Date: Tue, 7 Jan 2025 14:51:45 +0000 Subject: [PATCH 2/2] Upgrade target framework and update deps --- src/SwaggerWcf/Properties/AssemblyInfo.cs | 6 +++--- src/SwaggerWcf/Support/Mapper.cs | 9 ++++----- src/SwaggerWcf/SwaggerWcf.csproj | 15 ++++++++------- src/SwaggerWcf/packages.config | 4 ---- 4 files changed, 15 insertions(+), 19 deletions(-) delete mode 100644 src/SwaggerWcf/packages.config diff --git a/src/SwaggerWcf/Properties/AssemblyInfo.cs b/src/SwaggerWcf/Properties/AssemblyInfo.cs index aa5ebcf..25aa147 100644 --- a/src/SwaggerWcf/Properties/AssemblyInfo.cs +++ b/src/SwaggerWcf/Properties/AssemblyInfo.cs @@ -37,6 +37,6 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("0.2.15")] -[assembly: AssemblyFileVersion("0.2.15")] -[assembly: AssemblyInformationalVersion("0.2.15")] +[assembly: AssemblyVersion("2.2501.2.0")] +[assembly: AssemblyFileVersion("2.2501.2.0")] +[assembly: AssemblyInformationalVersion("2.2501.2.0")] diff --git a/src/SwaggerWcf/Support/Mapper.cs b/src/SwaggerWcf/Support/Mapper.cs index 2bde06b..90f1fc4 100644 --- a/src/SwaggerWcf/Support/Mapper.cs +++ b/src/SwaggerWcf/Support/Mapper.cs @@ -1,16 +1,15 @@ -using System; +using SwaggerWcf.Attributes; +using SwaggerWcf.Models; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Linq; using System.Reflection; -using System.Runtime.Serialization; using System.ServiceModel; using System.ServiceModel.Web; using System.Text.RegularExpressions; using System.Threading.Tasks; using System.Web; -using SwaggerWcf.Attributes; -using SwaggerWcf.Models; namespace SwaggerWcf.Support { @@ -30,7 +29,7 @@ internal IEnumerable FindMethods(Type markedType, IList definitionsT List paths = new List(); List> pathActions = new List>(); - List types; + List types; Type serviceType; if (markedType.IsInterface) { diff --git a/src/SwaggerWcf/SwaggerWcf.csproj b/src/SwaggerWcf/SwaggerWcf.csproj index 3d10eef..146e7c1 100644 --- a/src/SwaggerWcf/SwaggerWcf.csproj +++ b/src/SwaggerWcf/SwaggerWcf.csproj @@ -1,5 +1,5 @@  - + Release @@ -9,9 +9,10 @@ Properties SwaggerWcf SwaggerWcf - v4.5 + v4.8 512 ..\ + true @@ -31,10 +32,6 @@ 4 - - ..\packages\Newtonsoft.Json.8.0.3\lib\net45\Newtonsoft.Json.dll - True - @@ -122,9 +119,13 @@ - + + + 13.0.1 + +