-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix issue #2057 related to readonly properties set via constructor
- Loading branch information
rmorris
committed
Mar 16, 2021
1 parent
68d7ef8
commit a6eda1a
Showing
6 changed files
with
37 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
test/Swashbuckle.AspNetCore.Newtonsoft.Test/Fixtures/TypeWithPropertiesSetViaConstructor.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
using Newtonsoft.Json; | ||
|
||
namespace Swashbuckle.AspNetCore.Newtonsoft.Test | ||
{ | ||
public class TypeWithPropertiesSetViaConstructor | ||
{ | ||
public TypeWithPropertiesSetViaConstructor(int id, string description) | ||
{ | ||
Id = id; | ||
Description = description; | ||
} | ||
|
||
public int Id { get; } | ||
|
||
[JsonProperty("Desc")] | ||
public string Description { get; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 0 additions & 12 deletions
12
test/Swashbuckle.AspNetCore.TestSupport/Fixtures/TypeWithPropertySetViaConstructor.cs
This file was deleted.
Oops, something went wrong.