Skip to content

Commit 5280bc5

Browse files
committed
Update NJS to v10.8.0, update Namotion.Reflection to v2.1.0
1 parent fc98f68 commit 5280bc5

File tree

16 files changed

+56
-21
lines changed

16 files changed

+56
-21
lines changed

src/NSwag.AspNet.WebApi/NSwag.AspNet.WebApi.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<ItemGroup>
1212
<PackageReference Include="Microsoft.AspNet.WebApi.Core" Version="5.2.3" />
1313
<PackageReference Include="Microsoft.AspNet.WebApi.Client" Version="5.2.3" />
14-
<PackageReference Include="NJsonSchema" Version="10.7.2" />
14+
<PackageReference Include="NJsonSchema" Version="10.8.0" />
1515
</ItemGroup>
1616
<ItemGroup>
1717
<ProjectReference Include="..\NSwag.Annotations\NSwag.Annotations.csproj" />

src/NSwag.AssemblyLoader/NSwag.AssemblyLoader.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
</PropertyGroup>
88

99
<ItemGroup>
10-
<PackageReference Include="NJsonSchema" Version="10.7.2" />
10+
<PackageReference Include="NJsonSchema" Version="10.8.0" />
1111
<PackageReference Include="System.Net.Http" Version="4.3.4" />
1212
</ItemGroup>
1313

src/NSwag.CodeGeneration.CSharp/NSwag.CodeGeneration.CSharp.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@
1818
<Service Include="{508349b6-6b84-4df5-91f0-309beebad82d}" />
1919
</ItemGroup>
2020
<ItemGroup>
21-
<PackageReference Include="NJsonSchema.CodeGeneration.CSharp" Version="10.7.2" />
21+
<PackageReference Include="NJsonSchema.CodeGeneration.CSharp" Version="10.8.0" />
2222
</ItemGroup>
2323
</Project>

src/NSwag.CodeGeneration.TypeScript/NSwag.CodeGeneration.TypeScript.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@
1818
<Service Include="{508349b6-6b84-4df5-91f0-309beebad82d}" />
1919
</ItemGroup>
2020
<ItemGroup>
21-
<PackageReference Include="NJsonSchema.CodeGeneration.TypeScript" Version="10.7.2" />
21+
<PackageReference Include="NJsonSchema.CodeGeneration.TypeScript" Version="10.8.0" />
2222
</ItemGroup>
2323
</Project>

src/NSwag.CodeGeneration/NSwag.CodeGeneration.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
</PropertyGroup>
88
<ItemGroup>
99
<PackageReference Include="Newtonsoft.Json" Version="9.0.1" />
10-
<PackageReference Include="NJsonSchema" Version="10.7.2" />
11-
<PackageReference Include="NJsonSchema.CodeGeneration" Version="10.7.2" />
10+
<PackageReference Include="NJsonSchema" Version="10.8.0" />
11+
<PackageReference Include="NJsonSchema.CodeGeneration" Version="10.8.0" />
1212
</ItemGroup>
1313
<ItemGroup Condition="'$(TargetFramework)' == 'net461'">
1414
<Reference Include="Microsoft.CSharp" />

src/NSwag.Core.Yaml/NSwag.Core.Yaml.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<RootNamespace>NSwag</RootNamespace>
55
</PropertyGroup>
66
<ItemGroup>
7-
<PackageReference Include="NJsonSchema.Yaml" Version="10.7.2" />
7+
<PackageReference Include="NJsonSchema.Yaml" Version="10.8.0" />
88
<PackageReference Include="YamlDotNet" Version="11.2.1" />
99
</ItemGroup>
1010
<ItemGroup>

src/NSwag.Core/NSwag.Core.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
</PropertyGroup>
99
<ItemGroup>
1010
<PackageReference Include="Newtonsoft.Json" Version="9.0.1" />
11-
<PackageReference Include="NJsonSchema" Version="10.7.2" />
11+
<PackageReference Include="NJsonSchema" Version="10.8.0" />
1212
</ItemGroup>
1313
<ItemGroup Condition="'$(TargetFramework)' == 'net45'">
1414
<Reference Include="Microsoft.CSharp" />

src/NSwag.Demo.Web/NSwag.Demo.Web.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@
142142
<PackageReference Include="Microsoft.Owin.FileSystems" Version="3.0.1" />
143143
<PackageReference Include="Microsoft.Owin.Host.SystemWeb" Version="3.0.1" />
144144
<PackageReference Include="Microsoft.Web.Infrastructure" Version="1.0.0" />
145-
<PackageReference Include="NJsonSchema" Version="10.7.2" />
145+
<PackageReference Include="NJsonSchema" Version="10.8.0" />
146146
<PackageReference Include="Owin" Version="1.0.0" />
147147
</ItemGroup>
148148
<PropertyGroup>

src/NSwag.Generation.AspNetCore/Processors/AspNetCoreOperationTagsProcessor.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ protected override void AddControllerNameTag(OperationProcessorContext context)
4848
var aspNetCoreContext = (AspNetCoreOperationProcessorContext)context;
4949
if (aspNetCoreContext.ApiDescription.ActionDescriptor is ControllerActionDescriptor controllerActionDescriptor)
5050
{
51-
var summary = controllerActionDescriptor.ControllerTypeInfo.GetXmlDocsSummary(context.Settings.ResolveExternalXmlDocumentation);
51+
var summary = controllerActionDescriptor.ControllerTypeInfo.GetXmlDocsSummary(context.Settings.GetXmlDocsOptions());
5252
aspNetCoreContext.OperationDescription.Operation.Tags.Add(controllerActionDescriptor.ControllerName);
5353
UpdateDocumentTagDescription(context, controllerActionDescriptor.ControllerName, summary);
5454
}

src/NSwag.Generation.WebApi/Processors/OperationParameterProcessor.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -453,7 +453,7 @@ private OpenApiParameter AddPrimitiveParametersFromUri(
453453
propertyName = fromHeaderAttribute?.Name;
454454
}
455455

456-
var propertySummary = contextualProperty.PropertyInfo.GetXmlDocsSummary(_settings.ResolveExternalXmlDocumentation);
456+
var propertySummary = contextualProperty.PropertyInfo.GetXmlDocsSummary(_settings.GetXmlDocsOptions());
457457
var operationParameter = context.DocumentGenerator.CreatePrimitiveParameter(propertyName, propertySummary, contextualProperty.AccessorType);
458458

459459
// TODO: Check if required can be controlled with mechanisms other than RequiredAttribute

src/NSwag.Generation/NSwag.Generation.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
<ItemGroup>
1010
<PackageReference Include="Newtonsoft.Json" Version="9.0.1" />
11-
<PackageReference Include="NJsonSchema" Version="10.7.2" />
11+
<PackageReference Include="NJsonSchema" Version="10.8.0" />
1212
</ItemGroup>
1313

1414
<ItemGroup Condition="'$(TargetFramework)' == 'net45'">

src/NSwag.Generation/Processors/OperationResponseProcessorBase.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ protected XElement GetResponseXmlDocsElement(MethodInfo methodInfo, string respo
9999

100100
private IEnumerable<XElement> GetResponseXmlDocsNodes(MethodInfo methodInfo)
101101
{
102-
var operationXmlDocs = methodInfo?.GetXmlDocsElement(_settings.ResolveExternalXmlDocumentation);
102+
var operationXmlDocs = methodInfo?.GetXmlDocsElement(_settings.GetXmlDocsOptions());
103103
return operationXmlDocs?.Nodes()?.OfType<XElement>();
104104
}
105105

src/NSwag.Generation/Processors/OperationSummaryAndDescriptionProcessor.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ private void ProcessSummary(OperationProcessorContext context, Attribute[] attri
4848

4949
if (string.IsNullOrEmpty(summary))
5050
{
51-
summary = context.MethodInfo?.GetXmlDocsSummary(context.Settings.ResolveExternalXmlDocumentation);
51+
summary = context.MethodInfo?.GetXmlDocsSummary(context.Settings.GetXmlDocsOptions());
5252
}
5353

5454
if (!string.IsNullOrEmpty(summary))
@@ -66,7 +66,7 @@ private void ProcessDescription(OperationProcessorContext context, Attribute[] a
6666

6767
if (string.IsNullOrEmpty(description))
6868
{
69-
description = context.MethodInfo?.GetXmlDocsRemarks(context.Settings.ResolveExternalXmlDocumentation);
69+
description = context.MethodInfo?.GetXmlDocsRemarks(context.Settings.GetXmlDocsOptions());
7070
}
7171

7272
if (!string.IsNullOrEmpty(description))

src/NSwag.Generation/Processors/OperationTagsProcessor.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ protected virtual void AddControllerNameTag(OperationProcessorContext context)
5858
controllerName = controllerName.Substring(0, controllerName.Length - 10);
5959
}
6060

61-
var summary = context.ControllerType.GetXmlDocsSummary(context.Settings.ResolveExternalXmlDocumentation);
61+
var summary = context.ControllerType.GetXmlDocsSummary(context.Settings.GetXmlDocsOptions());
6262
context.OperationDescription.Operation.Tags.Add(controllerName);
6363
UpdateDocumentTagDescription(context, controllerName, summary);
6464
}
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
//-----------------------------------------------------------------------
2+
// <copyright file="IXmlDocsSettings.cs" company="NJsonSchema">
3+
// Copyright (c) Rico Suter. All rights reserved.
4+
// </copyright>
5+
// <license>https://github.com/RicoSuter/NJsonSchema/blob/master/LICENSE.md</license>
6+
// <author>Rico Suter, [email protected]</author>
7+
//-----------------------------------------------------------------------
8+
9+
using Namotion.Reflection;
10+
using NJsonSchema.Generation;
11+
12+
namespace NSwag.Generation
13+
{
14+
/// <summary>
15+
/// XML Documentation settings extensions.
16+
/// </summary>
17+
public static class XmlDocsSettingsExtensions
18+
{
19+
// TODO: Remove this class and use NJS exentions instead.
20+
21+
/// <summary>
22+
/// Converts a settings to options.
23+
/// </summary>
24+
/// <param name="settings">The settings.</param>
25+
/// <returns>The options.</returns>
26+
public static XmlDocsOptions GetXmlDocsOptions(this IXmlDocsSettings settings)
27+
{
28+
return new XmlDocsOptions
29+
{
30+
ResolveExternalXmlDocs = settings.ResolveExternalXmlDocumentation,
31+
FormattingMode = settings.XmlDocumentationFormatting
32+
};
33+
}
34+
}
35+
}

src/NSwagStudio/NSwagStudio.csproj

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,13 @@
6262
<PackageReference Include="Microsoft.NETCore.Portable.Compatibility" Version="1.0.1" />
6363
<PackageReference Include="MyToolkit" Version="2.5.16" />
6464
<PackageReference Include="MyToolkit.Extended" Version="2.5.16" />
65-
<PackageReference Include="Namotion.Reflection" Version="2.0.10" />
65+
<PackageReference Include="Namotion.Reflection" Version="2.1.0" />
6666
<PackageReference Include="NConsole" Version="3.9.6519.30868" />
6767
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
68-
<PackageReference Include="NJsonSchema" Version="10.7.2" />
69-
<PackageReference Include="NJsonSchema.CodeGeneration" Version="10.7.2" />
70-
<PackageReference Include="NJsonSchema.CodeGeneration.CSharp" Version="10.7.2" />
71-
<PackageReference Include="NJsonSchema.CodeGeneration.TypeScript" Version="10.7.2" />
68+
<PackageReference Include="NJsonSchema" Version="10.8.0" />
69+
<PackageReference Include="NJsonSchema.CodeGeneration" Version="10.8.0" />
70+
<PackageReference Include="NJsonSchema.CodeGeneration.CSharp" Version="10.8.0" />
71+
<PackageReference Include="NJsonSchema.CodeGeneration.TypeScript" Version="10.8.0" />
7272
<PackageReference Include="System.Net.Http" Version="4.3.4" />
7373
<PackageReference Include="System.Security.Cryptography.Algorithms" Version="4.3.0" />
7474
<PackageReference Include="System.Security.Cryptography.Encoding" Version="4.3.0" />

0 commit comments

Comments
 (0)