Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/NSwag.CodeGeneration.Tests/VerifyHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ public static SettingsTask Verify(string output, bool scrubPragmas = true, bool
StringComparison.OrdinalIgnoreCase,
"Generated using the NSwag toolchain",
"Generated using the NJsonSchema",
"x-generator",
"[System.CodeDom.Compiler.GeneratedCode(\"NSwag\",",
"[System.CodeDom.Compiler.GeneratedCode(\"NJsonSchema\"",
"auto-generated>",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
"x-generator": "NSwag",
"openapi": "3.0.0",
"info": {
"title": "Minimal API",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
"x-generator": "NSwag",
"openapi": "3.0.0",
"info": {
"title": "My Title",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
"x-generator": "NSwag",
"openapi": "3.0.0",
"info": {
"title": "Minimal API",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
"x-generator": "NSwag",
"openapi": "3.0.0",
"info": {
"title": "My Title",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,11 @@ public async Task Should_generate_openapi_for_project(string projectName, string
}

var json = await File.ReadAllTextAsync(openApiJsonPath);
await Verifier.Verify(json).UseParameters(projectName, targetFramework, generatesCode);
await Verifier
.Verify(json)
.ScrubLinesContaining("x-generator")
.UseParameters(projectName, targetFramework, generatesCode)
.AutoVerify(includeBuildServer: false);

if (generatesCode)
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using NJsonSchema;
using NJsonSchema.NewtonsoftJson.Generation;
using NSwag.Generation.AspNetCore.Tests.Web.Controllers;
using Xunit;

namespace NSwag.Generation.AspNetCore.Tests
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using NJsonSchema;
using NJsonSchema.NewtonsoftJson.Generation;
using NSwag.Generation.AspNetCore.Tests.Web.Controllers;
using Xunit;

namespace NSwag.Generation.AspNetCore.Tests
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using NJsonSchema;
using NJsonSchema.NewtonsoftJson.Generation;
using NSwag.Generation.AspNetCore.Tests.Web.Controllers.Inheritance;
using Xunit;

namespace NSwag.Generation.AspNetCore.Tests.Inheritance
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using NJsonSchema;
using NJsonSchema.NewtonsoftJson.Generation;
using NSwag.Generation.AspNetCore.Tests.Web.Controllers;
using Xunit;

namespace NSwag.Generation.AspNetCore.Tests
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using NJsonSchema;
using NJsonSchema.NewtonsoftJson.Generation;
using NSwag.Generation.AspNetCore.Tests.Web.Controllers.Parameters;
using Xunit;

namespace NSwag.Generation.AspNetCore.Tests.Operations
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using NJsonSchema;
using NJsonSchema.NewtonsoftJson.Generation;
using NSwag.Generation.AspNetCore.Tests.Web.Controllers.Parameters;
using Xunit;

namespace NSwag.Generation.AspNetCore.Tests.Parameters
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
using NJsonSchema;
using NJsonSchema.NewtonsoftJson.Generation;
using NSwag.Generation.AspNetCore.Tests.Web.Controllers.Parameters;
using Xunit;
using static NSwag.Generation.AspNetCore.Tests.Web.Controllers.Parameters.DefaultParametersController;

namespace NSwag.Generation.AspNetCore.Tests.Parameters
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
using NJsonSchema.NewtonsoftJson.Generation;
using NSwag.CodeGeneration.Tests;
using NSwag.Generation.AspNetCore.Tests.Web.Controllers.Parameters;
using Xunit;

namespace NSwag.Generation.AspNetCore.Tests.Parameters
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using NJsonSchema;
using NJsonSchema.NewtonsoftJson.Generation;
using NSwag.Generation.AspNetCore.Tests.Web.Controllers.Parameters;
using Xunit;

namespace NSwag.Generation.AspNetCore.Tests.Parameters
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using NJsonSchema;
using NJsonSchema.NewtonsoftJson.Generation;
using NSwag.Generation.AspNetCore.Tests.Web.Controllers.Parameters;
using Xunit;

namespace NSwag.Generation.AspNetCore.Tests.Parameters
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using NJsonSchema;
using NJsonSchema.NewtonsoftJson.Generation;
using NSwag.Generation.AspNetCore.Tests.Web.Controllers.Parameters;
using Xunit;

namespace NSwag.Generation.AspNetCore.Tests.Parameters
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
using NJsonSchema;
using NJsonSchema.NewtonsoftJson.Generation;
using NSwag.Generation.AspNetCore.Tests.Web.Controllers.Parameters;
using Xunit;

namespace NSwag.Generation.AspNetCore.Tests.Parameters
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
"x-generator": "NSwag v14.4.1.0 (NJsonSchema v11.3.2.0 (Newtonsoft.Json v13.0.0.0))",
"openapi": "3.0.0",
"info": {
"title": "My Title",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
"x-generator": "NSwag v14.4.1.0 (NJsonSchema v11.3.2.0 (Newtonsoft.Json v13.0.0.0))",
"openapi": "3.0.0",
"info": {
"title": "My Title",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
using NJsonSchema;
using NJsonSchema.NewtonsoftJson.Generation;
using System.Reflection;
using Xunit;

namespace NSwag.Generation.AspNetCore.Processors.Tests
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using NJsonSchema;
using NJsonSchema.NewtonsoftJson.Generation;
using NSwag.Generation.AspNetCore.Tests.Web.Controllers.Requests;
using Xunit;

namespace NSwag.Generation.AspNetCore.Tests.Requests
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using NJsonSchema;
using NJsonSchema.NewtonsoftJson.Generation;
using NSwag.Generation.AspNetCore.Tests.Web.Controllers.Requests;
using Xunit;

namespace NSwag.Generation.AspNetCore.Tests.Requests
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
using NJsonSchema.NewtonsoftJson.Generation;
using NSwag.Generation.AspNetCore.Tests.Web.Controllers;
using NSwag.Generation.AspNetCore.Tests.Web.Controllers.Responses;
using Xunit;

namespace NSwag.Generation.AspNetCore.Tests.Responses
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using NJsonSchema;
using NJsonSchema.NewtonsoftJson.Generation;
using NSwag.Generation.AspNetCore.Tests.Web.Controllers.Responses;
using Xunit;

namespace NSwag.Generation.AspNetCore.Tests.Responses
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using NJsonSchema;
using NJsonSchema.NewtonsoftJson.Generation;
using NSwag.Generation.AspNetCore.Tests.Web.Controllers;
using Xunit;

namespace NSwag.Generation.AspNetCore.Tests.Responses
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
"x-generator": "NSwag v14.4.1.0 (NJsonSchema v11.3.2.0 (Newtonsoft.Json v13.0.0.0))",
"openapi": "3.0.0",
"info": {
"title": "My Title",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using Xunit;
using NJsonSchema;
using NJsonSchema;
using NSwag.Generation.AspNetCore.Tests.Web.Controllers.Responses;
using NJsonSchema.NewtonsoftJson.Generation;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
using NJsonSchema.NewtonsoftJson.Generation;
using NSwag.CodeGeneration.Tests;
using NSwag.Generation.AspNetCore.Tests.Web.Controllers;
using Xunit;

namespace NSwag.Generation.AspNetCore.Tests.Responses
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#if NETCOREAPP3_1_OR_GREATER
using System.Text.Json.Serialization;
using NSwag.AspNetCore;
using Xunit;
using NJsonSchema.Generation;

namespace NSwag.Generation.AspNetCore.Tests
Expand Down
Loading